The Gnome Chemistry Utils  0.13.7
Public Member Functions | Protected Member Functions | Protected Attributes
gcr::Window Class Reference

Window class. More...

#include <gcr/window.h>

Inherits gcugtk::Window.

List of all members.

Public Member Functions

 Window (gcu::Application *app, Document *doc, char const *extra_ui=NULL)
virtual ~Window ()
virtual void Destroy ()
void ClearStatus ()
void SetStatusText (const char *text)
gcr::ApplicationGetApplication (void)
ViewGetView (void) const

Protected Member Functions

virtual void OnSave ()

Protected Attributes

Documentm_Document
gcr::Applicationm_Application

Detailed Description

Window class.

This class wraps the window used to display a view.

Definition at line 45 of file gcr/window.h.


Constructor & Destructor Documentation

gcr::Window::Window ( gcu::Application app,
Document doc,
char const *  extra_ui = NULL 
)
Parameters:
appthe application.
docthe document.
extra_uia string describing the menu items to add.

Contructs the new window. Default menus do not have a File/Quit item or a Windows menu. extra_ui can be used to add them. GCrystal uses:

"<ui>"
"  <menubar name='MainMenu'>"
"    <menu action='FileMenu'>"
"          <placeholder name='file1'>"
"        <menuitem action='Quit'/>"
"          </placeholder>"
"    </menu>"
"        <placeholder name='menu1'>"
"      <menu action='WindowsMenu'>"
"        <menuitem action='NewView'/>"
"        <menuitem action='CloseView'/>"
"      </menu>"
"        </placeholder>"
"  </menubar>"
"</ui>";
virtual gcr::Window::~Window ( ) [virtual]

The destructor.

Reimplemented from gcu::Window.


Member Function Documentation

Clears the status bar message.

virtual void gcr::Window::Destroy ( ) [virtual]

Destroys the window.

Reimplemented from gcu::Window.

gcr::Window::GetApplication ( void  ) [inline]
Returns:
the gcr::Document displayed in this window.
the gcu::Application owning this window.

Definition at line 121 of file gcr/window.h.

gcr::Window::GetView ( void  ) const [inline]
Returns:
the View displayed by this window.

Definition at line 125 of file gcr/window.h.

virtual void gcr::Window::OnSave ( ) [protected, virtual]

Saves the document.

void gcr::Window::SetStatusText ( const char *  text)
Parameters:
textthe text to display in the status bar.

Sets the status bar message.


Member Data Documentation

The gcu::Application owning this window.

Definition at line 121 of file gcr/window.h.

The gcr::Document displayed in this window.

Definition at line 114 of file gcr/window.h.


The documentation for this class was generated from the following file: