| 1 |
from Base.Metadata import export |
| 2 |
from Base.BaseClass import BaseClass |
| 3 |
from typing import Any, List, Dict |
| 4 |
|
| 5 |
@export( |
| 6 |
Include="Gui/Workbench.h", |
| 7 |
) |
| 8 |
class Workbench(BaseClass): |
| 9 |
""" |
| 10 |
This is the base class for workbenches |
| 11 |
|
| 12 |
Author: Werner Mayer ([email protected]) |
| 13 |
Licence: LGPL |
| 14 |
""" |
| 15 |
|
| 16 |
def name(self) -> str: |
| 17 |
""" |
| 18 |
Return the workbench name |
| 19 |
""" |
| 20 |
... |
| 21 |
|
| 22 |
def activate(self) -> None: |
| 23 |
""" |
| 24 |
Activate this workbench |
| 25 |
""" |
| 26 |
... |
| 27 |
|
| 28 |
def listToolbars(self) -> List[Any]: |
| 29 |
""" |
| 30 |
Show a list of all toolbars |
| 31 |
""" |
| 32 |
... |
| 33 |
|
| 34 |
def getToolbarItems(self) -> Dict[Any, Any]: |
| 35 |
""" |
| 36 |
Show a dict of all toolbars and their commands |
| 37 |
""" |
| 38 |
... |
| 39 |
|
| 40 |
def listCommandbars(self) -> List[Any]: |
| 41 |
""" |
| 42 |
Show a list of all command bars |
| 43 |
""" |
| 44 |
... |
| 45 |
|
| 46 |
def listMenus(self) -> List[Any]: |
| 47 |
""" |
| 48 |
Show a list of all menus |
| 49 |
""" |
| 50 |
... |
| 51 |
|
| 52 |
@staticmethod |
| 53 |
def reloadActive() -> None: |
| 54 |
""" |
| 55 |
Reload the active workbench after changing menus or toolbars |
| 56 |
""" |
| 57 |
... |