Package diffpy :: Package pdfgui :: Package gui :: Package wxExtensions :: Module listctrls :: Class ColumnSortListCtrl
[hide private]
[frames] | no frames]

Class ColumnSortListCtrl

source code

                   object --+                        
                            |                        
              wx._core.Object --+                    
                                |                    
              wx._core.EvtHandler --+                
                                    |                
                      wx._core.Window --+            
                                        |            
                         wx._core.Control --+        
                                            |        
                        wx._controls.ListCtrl --+    
                                                |    
wx.lib.mixins.listctrl.ListCtrlAutoWidthMixin --+    
                                                |    
                                AutoWidthListCtrl --+
                                                    |
         wx.lib.mixins.listctrl.ColumnSorterMixin --+
                                                    |
                                                   ColumnSortListCtrl
Known Subclasses:
KeyEventsListCtrl

AutoWidthListCtrl subclass that sorts its columns when the column header
is pressed.

This ListCtrl requires an itemDataMap member dictionary to be initialized
before the sorting capabilites can be realized. This dictionary simply references
the ListCtrl's entries by a unique number. This number must be stored as the
ItemData (with SetItemData) of the entry.  The member data must be in the
form of a tuple, where the tuple has a number of entries as the ListCtrl has
columns. The sorting routine sorts the items in the ListCtrl by the entries
in this tuple.



Instance Methods [hide private]
 
