25 #ifndef GCHEMPAINT_APPLICATION_H 26 #define GCHEMPAINT_APPLICATION_H 30 #include <libxml/parser.h> 102 friend class ApplicationPrivate;
124 void ActivateTool (
const std::string& toolname,
bool activate);
140 void ActivateWindowsActionWidget (
const char *path,
bool activate);
144 virtual void ClearStatus ();
150 virtual void SetStatusText (
const char* text);
155 virtual GtkWindow* GetWindow () = 0;
182 void SetTool (
const std::string& toolname,
Tool* tool) {m_Tools[toolname] = tool;}
187 GtkWidget*
GetToolItem(
const std::string& name) {
return ToolItems[name];}
195 void SetToolItem (
const std::string& name, GtkWidget* w) {ToolItems[name] = w;}
221 bool FileProcess (
const gchar* filename,
const gchar* mime_type,
bool bSave, GtkWindow *window,
gcu::Document *pDoc = NULL);
228 void SaveGcp (std::string
const &filename,
gcp::Document* pDoc);
235 void OpenGcp (std::string
const &filename,
gcp::Document* pDoc);
244 void OnSaveAsImage ();
258 void Zoom (
double zoom);
304 void AddActions (GtkRadioActionEntry
const *entries,
int nb,
char const *ui_description,
IconDesc const *icons);
312 void RegisterToolbar (
char const *name,
int index);
318 void OnToolChanged (GtkAction *current);
325 void AddTarget (
Target *target);
332 void DeleteTarget (
Target *target);
339 void NotifyIconification (
bool iconified);
347 void NotifyFocus (
bool has_focus,
Target *target = NULL);
363 void OnConfigChanged (GOConfNode *node, gchar
const *name);
368 std::list<std::string> &GetExtensions(std::string &mime_type);
374 void OnThemeNamesChanged ();
381 void AddMenuCallback (BuildMenuCb cb);
405 virtual void OnFileNew (
char const *
Theme = NULL) = 0;
412 GdkCursor *
GetCursor (CursorId
id) {
return m_Cursors[id];}
417 bool Have3DSupport () {
return m_HaveGhemical | m_HaveGChem3D | m_HaveAvogadro;}
432 void ReceiveTargets (GtkClipboard *clipboard, GtkSelectionData *selection_data);
444 void BuildTools ()
throw (std::runtime_error);
450 void ShowTools (
bool visible);
453 void TestSupportedType (
char const *mime_type,
char const* babel_type = NULL,
bool writeable =
false);
454 void AddMimeType (std::list<std::string> &l, std::string
const& mime_type);
455 void UpdateAllTargets ();
473 std::map <std::string, GtkWidget*> ToolItems;
474 std::map <std::string, GtkWidget*> Toolbars;
475 std::map <std::string, Tool*> m_Tools;
478 static bool m_Have_InChI;
480 GtkIconFactory *IconFactory;
481 std::list<char const*> UiDescs;
482 GtkRadioActionEntry* RadioActions;
484 std::map<int, std::string> ToolbarNames;
486 std::set<Target*> m_Targets;
488 std::list<std::string> m_SupportedMimeTypes;
489 std::list<std::string> m_WriteableMimeTypes;
490 GOConfNode *m_ConfNode;
491 guint m_NotificationId;
493 std::list<BuildMenuCb> m_MenuCbs;
495 std::map < std::string, gccv::Canvas * >m_ToolCanvases;
517 #endif //GCHEMPAINT_APPLICATION_H
GChemPaint specific C++ classes.
A Gtk+ using gcu::CmdContext implementation.
GdkCursor * GetCursor(CursorId id)
#define GCU_RO_PROP(type, member)
void SetActiveDocument(gcp::Document *pDoc)
unsigned char const * data_24
gcp::Document * m_pActiveDoc
void AddCanvas(char const *path, gccv::Canvas *canvas)
std::list< std::string > & GetSupportedMimeTypes()
base class for a user interface manager
Gnome Chemistry Canvas library namespace.
The Gnome Chemistry Utils C++ classes.
gcp::Document * GetActiveDocument()
#define GCU_RO_STATIC_PROP(type, member)
void SetToolItem(const std::string &name, GtkWidget *w)
void SetTool(const std::string &toolname, Tool *tool)
GChemPaint application base class.
GtkWidget * GetToolItem(const std::string &name)
Tool * GetTool(const std::string &name)