wbpDocBrowser package

class DocTreeModel[source]

Bases: object

TreeModel holds the domain objects that are shown in the tree control.

property app: App
Returns:

The running Workbench application.

property documentManager: DocumentManager
Returns:

The document manager of the running application.

property items: List[Tuple[str, tuple, str]]
GetItem(indices)[source]
Parameters:

indices (Tuple[int, ...]) –

GetText(indices)[source]
Parameters:

indices (Tuple[int, ...]) –

Return type:

str

GetChildren(indices)[source]
Parameters:

indices (Tuple[int, ...]) –

GetChildrenCount(indices)[source]
Parameters:

indices (Tuple[int, ...]) –

Return type:

int

class DocTreeMixin[source]

Bases: VirtualTree

Mixin class for virtual TreeCtrl.

__init__(*args, **kwargs)[source]
property app: App
Returns:

The running Workbench application.

property documentManager: DocumentManager
Returns:

The document manager of the running application.

createImageList()[source]

Create an image list from all known document and view icons.

Return type:

None

OnGetItemText(indices, column=0)[source]
Returns:

The string for the item specified by indices

Parameters:
  • indices (Tuple[int, ...]) –

  • column (int) –

Return type:

str

OnGetChildrenCount(indices)[source]
Returns:

the number of child items of the item with the provided indices.

Parameters:

indices (Tuple[int, ...]) –

Return type:

int

OnGetItemImage(indices, which=wx.TreeItemIcon_Normal, column=0)[source]
Returns:

The index in the image list of the image to be used

Parameters:
  • indices (Tuple[int, ...]) –

  • which (int) –

  • column (int) –

Return type:

int

class DocTreeCtrl[source]

Bases: DocTreeMixin, TreeCtrl

TreeCtrl to show all open documents and the associated views.

__init__(parent, id=wx.ID_ANY, pos=wx.DefaultPosition, size=wx.DefaultSize, style=wx.TR_DEFAULT_STYLE | wx.TR_SINGLE | wx.TR_TWIST_BUTTONS)[source]
on_itemActivated(event)[source]

Handle double click on item in tree control.

Parameters:

event (TreeEvent) –

on_updateUI(event)[source]
makeImageList(app)[source]
Parameters:

app (App) –