AppWnd Class Reference

#include <appwnd.h>

List of all members.

Public Member Functions

 ~AppWnd ()
bool closeAll ()
void exit ()
bool isDocument (Fl_Window *wnd)
DrawContext drawContext () const
void selectTool (EDrawTool et)

Static Public Member Functions

static AppWndptr ()
static void destroy ()
static std::string newDocName ()

Protected Member Functions

 AppWnd ()
void addDoc (Document *doc)
void remDoc (Document *doc)

Friends

class Document


Detailed Description

Application window (singleton)

Definition at line 32 of file appwnd.h.


Constructor & Destructor Documentation

AppWnd::~AppWnd (  ) 

AppWnd::AppWnd (  )  [protected]

Singleton can not be allocated static. Use method AppWnd::ptr() method to obtain singleton address.


Member Function Documentation

static AppWnd* AppWnd::ptr (  )  [static]

Access point to singleton AppWnd.

Returns:
Return pointer to singleton.

Referenced by Document::Document(), and Document::~Document().

static void AppWnd::destroy (  )  [static]

Destroy singleton AppWnd. It has no effect if object is not allocated.

bool AppWnd::closeAll (  ) 

Try to close all documents attached to AppWnd singleton.

Returns:
Return true if all documents are closed.

void AppWnd::exit (  ) 

Try to close all documents. If success, close HelpBrowser singleton and AppWnd singleton.

bool AppWnd::isDocument ( Fl_Window *  wnd  ) 

Search pointer to window in document list.

Parameters:
wnd Pointer to window.
Returns:
Return true if pointer points to Document object.

DrawContext AppWnd::drawContext (  )  const

Returns:
Return DrawContext structure containing current draw tool properties.

void AppWnd::selectTool ( EDrawTool  et  ) 

Set current draw tool.

Parameters:
et Draw tool enumeration.

static std::string AppWnd::newDocName (  )  [static]

Returns:
Return unique file name for new document.

void AppWnd::addDoc ( Document doc  )  [protected]

Add pointer to Document object to document list.

Parameters:
doc Pointer to document to add.

void AppWnd::remDoc ( Document doc  )  [protected]

Remove pointer to Document object from document list.

Parameters:
doc Pointer to document to remove.


Friends And Related Function Documentation

friend class Document [friend]

Needed to add/remove documents automatically.

Definition at line 102 of file appwnd.h.


The documentation for this class was generated from the following file:
Generated on Wed Aug 29 00:01:04 2007 for GED 2006 by  doxygen 1.5.2