FreeCAD C++
Public Member Functions | List of all members
Gui::BaseView Class Referenceabstract

#include <Gui/View.h>

Detailed Description

Base class of all windows belonging to a document there are two ways of belonging to a document. The first way is to a fixed one. The second way is to always belonging to the Active document. that means switching every time the active document is changing. It also means that the view belongs sometimes to no document at all!

See also
TreeView
Gui::Document
Application
Author
Juergen Riegel

Public Member Functions

 BaseView (Gui::Document *pcDocument=0)
 
virtual ~BaseView ()
 
Gui::DocumentgetGuiDocument () const
 returns the document the view is attached to
 
App::DocumentgetAppDocument () const
 returns the document the view is attached to
 
bool isPassive (void) const
 indicates if the view is in passive mode
 
methods used by the Application and the GuiDocument
void setDocument (Gui::Document *pcDocument)
 sets the view to another document (called by Application)
 
void onClose (void)
 is sent from the document in order to close the document
 
methods to override
virtual void onUpdate (void)
 get called when the document is updated
 
virtual void onRelabel (Gui::Document *)
 get called when the document is relabeled (change of its user name)
 
virtual void onRename (Gui::Document *)
 get called when the document is renamed (change of its internal name)
 
virtual const char * getName (void) const
 returns the name of the view (important for messages)
 
virtual bool onMsg (const char *pMsg, const char **ppReturn)=0
 Message handler.
 
virtual bool onHasMsg (const char *pMsg) const =0
 Message handler test.
 
virtual bool canClose (void)
 overwrite when checking on close state
 
virtual void deleteSelf ()
 delete itself
 
- Public Member Functions inherited from Base::BaseClass
 BaseClass ()
 Construction.
 
virtual ~BaseClass ()
 Destruction.
 

Constructor & Destructor Documentation

◆ BaseView()

Gui::BaseView::BaseView ( Gui::Document pcDocument = 0)

View constructor Attach the view to the given document. If the document is 0 the view will attach to the active document. Be aware! there isn't always an active document!

◆ ~BaseView()

virtual Gui::BaseView::~BaseView ( )
virtual

View destructor Detach the view from the document, if attached!