Base class of all windows belonging to a document there are two ways of belonging to a document. More...
#include <View.h>
Public Member Functions | |
BaseView (Gui::Document *pcDocument=0) | |
View constructor Attach the view to the given document. | |
App::Document * | getAppDocument () const |
returns the document the view is attached to | |
Gui::Document * | getGuiDocument () 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 |
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!
Definition at line 51 of file View.h.
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] |
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.
void * Gui::BaseView::create | ( | void | ) | [static] |
Reimplemented from Base::BaseClass.
Reimplemented in Gui::MDIView, and Gui::View3DInventor.
void BaseView::deleteSelf | ( | ) | [virtual] |
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.
Gui::Document* Gui::BaseView::getGuiDocument | ( | ) | const [inline] |
returns the document the view is attached to
Definition at line 78 of file View.h.
Referenced by Gui::MDIView::canClose(), Gui::MDIView::closeEvent(), Gui::View3DInventor::onMsg(), Gui::View3DInventorPy::removeAnnotation(), Gui::View3DInventorPy::setAnnotation(), and Gui::Application::viewActivated().
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.
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] |
Message handler test.
Implemented in Gui::DockWindow, Gui::EditorView, Gui::PythonEditorView, Gui::MDIView, Gui::SplitView3DInventor, Gui::View3DInventor, DrawingGui::DrawingView, ImageGui::ImageView, and WebGui::BrowserView.
virtual bool Gui::BaseView::onMsg | ( | const char * | pMsg, | |
const char ** | ppReturn | |||
) | [pure virtual] |
Message handler.
Implemented in Gui::DockWindow, Gui::EditorView, Gui::PythonEditorView, Gui::MDIView, Gui::SplitView3DInventor, Gui::View3DInventor, DrawingGui::DrawingView, ImageGui::ImageView, and WebGui::BrowserView.
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.
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.
virtual void Gui::BaseView::onUpdate | ( | void | ) | [inline, virtual] |
get called when the document is updated
Reimplemented in Gui::DockWindow, Gui::EditorView, Gui::DockWnd::SelectionView, Gui::SplitView3DInventor, Gui::DockWnd::TaskPanelView, Gui::View3DInventor, ImageGui::ImageView, and WebGui::BrowserView.
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().
Gui::Document* Gui::BaseView::_pcDocument [protected] |
Definition at line 107 of file View.h.
Referenced by getAppDocument(), onClose(), and setDocument().
bool Gui::BaseView::bIsDetached [protected] |
bool Gui::BaseView::bIsPassive [protected] |
Definition at line 109 of file View.h.
Referenced by BaseView(), Gui::MDIView::canClose(), Gui::MDIView::closeEvent(), onClose(), and Gui::MDIView::onRelabel().