The StdWorkbench class defines the standard menus, toolbars, commandbars etc. More...
#include <Workbench.h>
Public Member Functions | |
virtual void createMainWindowPopupMenu (MenuItem *) const | |
Sets up the contextmenu for the main window for this workbench. More... | |
virtual void setupContextMenu (const char *recipient, MenuItem *) const | |
Defines the standard context menu. More... | |
StdWorkbench () | |
virtual ~StdWorkbench () | |
![]() | |
bool activate () | |
Activates the workbench and adds/removes GUI elements. More... | |
virtual void activated () | |
Run some actions when the workbench gets activated. More... | |
void addTaskWatcher (const std::vector< Gui::TaskView::TaskWatcher * > &Watcher) | |
helper to add TaskWatcher to the TaskView More... | |
virtual void deactivated () | |
Run some actions when the workbench gets deactivated. More... | |
PyObject * getPyObject () | |
The default implementation returns an instance of WorkbenchPy. More... | |
std::list< std::pair< std::string, std::list< std::string > > > getToolbarItems () const | |
Shows a list of all toolbars and their commands. More... | |
std::list< std::string > listCommandbars () const | |
std::list< std::string > listMenus () const | |
std::list< std::string > listToolbars () const | |
std::string name () const | |
Returns the name of the workbench object. More... | |
void removeTaskWatcher (void) | |
remove the added TaskWatcher More... | |
void retranslate () const | |
Translates the window titles of all menus, toolbars and dock windows. More... | |
void setName (const std::string &) | |
Set the name to the workbench object. More... | |
Workbench () | |
Constructs a workbench object. More... | |
virtual ~Workbench () | |
![]() | |
BaseClass () | |
Construction. More... | |
virtual Type getTypeId (void) const | |
bool isDerivedFrom (const Type type) const | |
virtual void setPyObject (PyObject *) | |
virtual ~BaseClass () | |
Destruction. More... | |
Protected Member Functions | |
virtual ToolBarItem * setupCommandBars () const | |
Defines the standard command bars. More... | |
virtual DockWindowItems * setupDockWindows () const | |
Returns a DockWindowItems structure of dock windows this workbench. More... | |
virtual MenuItem * setupMenuBar () const | |
Defines the standard menus. More... | |
virtual ToolBarItem * setupToolBars () const | |
Defines the standard toolbars. More... | |
Friends | |
class PythonWorkbench | |
Additional Inherited Members | |
![]() | |
static void createLinkMenu (MenuItem *) | |
![]() | |
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
The StdWorkbench class defines the standard menus, toolbars, commandbars etc.
To define own workbenches you should inherit from StdWorkbench instead of Workbench to have defined the standard GUI elements.
Constructor & Destructor Documentation
◆ StdWorkbench()
StdWorkbench::StdWorkbench | ( | ) |
◆ ~StdWorkbench()
|
virtual |
Member Function Documentation
◆ createMainWindowPopupMenu()
|
virtual |
Sets up the contextmenu for the main window for this workbench.
The default implementation does nothing.
Reimplemented from Gui::Workbench.
Referenced by Gui::PythonWorkbench::createMainWindowPopupMenu().
◆ setupCommandBars()
|
protectedvirtual |
Defines the standard command bars.
Implements Gui::Workbench.
Reimplemented in Gui::TestWorkbench, Gui::NoneWorkbench, StartGui::Workbench, WebGui::Workbench, MeshGui::Workbench, SketcherGui::Workbench, DrawingGui::Workbench, PartGui::Workbench, ReverseEngineeringGui::Workbench, SandboxGui::Workbench, TechDrawGui::Workbench, ImageGui::Workbench, ImportGui::Workbench, MeshPartGui::Workbench, PointsGui::Workbench, PartDesignGui::Workbench, and SpreadsheetGui::Workbench.
References Gui::ToolBarItem::setCommand().
◆ setupContextMenu()
|
virtual |
Defines the standard context menu.
Reimplemented from Gui::Workbench.
Reimplemented in Gui::NoneWorkbench, MeshGui::Workbench, StartGui::Workbench, WebGui::Workbench, FemGui::Workbench, and PartDesignGui::Workbench.
References Gui::Workbench::createLinkMenu(), Base::Persistence::getClassTypeId(), Gui::Selection(), and Gui::MenuItem::setCommand().
Referenced by PartDesignGui::Workbench::setupContextMenu(), and Gui::PythonWorkbench::setupContextMenu().
◆ setupDockWindows()
|
protectedvirtual |
Returns a DockWindowItems structure of dock windows this workbench.
Implements Gui::Workbench.
Reimplemented in Gui::NoneWorkbench, StartGui::Workbench, WebGui::Workbench, and SandboxGui::Workbench.
References Gui::DockWindowItems::addDockWidget(), App::GetApplication(), ParameterGrp::GetBool(), ParameterGrp::GetGroup(), and App::Application::GetUserParameter().
Referenced by SandboxGui::Workbench::setupDockWindows(), WebGui::Workbench::setupDockWindows(), StartGui::Workbench::setupDockWindows(), and Gui::PythonWorkbench::setupDockWindows().
◆ setupMenuBar()
|
protectedvirtual |
Defines the standard menus.
Implements Gui::Workbench.
Reimplemented in Gui::TestWorkbench, Gui::NoneWorkbench, RobotGui::Workbench, StartGui::Workbench, MeshGui::Workbench, WebGui::Workbench, FemGui::Workbench, PointsGui::Workbench, SketcherGui::Workbench, DrawingGui::Workbench, PartGui::Workbench, RaytracingGui::Workbench, ReverseEngineeringGui::Workbench, SandboxGui::Workbench, TechDrawGui::Workbench, InspectionGui::Workbench, SurfaceGui::Workbench, PartDesignGui::Workbench, and SpreadsheetGui::Workbench.
References Gui::MenuItem::setCommand().
Referenced by Gui::PythonWorkbench::PythonWorkbench(), WebGui::Workbench::setupMenuBar(), StartGui::Workbench::setupMenuBar(), and Gui::TestWorkbench::setupMenuBar().
◆ setupToolBars()
|
protectedvirtual |
Defines the standard toolbars.
Implements Gui::Workbench.
Reimplemented in Gui::TestWorkbench, Gui::NoneWorkbench, StartGui::Workbench, RobotGui::Workbench, WebGui::Workbench, MeshGui::Workbench, SketcherGui::Workbench, DrawingGui::Workbench, FemGui::Workbench, PartGui::Workbench, RaytracingGui::Workbench, ReverseEngineeringGui::Workbench, SandboxGui::Workbench, TechDrawGui::Workbench, ImageGui::Workbench, ImportGui::Workbench, MeshPartGui::Workbench, PointsGui::Workbench, InspectionGui::Workbench, SurfaceGui::Workbench, PartDesignGui::Workbench, and SpreadsheetGui::Workbench.
References Gui::ToolBarItem::setCommand().
Referenced by Gui::PythonWorkbench::PythonWorkbench().
Friends And Related Function Documentation
◆ PythonWorkbench
|
friend |
The documentation for this class was generated from the following files:
- src/Gui/Workbench.h
- src/Gui/Workbench.cpp