The Gnome Chemistry Utils
0.14.0
|
#include <gcp/window.h>
Public Member Functions | |
Window (gcp::Application *app, char const *theme=NULL, char const *extra_ui=NULL) throw (std::runtime_error) | |
virtual | ~Window () |
void | OnFileNew () |
void | OnFileOpen () |
void | OnProperties () |
void | SetActive (gcp::Document *pDoc, GtkWidget *w) |
void | OnUndo () |
void | OnRedo () |
void | OnSelectAll () |
void | OnPasteSelection () |
void | OnCutSelection () |
void | OnCopySelection () |
void | OnDeleteSelection () |
void | OnPreferences () |
void | Zoom (double zoom) |
void | ClearStatus () |
void | SetStatusText (const char *text) |
void | Show () |
bool | OnKeyPressed (GtkWidget *widget, GdkEventKey *ev) |
bool | OnKeyReleased (GtkWidget *widget, GdkEventKey *ev) |
bool | Close () |
virtual void | OnSave () |
virtual char const * | GetDefaultTitle () |
void | Destroy () |
void | SetTitle (char const *title) |
bool | VerifySaved () |
void | OnPageSetup () |
Public Member Functions inherited from gcp::Target | |
Target (Application *App) | |
virtual | ~Target () |
void | SetWindow (GtkWindow *window) |
Application * | GetApplication (void) |
Public Member Functions inherited from gcugtk::Window | |
Window () | |
virtual | ~Window () |
void | SetTitle (char const *title) |
GdkScreen * | GetScreen () |
GtkWindow * | GetWindow (void) |
Public Member Functions inherited from gcu::Window | |
Window () | |
void | ActivateActionWidget (char const *path, bool activate) |
Additional Inherited Members | |
Protected Attributes inherited from gcp::Target | |
Application * | m_Application |
Document * | m_Document |
The top level window class for GChemPaint. Each document is associated with a view which might be itself associated with a window.
Definition at line 45 of file gcp/window.h.
gcp::Window::Window | ( | gcp::Application * | app, |
char const * | theme = NULL , |
||
char const * | extra_ui = NULL |
||
) | throw (std::runtime_error) |
app | the gcp::Application instance. |
theme | the name of the theme used by the document. |
extra_ui | a string describing the menu items to add. |
Contructs the new window. Default menus do not have a File/Quit item. extra_ui can be used to add it. GChemPaint uses:
|
virtual |
The destructor.
Reimplemented from gcu::Window.
void gcp::Window::ClearStatus | ( | ) |
Clears the status bar message.
|
virtual |
Checks if the document must be saved (see VerifySaved()) and safely closes the window.
Implements gcp::Target.
|
virtual |
Destroys the window.
Reimplemented from gcu::Window.
|
virtual |
void gcp::Window::OnCopySelection | ( | ) |
Method called by the framework when the Edit/Copy menu command is fired.
void gcp::Window::OnCutSelection | ( | ) |
Method called by the framework when the Edit/Cut menu command is fired.
void gcp::Window::OnDeleteSelection | ( | ) |
Method called by the framework when the Edit/Delete menu command is fired.
void gcp::Window::OnFileNew | ( | ) |
Method called by the framework when the File/New File menu command is fired.
void gcp::Window::OnFileOpen | ( | ) |
Method called by the framework when the File/Open menu command is fired.
bool gcp::Window::OnKeyPressed | ( | GtkWidget * | widget, |
GdkEventKey * | ev | ||
) |
Called by the framework on a "key-press-event" event.
bool gcp::Window::OnKeyReleased | ( | GtkWidget * | widget, |
GdkEventKey * | ev | ||
) |
Called by the framework on a "key-release-event" event.
void gcp::Window::OnPageSetup | ( | ) |
Method called by the framework when the File/Page setup menu command is fired.
void gcp::Window::OnPasteSelection | ( | ) |
Method called by the framework when the Edit/Paste menu command is fired.
void gcp::Window::OnPreferences | ( | ) |
Method called by the framework when the Edit/Preferences menu command is fired.
void gcp::Window::OnProperties | ( | ) |
Method called by the framework when the File/Properties menu command is fired.
void gcp::Window::OnRedo | ( | ) |
Method called by the framework when the Edit/Redo menu command is fired.
|
virtual |
Method called by the framework when the File/Save menu command is fired.
void gcp::Window::OnSelectAll | ( | ) |
Method called by the framework when the Edit/Select All menu command is fired.
void gcp::Window::OnUndo | ( | ) |
Method called by the framework when the Edit/Undo menu command is fired.
void gcp::Window::SetActive | ( | gcp::Document * | pDoc, |
GtkWidget * | w | ||
) |
Method called by the framework when the File/Save menu command is fired.
void gcp::Window::SetStatusText | ( | const char * | text | ) |
text | the text to display in the status bar. |
Sets the status bar message.
void gcp::Window::SetTitle | ( | char const * | title | ) |
title | the new window title. |
Sets the window title.
|
virtual |
Raises the window and makes it active.
Reimplemented from gcu::Window.
bool gcp::Window::VerifySaved | ( | ) |
If the document has been modified since last saving, pops-up a dialog box to ask the user if he wants to save the document, to drop the changes or to abort closing.
void gcp::Window::Zoom | ( | double | zoom | ) |
zoom | the new zoom level. |
Sets the zoom level.