Gui::BaseView Class Reference

Base class of all windows belonging to a document there are two ways of belonging to a document. More...

#include <View.h>

Inheritance diagram for Gui::BaseView:
Base::BaseClass Gui::DockWindow Gui::MDIView Gui::DockWnd::CombiView Gui::DockWnd::PropertyDockView Gui::DockWnd::SelectionView Gui::DockWnd::TaskPanelView Gui::TreeDockWidget DrawingGui::DrawingView Gui::EditorView Gui::SplitView3DInventor Gui::View3DInventor ImageGui::ImageView WebGui::BrowserView

List of all members.

Public Member Functions

 BaseView (Gui::Document *pcDocument=0)
 View constructor Attach the view to the given document.
App::DocumentgetAppDocument () const
 returns the document the view is attached to
Gui::DocumentgetGuiDocument () const
 returns the document the view is attached to
virtual Base::Type getTypeId (void) const
bool isPassive (void) const
 indicates if the view is in passive mode
virtual ~BaseView ()
 View destructor Detach the view from the document, if attached!
methods to overrride



virtual bool canClose (void)
 overwrite when checking on close state
virtual void deleteSelf ()
 delete itself
virtual const char * getName (void) const
 returns the name of the view (important for messages)
virtual bool onHasMsg (const char *pMsg) const =0
 Message handler test.
virtual bool onMsg (const char *pMsg, const char **ppReturn)=0
 Message handler.
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 void onUpdate (void)
 get called when the document is updated
methods used by the Application and the GuiDocument



void onClose (void)
 is sent from the document in order to close the document
void setDocument (Gui::Document *pcDocument)
 sets the view to another document (called by Application)

Static Public Member Functions

static void * create (void)
static Base::Type getClassTypeId (void)
static void init (void)

Protected Attributes

Gui::Document_pcDocument
bool bIsDetached
bool bIsPassive

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

Definition at line 51 of file View.h.


Constructor & Destructor Documentation

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!

Definition at line 39 of file View.cpp.

References Gui::Application::attachView(), Gui::Document::attachView(), bIsPassive, and Gui::Application::Instance.

BaseView::~BaseView (  )  [virtual]

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

Definition at line 52 of file View.cpp.

References onClose().


Member Function Documentation

virtual bool Gui::BaseView::canClose ( void   )  [inline, virtual]

overwrite when checking on close state

Reimplemented in Gui::DockWindow, Gui::EditorView, Gui::MDIView, and WebGui::BrowserView.

Definition at line 101 of file View.h.

void * Gui::BaseView::create ( void   )  [static]

Reimplemented from Base::BaseClass.

Reimplemented in Gui::MDIView, and Gui::View3DInventor.

Definition at line 36 of file View.cpp.

void BaseView::deleteSelf (  )  [virtual]

delete itself

Reimplemented in Gui::MDIView.

Definition at line 76 of file View.cpp.

App::Document * BaseView::getAppDocument (  )  const

returns the document the view is attached to

Definition at line 96 of file View.cpp.

References _pcDocument, and Gui::Document::getDocument().

Referenced by Gui::View3DInventor::dropEvent(), and Gui::View3DInventor::onHasMsg().

Base::Type Gui::BaseView::getClassTypeId ( void   )  [static]

Reimplemented from Base::BaseClass.

Reimplemented in Gui::MDIView, and Gui::View3DInventor.

Definition at line 36 of file View.cpp.

Gui::Document* Gui::BaseView::getGuiDocument (  )  const [inline]
virtual const char* Gui::BaseView::getName ( void   )  const [inline, virtual]

returns the name of the view (important for messages)

Reimplemented in Gui::DockWindow, Gui::EditorView, Gui::DockWnd::SelectionView, Gui::SplitView3DInventor, Gui::DockWnd::TaskPanelView, Gui::View3DInventor, ImageGui::ImageView, and WebGui::BrowserView.

Definition at line 94 of file View.h.

Base::Type Gui::BaseView::getTypeId ( void   )  const [virtual]

Reimplemented from Base::BaseClass.

Reimplemented in Gui::MDIView, and Gui::View3DInventor.

Definition at line 36 of file View.cpp.

Referenced by Gui::Command::isViewOfType().

void Gui::BaseView::init ( void   )  [static]

Reimplemented from Base::BaseClass.

Reimplemented in Gui::MDIView, and Gui::View3DInventor.

Definition at line 36 of file View.cpp.

Referenced by Gui::Application::initTypes().

bool Gui::BaseView::isPassive ( void   )  const [inline]

indicates if the view is in passive mode

Definition at line 82 of file View.h.

Referenced by Gui::Application::viewActivated().

void BaseView::onClose ( void   ) 

is sent from the document in order to close the document

Definition at line 57 of file View.cpp.

References _pcDocument, bIsDetached, bIsPassive, Gui::Document::detachView(), Gui::Application::detachView(), and Gui::Application::Instance.

Referenced by ~BaseView().

virtual bool Gui::BaseView::onHasMsg ( const char *  pMsg  )  const [pure virtual]
virtual bool Gui::BaseView::onMsg ( const char *  pMsg,
const char **  ppReturn 
) [pure virtual]
virtual void Gui::BaseView::onRelabel ( Gui::Document  )  [inline, virtual]

get called when the document is relabeled (change of its user name)

Reimplemented in Gui::MDIView.

Definition at line 90 of file View.h.

virtual void Gui::BaseView::onRename ( Gui::Document  )  [inline, virtual]

get called when the document is renamed (change of its internal name)

Reimplemented in Gui::View3DInventor.

Definition at line 92 of file View.h.

virtual void Gui::BaseView::onUpdate ( void   )  [inline, virtual]
void BaseView::setDocument ( Gui::Document pcDocument  ) 

sets the view to another document (called by Application)

Definition at line 81 of file View.cpp.

References _pcDocument, Gui::Document::attachView(), and Gui::Document::detachView().


Member Data Documentation

Definition at line 107 of file View.h.

Referenced by getAppDocument(), onClose(), and setDocument().

bool Gui::BaseView::bIsDetached [protected]

Definition at line 108 of file View.h.

Referenced by onClose().

bool Gui::BaseView::bIsPassive [protected]

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

Generated on Wed Nov 23 19:01:58 2011 for FreeCAD by  doxygen 1.6.1