00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef GCP_WINDOW_H
00025 #define GCP_WINDOW_H
00026
00027 #include "target.h"
00028 #include <gtk/gtkwidget.h>
00029 #include <gtk/gtkuimanager.h>
00030
00031 namespace gcp {
00032
00033 class Application;
00034 class Document;
00035
00036 class Window: public Target
00037 {
00038 public:
00039 Window (gcp::Application *App, char const *Theme = NULL, char const *extra_ui = NULL);
00040 virtual ~Window ();
00041
00042 void OnFileNew ();
00043 void OnFileOpen ();
00044 void OnProperties ();
00045 void SetActive (gcp::Document* pDoc, GtkWidget* w);
00046 void OnUndo ();
00047 void OnRedo ();
00048 void OnSelectAll ();
00049 void OnPasteSelection ();
00050 void OnCutSelection ();
00051 void OnCopySelection ();
00052 void OnDeleteSelection ();
00053 void OnPreferences ();
00054 void Zoom (double zoom);
00055 void ClearStatus ();
00056 void SetStatusText (const char* text);
00057 void Show ();
00058 bool OnKeyPressed (GtkWidget* widget, GdkEventKey* ev);
00059 bool OnKeyReleased (GtkWidget* widget, GdkEventKey* ev);
00060 bool Close ();
00061
00062 virtual void OnSave ();
00063 virtual char const *GetDefaultTitle ();
00064
00065 gcp::Application *GetApplication () {return m_App;}
00066
00067 void Destroy ();
00068 void SetTitle (char const *title);
00069 void ActivateActionWidget (char const *path, bool activate);
00070 bool VerifySaved ();
00071 void OnPageSetup ();
00072
00073 protected:
00074 gcp::Application *m_App;
00075 GtkUIManager* m_UIManager;
00076
00077 private:
00078 GtkWidget* m_Bar;
00079 unsigned m_statusId;
00080 unsigned m_MessageId;
00081 };
00082
00083 }
00084
00085 #endif // GCP_WINDOW_H