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. More... | |
virtual ~BaseView () | |
View destructor Detach the view from the document, if attached! More... | |
methods used by the Application and the GuiDocument | |
void setDocument (Gui::Document *pcDocument) | |
sets the view to another document (called by Application) More... | |
void onClose (void) | |
is sent from the document in order to close the document More... | |
Gui::Document * getGuiDocument () const | |
returns the document the view is attached to More... | |
App::Document * getAppDocument () const | |
returns the document the view is attached to More... | |
bool isPassive (void) const | |
indicates if the view is in passive mode More... | |
![]() | |
BaseClass () | |
Construction. More... | |
virtual PyObject * getPyObject (void) | |
This method returns the Python wrapper for a C++ object. More... | |
virtual Type getTypeId (void) const | |
bool isDerivedFrom (const Type type) const | |
virtual void setPyObject (PyObject *) | |
virtual ~BaseClass () | |
Destruction. More... | |
methods to override | |
bool bIsDetached | |
bool bIsPassive | |
virtual void onUpdate (void) | |
get called when the document is updated More... | |
virtual void onRelabel (Gui::Document *) | |
get called when the document is relabeled (change of its user name) More... | |
virtual void onRename (Gui::Document *) | |
get called when the document is renamed (change of its internal name) More... | |
virtual const char * getName (void) const | |
returns the name of the view (important for messages) More... | |
virtual bool onMsg (const char *pMsg, const char **ppReturn)=0 | |
Message handler. More... | |
virtual bool onHasMsg (const char *pMsg) const =0 | |
Message handler test. More... | |
virtual bool canClose (void) | |
overwrite when checking on close state More... | |
virtual void deleteSelf () | |
delete itself More... | |
Additional Inherited Members | |
![]() | |
static void * create (void) | |
static Type getClassTypeId (void) | |
static void init (void) | |
![]() | |
static void initSubclass (Base::Type &toInit, const char *ClassName, const char *ParentName, Type::instantiationMethod method=nullptr) | |
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
Constructor & Destructor Documentation
◆ BaseView()
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!
References Gui::Application::attachView(), and Gui::Application::Instance.
◆ ~BaseView()
|
virtual |
View destructor Detach the view from the document, if attached!
References onClose().
Member Function Documentation
◆ canClose()
|
virtual |
overwrite when checking on close state
Reimplemented in WebGui::BrowserView, Gui::DockWindow, Gui::MDIView, Gui::EditorView, Gui::TextDocumentEditorView, and Gui::AlignmentView.
◆ deleteSelf()
|
virtual |
delete itself
Reimplemented in Gui::MDIView, SpreadsheetGui::SheetView, Gui::View3DInventor, and Gui::AbstractSplitView.
◆ getAppDocument()
App::Document * BaseView::getAppDocument | ( | ) | const |
returns the document the view is attached to
Referenced by Gui::View3DInventor::dropEvent(), TechDrawGui::MDIViewPage::fixOrphans(), PartDesignGui::getBody(), Gui::View3DInventor::onHasMsg(), TechDrawGui::MDIViewPage::onHasMsg(), DrawingGui::DrawingView::onHasMsg(), and PartDesignGui::Workbench::setupContextMenu().
◆ getGuiDocument()
Gui::Document* Gui::BaseView::getGuiDocument | ( | ) | const |
returns the document the view is attached to
Referenced by Gui::MDIView::canClose(), Gui::TextDocumentEditorView::canClose(), Gui::MDIView::closeEvent(), Gui::Dialog::RedoDialog::onFetchInfo(), Gui::Dialog::UndoDialog::onFetchInfo(), DrawingGui::DrawingView::onHasMsg(), Gui::View3DInventor::onMsg(), TechDrawGui::MDIViewPage::onMsg(), DrawingGui::DrawingView::onMsg(), and Gui::Application::viewActivated().
◆ getName()
|
virtual |
returns the name of the view (important for messages)
Reimplemented in Gui::DockWnd::SelectionView, Gui::Dialog::LicenseView, WebGui::BrowserView, Gui::DockWindow, Gui::View3DInventor, Gui::AbstractSplitView, SpreadsheetGui::SheetView, Gui::EditorView, ImageGui::ImageView, and Gui::TextDocumentEditorView.
Referenced by Gui::GraphicsView3D::OnChange().
◆ isPassive()
bool Gui::BaseView::isPassive | ( | void | ) | const |
indicates if the view is in passive mode
Referenced by TechDrawGui::MDIViewPage::setTabText(), and Gui::Application::viewActivated().
◆ onClose()
void BaseView::onClose | ( | void | ) |
is sent from the document in order to close the document
References bIsDetached, bIsPassive, Gui::Application::detachView(), and Gui::Application::Instance.
Referenced by Gui::MDIView::deleteSelf(), and ~BaseView().
◆ onHasMsg()
|
pure virtual |
Message handler test.
Implemented in Gui::PythonEditorView, WebGui::BrowserView, DrawingGui::DrawingView, Gui::MDIView, TechDrawGui::MDIViewPage, Gui::View3DInventor, Gui::AbstractSplitView, Gui::EditorView, SpreadsheetGui::SheetView, Gui::GraphvizView, Gui::TextDocumentEditorView, Gui::DockWindow, and ImageGui::ImageView.
◆ onMsg()
|
pure virtual |
Message handler.
Implemented in Gui::DockWnd::SelectionView, Gui::PythonEditorView, WebGui::BrowserView, DrawingGui::DrawingView, TechDrawGui::MDIViewPage, Gui::MDIView, Gui::View3DInventor, Gui::AbstractSplitView, Gui::EditorView, SpreadsheetGui::SheetView, Gui::GraphvizView, Gui::TextDocumentEditorView, Gui::DockWindow, and ImageGui::ImageView.
◆ onRelabel()
|
virtual |
get called when the document is relabeled (change of its user name)
Reimplemented in DrawingGui::DrawingView, and Gui::MDIView.
◆ onRename()
|
virtual |
get called when the document is renamed (change of its internal name)
Reimplemented in Gui::View3DInventor.
◆ onUpdate()
|
virtual |
get called when the document is updated
Reimplemented in Gui::DockWnd::SelectionView, Gui::DockWindow, Gui::View3DInventor, Gui::AbstractSplitView, Gui::EditorView, and ImageGui::ImageView.
Referenced by shipAreasCurve.TaskPanel.TaskPanel::initValues(), and shipAreasCurve.TaskPanel.TaskPanel::onData().
◆ setDocument()
void BaseView::setDocument | ( | Gui::Document * | pcDocument | ) |
sets the view to another document (called by Application)
References Gui::Document::attachView().
Member Data Documentation
◆ bIsDetached
◆ bIsPassive
|
protected |
The documentation for this class was generated from the following files:
- src/Gui/View.h
- src/Gui/View.cpp