__init__(self, parent, ID, pos=wx.Point(-1, -1), size=wx.Size(-1, -1), style=0, *args, **kwargs)
__init__(self, Window parent, int id=-1, Point pos=DefaultPosition, ...
source code
 
GetListCtrl(self)
This method is required by the sorter mixin.
source code
 
initializeSorter(self)
Initialize the column sorter mixin after the ListCtrl is filled.
source code
 
makeIDM(self)
This method automatically sets up the itemDataMap.
source code

Inherited from AutoWidthListCtrl: clearSelections, setSelection

Inherited from wx._controls.ListCtrl: Append, Arrange, AssignImageList, ClearAll, ClearColumnImage, Create, DeleteAllColumns, DeleteAllItems, DeleteColumn, DeleteItem, EditLabel, EnsureVisible, FindItem, FindItemAtPos, FindItemData, Focus, GetColumn, GetColumnCount, GetColumnWidth, GetCountPerPage, GetEditControl, GetFirstSelected, GetFocusedItem, GetImageList, GetItem, GetItemBackgroundColour, GetItemCount, GetItemData, GetItemFont, GetItemPosition, GetItemRect, GetItemSpacing, GetItemState, GetItemText, GetItemTextColour, GetMainWindow, GetNextItem, GetNextSelected, GetSelectedItemCount, GetTextColour, GetTopItem, GetViewRect, HitTest, HitTestSubItem, InReportView, InsertColumn, InsertColumnInfo, InsertColumnItem, InsertImageItem, InsertImageStringItem, InsertItem, InsertStringItem, IsSelected, IsVirtual, RefreshItem, RefreshItems, ScrollList, Select, SetColumn, SetColumnImage, SetColumnWidth, SetImageList, SetItem, SetItemBackgroundColour, SetItemColumnImage, SetItemCount, SetItemData, SetItemFont, SetItemImage, SetItemPosition, SetItemSpacing, SetItemState, SetItemText, SetItemTextColour, SetSingleStyle, SetStringItem, SetTextColour, SortItems, __repr__

Inherited from wx._controls.ListCtrl (private): _setCallbackInfo

Inherited from wx._core.Control: Command, GetAlignment, GetLabelText

Inherited from wx._core.Window: AcceptsFocus, AcceptsFocusFromKeyboard, AddChild, AdjustForLayoutDirection, AssociateHandle, CacheBestSize, CanSetTransparent, CaptureMouse, Center, CenterOnParent, Centre, CentreOnParent, ClearBackground, ClientToScreen, ClientToScreenXY, Close, ConvertDialogPointToPixels, ConvertDialogSizeToPixels, ConvertPixelPointToDialog, ConvertPixelSizeToDialog, DLG_PNT, DLG_SZE, Destroy, DestroyChildren, Disable, DissociateHandle, DragAcceptFiles, Enable, FindWindowById, FindWindowByName, Fit, FitInside, Freeze, GetAcceleratorTable, GetAdjustedBestSize, GetAutoLayout, GetBackgroundColour, GetBackgroundStyle, GetBestFittingSize, GetBestSize, GetBestSizeTuple, GetBestVirtualSize, GetBorder, GetCaret, GetCharHeight, GetCharWidth, GetChildren, GetClientAreaOrigin, GetClientRect, GetClientSize, GetClientSizeTuple, GetConstraints, GetContainingSizer, GetCursor, GetDefaultAttributes, GetDropTarget, GetEffectiveMinSize, GetEventHandler, GetExtraStyle, GetFont, GetForegroundColour, GetFullTextExtent, GetGrandParent, GetGtkWidget, GetHandle, GetHelpText, GetHelpTextAtPoint, GetId, GetLabel, GetLayoutDirection, GetMaxHeight, GetMaxSize, GetMaxWidth, GetMinHeight, GetMinSize, GetMinWidth, GetName, GetParent, GetPosition, GetPositionTuple, GetRect, GetScreenPosition, GetScreenPositionTuple, GetScreenRect, GetScrollPos, GetScrollRange, GetScrollThumb, GetSize, GetSizeTuple, GetSizer, GetTextExtent, GetThemeEnabled, GetToolTip, GetTopLevelParent, GetUpdateClientRect, GetUpdateRegion, GetValidator, GetVirtualSize, GetVirtualSizeTuple, GetWindowBorderSize, GetWindowStyle, GetWindowStyleFlag, GetWindowVariant, HasCapture, HasFlag, HasMultiplePages, HasScrollbar, HasTransparentBackground, Hide, HitTestXY, InheritAttributes, InheritsBackgroundColour, InitDialog, InvalidateBestSize, IsBeingDeleted, IsDoubleBuffered, IsEnabled, IsExposed, IsExposedPoint, IsExposedRect, IsFrozen, IsRetained, IsShown, IsShownOnScreen, IsTopLevel, Layout, LineDown, LineUp, Lower, MakeModal, Move, MoveAfterInTabOrder, MoveBeforeInTabOrder, MoveXY, Navigate, PageDown, PageUp, PopEventHandler, PopupMenu, PopupMenuXY, PostCreate, PrepareDC, PushEventHandler, Raise, Refresh, RefreshRect, RegisterHotKey, ReleaseMouse, RemoveChild, RemoveEventHandler, Reparent, ScreenToClient, ScreenToClientXY, ScrollLines, ScrollPages, ScrollWindow, SendSizeEvent, SetAcceleratorTable, SetAutoLayout, SetBackgroundColour, SetBackgroundStyle, SetBestFittingSize, SetCaret, SetClientRect, SetClientSize, SetClientSizeWH, SetConstraints, SetContainingSizer, SetCursor, SetDimensions, SetDoubleBuffered, SetDropTarget, SetEventHandler, SetExtraStyle, SetFocus, SetFocusFromKbd, SetFont, SetForegroundColour, SetHelpText, SetHelpTextForId, SetId, SetInitialSize, SetLabel, SetLayoutDirection, SetMaxSize, SetMinSize, SetName, SetOwnBackgroundColour, SetOwnFont, SetOwnForegroundColour, SetPosition, SetRect, SetScrollPos, SetScrollbar, SetSize, SetSizeHints, SetSizeHintsSz, SetSizeWH, SetSizer, SetSizerAndFit, SetThemeEnabled, SetToolTip, SetToolTipString, SetTransparent, SetValidator, SetVirtualSize, SetVirtualSizeHints, SetVirtualSizeHintsSz, SetVirtualSizeWH, SetWindowStyle, SetWindowStyleFlag, SetWindowVariant, ShouldInheritColours, Show, Thaw, ToggleWindowStyle, TransferDataFromWindow, TransferDataToWindow, UnregisterHotKey, Update, UpdateWindowUI, UseBgCol, Validate, WarpPointer

Inherited from wx._core.EvtHandler: AddPendingEvent, Bind, Connect, Disconnect, GetEvtHandlerEnabled, GetNextHandler, GetPreviousHandler, ProcessEvent, ProcessPendingEvents, SetEvtHandlerEnabled, SetNextHandler, SetPreviousHandler, Unbind

Inherited from wx._core.EvtHandler (private): _setOORInfo

Inherited from wx._core.Object: GetClassName, IsSameAs

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __str__

Inherited from wx.lib.mixins.listctrl.ListCtrlAutoWidthMixin: resizeColumn, resizeLastColumn, setResizeColumn

Inherited from wx.lib.mixins.listctrl.ListCtrlAutoWidthMixin (private): _doResize, _onResize

Inherited from wx.lib.mixins.listctrl.ColumnSorterMixin: GetColumnSorter, GetColumnWidths, GetSecondarySortValues, GetSortImages, OnSortOrderChanged, SetColumnCount, SortListItems

Static Methods [hide private]

Inherited from wx._controls.ListCtrl: GetClassDefaultAttributes

Inherited from wx._core.Window: FindFocus, GetCapture, NewControlId, NextControlId, PrevControlId

Properties [hide private]

Inherited from wx._controls.ListCtrl: ColumnCount, CountPerPage, EditControl, FocusedItem, ItemCount, MainWindow, SelectedItemCount, TextColour, TopItem, ViewRect, thisown

Inherited from wx._core.Control: Alignment, LabelText

Inherited from wx._core.Window: AcceleratorTable, AutoLayout, BackgroundColour, BackgroundStyle, BestSize, BestVirtualSize, Border, Caret, CharHeight, CharWidth, Children, ClientAreaOrigin, ClientRect, ClientSize, Constraints, ContainingSizer, Cursor, DefaultAttributes, DropTarget, EffectiveMinSize, Enabled, EventHandler, ExtraStyle, Font, ForegroundColour, GrandParent, GtkWidget, Handle, HelpText, Id, Label, LayoutDirection, MaxHeight, MaxSize, MaxWidth, MinHeight, MinSize, MinWidth, Name, Parent, Position, Rect, ScreenPosition, ScreenRect, Shown, Size, Sizer, ThemeEnabled, ToolTip, TopLevel, TopLevelParent, UpdateClientRect, UpdateRegion, Validator, VirtualSize, WindowStyle, WindowStyleFlag, WindowVariant

Inherited from wx._core.EvtHandler: EvtHandlerEnabled, NextHandler, PreviousHandler

Inherited from wx._core.Object: ClassName

Inherited from object: __class__

Method Details [hide private]

__init__(self, parent, ID, pos=wx.Point(-1, -1), size=wx.Size(-1, -1), style=0, *args, **kwargs)
(Constructor)

source code 

__init__(self, Window parent, int id=-1, Point pos=DefaultPosition, 
    Size size=DefaultSize, long style=LC_ICON, 
    Validator validator=DefaultValidator, String name=ListCtrlNameStr) -> ListCtrl

Overrides: AutoWidthListCtrl.__init__

initializeSorter(self)

source code 
Initialize the column sorter mixin after the ListCtrl is filled.

This method must be called whenever the itemDataMap is altered.

makeIDM(self)

source code 
This method automatically sets up the itemDataMap.

The itemDataMap gets filled with the current ListCtrl entries. The
itemDataMap does not update automatically when the list is changed. To
update the itemDataMap this method must be called again.
initializeSorter should be called after a call to this method.