Gui::PythonWorkbench Class Reference

The PythonWorkbench class allows the manipulation of the workbench from Python. More...

#include <Workbench.h>

Inheritance diagram for Gui::PythonWorkbench:
Gui::StdWorkbench Gui::Workbench Base::BaseClass

List of all members.

Public Member Functions

PyObject * getPyObject ()
 Creates and returns immediately the corresponding Python workbench object.
virtual Base::Type getTypeId (void) const
 PythonWorkbench ()
 ~PythonWorkbench ()
Manipulation methods



void appendCommandbar (const std::string &bar, const std::list< std::string > &items) const
 Appends a new command bar.
void appendContextMenu (const std::list< std::string > &menu, const std::list< std::string > &items) const
 Appends new context menu items.
void appendMenu (const std::list< std::string > &menu, const std::list< std::string > &items) const
 Appends a new menu.
void appendToolbar (const std::string &bar, const std::list< std::string > &items) const
 Appends a new toolbar.
void clearContextMenu ()
std::list< std::string > listCommandbars () const
std::list< std::string > listMenus () const
std::list< std::string > listToolbars () const
void removeCommandbar (const std::string &bar) const
 Removes a command bar.
void removeContextMenu (const std::string &menu) const
 Removes a context menu.
void removeMenu (const std::string &menu) const
 Removes a menu.
void removeToolbar (const std::string &bar) const
 Removes a toolbar.
void setupContextMenu (const char *recipient, MenuItem *) const
 Defines the standard context menu.

Static Public Member Functions

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

Protected Member Functions

ToolBarItem * setupCommandBars () const
 Defines the standard command bars.
MenuItem * setupMenuBar () const
 Defines the standard menus.
ToolBarItem * setupToolBars () const
 Defines the standard toolbars.

Detailed Description

The PythonWorkbench class allows the manipulation of the workbench from Python.

Therefore PythonWorkbenchPy provides the required Python interface.

Author:
Werner Mayer

Definition at line 224 of file Gui/Workbench.h.


Constructor & Destructor Documentation

PythonWorkbench::PythonWorkbench (  ) 
PythonWorkbench::~PythonWorkbench (  ) 

Member Function Documentation

void PythonWorkbench::appendCommandbar ( const std::string &  bar,
const std::list< std::string > &  items 
) const

Appends a new command bar.

Definition at line 921 of file Gui/Workbench.cpp.

References Gui::ToolBarItem::findItem(), and Gui::ToolBarItem::setCommand().

Referenced by Gui::PythonWorkbenchPy::appendCommandbar().

void PythonWorkbench::appendContextMenu ( const std::list< std::string > &  menu,
const std::list< std::string > &  items 
) const

Appends new context menu items.

Definition at line 860 of file Gui/Workbench.cpp.

References Gui::MenuItem::findItem(), and Gui::MenuItem::setCommand().

Referenced by Gui::PythonWorkbenchPy::appendContextMenu().

void PythonWorkbench::appendMenu ( const std::list< std::string > &  menu,
const std::list< std::string > &  items 
) const
void PythonWorkbench::appendToolbar ( const std::string &  bar,
const std::list< std::string > &  items 
) const

Appends a new toolbar.

Definition at line 890 of file Gui/Workbench.cpp.

References Gui::ToolBarItem::findItem(), and Gui::ToolBarItem::setCommand().

Referenced by Gui::PythonWorkbenchPy::appendToolbar().

void PythonWorkbench::clearContextMenu (  ) 

Definition at line 885 of file Gui/Workbench.cpp.

References Gui::MenuItem::clear().

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

Reimplemented from Gui::StdWorkbench.

Definition at line 751 of file Gui/Workbench.cpp.

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

Reimplemented from Gui::StdWorkbench.

Definition at line 751 of file Gui/Workbench.cpp.

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

PyObject * PythonWorkbench::getPyObject ( void   )  [virtual]

Creates and returns immediately the corresponding Python workbench object.

Reimplemented from Gui::Workbench.

Definition at line 774 of file Gui/Workbench.cpp.

References Base::PyObjectBase::IncRef().

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

Reimplemented from Gui::StdWorkbench.

Definition at line 751 of file Gui/Workbench.cpp.

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

Reimplemented from Gui::StdWorkbench.

Definition at line 751 of file Gui/Workbench.cpp.

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

std::list< std::string > PythonWorkbench::listCommandbars (  )  const

Definition at line 943 of file Gui/Workbench.cpp.

References Gui::ToolBarItem::getItems().

Referenced by Gui::PythonWorkbenchPy::listCommandbars().

std::list< std::string > PythonWorkbench::listMenus (  )  const

Definition at line 851 of file Gui/Workbench.cpp.

References Gui::MenuItem::getItems().

Referenced by Gui::PythonWorkbenchPy::listMenus().

std::list< std::string > PythonWorkbench::listToolbars (  )  const

Definition at line 912 of file Gui/Workbench.cpp.

References Gui::ToolBarItem::getItems().

Referenced by Gui::PythonWorkbenchPy::listToolbars().

void PythonWorkbench::removeCommandbar ( const std::string &  bar  )  const

Removes a command bar.

Definition at line 934 of file Gui/Workbench.cpp.

References Gui::ToolBarItem::findItem(), and Gui::ToolBarItem::removeItem().

Referenced by Gui::PythonWorkbenchPy::removeCommandbar().

void PythonWorkbench::removeContextMenu ( const std::string &  menu  )  const

Removes a context menu.

Definition at line 876 of file Gui/Workbench.cpp.

References Gui::MenuItem::findItem(), and Gui::MenuItem::removeItem().

Referenced by Gui::PythonWorkbenchPy::removeContextMenu().

void PythonWorkbench::removeMenu ( const std::string &  menu  )  const

Removes a menu.

Definition at line 842 of file Gui/Workbench.cpp.

References Gui::MenuItem::findItem(), and Gui::MenuItem::removeItem().

Referenced by Gui::PythonWorkbenchPy::removeMenu().

void PythonWorkbench::removeToolbar ( const std::string &  bar  )  const

Removes a toolbar.

Definition at line 903 of file Gui/Workbench.cpp.

References Gui::ToolBarItem::findItem(), and Gui::ToolBarItem::removeItem().

Referenced by Gui::PythonWorkbenchPy::removeToolbar().

ToolBarItem * PythonWorkbench::setupCommandBars (  )  const [protected, virtual]

Defines the standard command bars.

Reimplemented from Gui::StdWorkbench.

Definition at line 797 of file Gui/Workbench.cpp.

References Gui::ToolBarItem::copy().

void PythonWorkbench::setupContextMenu ( const char *  recipient,
MenuItem *  item 
) const [virtual]

Defines the standard context menu.

Reimplemented from Gui::StdWorkbench.

Definition at line 802 of file Gui/Workbench.cpp.

References Gui::MenuItem::appendItem(), and Gui::MenuItem::getItems().

MenuItem * PythonWorkbench::setupMenuBar (  )  const [protected, virtual]

Defines the standard menus.

Reimplemented from Gui::StdWorkbench.

Definition at line 787 of file Gui/Workbench.cpp.

References Gui::MenuItem::copy().

ToolBarItem * PythonWorkbench::setupToolBars (  )  const [protected, virtual]

Defines the standard toolbars.

Reimplemented from Gui::StdWorkbench.

Definition at line 792 of file Gui/Workbench.cpp.

References Gui::ToolBarItem::copy().


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

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