PYME.ui.MetadataTree module

class PYME.ui.MetadataTree.EditableTreeList(parent, id=-1, style=8197)

Bases: wx.gizmos.TreeListCtrl, PYME.ui.MetadataTree.TextEditMixin

Attributes

AcceleratorTable See GetAcceleratorTable and SetAcceleratorTable
Alignment See GetAlignment
AutoLayout See GetAutoLayout and SetAutoLayout
BackgroundColour See GetBackgroundColour and SetBackgroundColour
BackgroundStyle See GetBackgroundStyle and SetBackgroundStyle
BestSize See GetBestSize
BestVirtualSize See GetBestVirtualSize
Border See GetBorder
ButtonsImageList See GetButtonsImageList and SetButtonsImageList
Caret See GetCaret and SetCaret
CharHeight See GetCharHeight
CharWidth See GetCharWidth
Children See GetChildren
ClassName See GetClassName
ClientAreaOrigin See GetClientAreaOrigin
ClientRect See GetClientRect and SetClientRect
ClientSize See GetClientSize and SetClientSize
ColumnCount See GetColumnCount
Constraints See GetConstraints and SetConstraints
ContainingSizer See GetContainingSizer and SetContainingSizer
Count See GetCount
CurrentItem GetCurrentItem(self) -> TreeItemId
Cursor See GetCursor and SetCursor
DefaultAttributes See GetDefaultAttributes
DropTarget See GetDropTarget and SetDropTarget
EffectiveMinSize See GetEffectiveMinSize
Enabled See IsEnabled and Enable
EventHandler See GetEventHandler and SetEventHandler
EvtHandlerEnabled See GetEvtHandlerEnabled and SetEvtHandlerEnabled
ExtraStyle See GetExtraStyle and SetExtraStyle
Font See GetFont and SetFont
ForegroundColour See GetForegroundColour and SetForegroundColour
GrandParent See GetGrandParent
GtkWidget GetGtkWidget(self) -> long
Handle See GetHandle
HeaderWindow See GetHeaderWindow
HelpText See GetHelpText and SetHelpText
Id See GetId and SetId
ImageList See GetImageList and SetImageList
Indent See GetIndent and SetIndent
Label See GetLabel and SetLabel
LabelText See GetLabelText
LayoutDirection See GetLayoutDirection and SetLayoutDirection
LineSpacing See GetLineSpacing and SetLineSpacing
MainColumn See GetMainColumn and SetMainColumn
MainWindow See GetMainWindow
MaxClientSize GetMaxClientSize(self) -> Size
MaxHeight See GetMaxHeight
MaxSize See GetMaxSize and SetMaxSize
MaxWidth See GetMaxWidth
MinClientSize GetMinClientSize(self) -> Size
MinHeight See GetMinHeight
MinSize See GetMinSize and SetMinSize
MinWidth See GetMinWidth
Name See GetName and SetName
Next See GetNext
NextHandler See GetNextHandler and SetNextHandler
Parent See GetParent
Position See GetPosition and SetPosition
PreviousHandler See GetPreviousHandler and SetPreviousHandler
Rect See GetRect and SetRect
RootItem See GetRootItem
ScreenPosition See GetScreenPosition
ScreenRect See GetScreenRect
Selection See GetSelection
Selections See GetSelections
Shown See IsShown and Show
Size See GetSize and SetSize
Sizer See GetSizer and SetSizer
StateImageList See GetStateImageList and SetStateImageList
ThemeEnabled See GetThemeEnabled and SetThemeEnabled
ToolTip See GetToolTip and SetToolTip
ToolTipString
TopLevel See IsTopLevel
TopLevelParent See GetTopLevelParent
UpdateClientRect See GetUpdateClientRect
UpdateRegion See GetUpdateRegion
Validator See GetValidator and SetValidator
VirtualSize See GetVirtualSize and SetVirtualSize
WindowStyle See GetWindowStyle and SetWindowStyle
WindowStyleFlag See GetWindowStyleFlag and SetWindowStyleFlag
WindowVariant See GetWindowVariant and SetWindowVariant
thisown The membership flag

Methods

CloseEditor([evt]) Close the editor and save the new value to the ListCtrl.
OnChar(event) Catch the TAB, Shift-TAB, cursor DOWN/UP key code so we can open the editor at the next column (if any).
OnItemSelected(evt)
OnLeftDown([evt]) Examine the click and double click events to see if a row has been click on twice.
OpenEditor(col, row) Opens an editor at the current position.
makeColumnEditable(col)
make_editor([col_style])
class PYME.ui.MetadataTree.MetadataPanel(parent, mdh, editable=True, refreshable=True)

Bases: mClass

Methods

GetItemFullname(item)
OnBeginEdit(event)
OnEndEdit(event)
OnRightDown(event)
OnRightUp(event)
OnSize(evt)
addEntries(mdh, node[, entrypath])
rebuild([event])
GetItemFullname(item)
OnBeginEdit(event)
OnEndEdit(event)
OnRightDown(event)
OnRightUp(event)
OnSize(evt)
addEntries(mdh, node, entrypath='')
rebuild(event=None)
class PYME.ui.MetadataTree.TextEditMixin

A mixin class that enables any text in any column of a multi-column listctrl to be edited by clicking on the given row and column. You close the text editor by hitting the ENTER key or clicking somewhere else on the listctrl. You switch to the next column by hiting TAB.

To use the mixin you have to include it in the class definition and call the __init__ function:

class TestListCtrl(wx.ListCtrl, TextEditMixin):
    def __init__(self, parent, ID, pos=wx.DefaultPosition,
                 size=wx.DefaultSize, style=0):
        wx.ListCtrl.__init__(self, parent, ID, pos, size, style)
        TextEditMixin.__init__(self)

Authors: Steve Zatz, Pim Van Heuven (pim@think-wize.com)

Methods

CloseEditor([evt]) Close the editor and save the new value to the ListCtrl.
OnChar(event) Catch the TAB, Shift-TAB, cursor DOWN/UP key code so we can open the editor at the next column (if any).
OnItemSelected(evt)
OnLeftDown([evt]) Examine the click and double click events to see if a row has been click on twice.
OpenEditor(col, row) Opens an editor at the current position.
makeColumnEditable(col)
make_editor([col_style])
CloseEditor(evt=None)

Close the editor and save the new value to the ListCtrl.

OnChar(event)

Catch the TAB, Shift-TAB, cursor DOWN/UP key code so we can open the editor at the next column (if any).

OnItemSelected(evt)
OnLeftDown(evt=None)

Examine the click and double click events to see if a row has been click on twice. If so, determine the current row and columnn and open the editor.

OpenEditor(col, row)

Opens an editor at the current position.

editorBgColour = wx.Colour(255, 255, 175, 255)
editorFgColour = wx.Colour(0, 0, 0, 255)
makeColumnEditable(col)
make_editor(col_style=0)