X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a95a71334ccdc0377a515e1a23529930e7d86ac9..dd0138d9a4635a031a12ed9322d1a3d725faaaf6:/wxPython/contrib/gizmos/msw/gizmos.py diff --git a/wxPython/contrib/gizmos/msw/gizmos.py b/wxPython/contrib/gizmos/msw/gizmos.py index ae11e0a72d..1ef3379e6a 100644 --- a/wxPython/contrib/gizmos/msw/gizmos.py +++ b/wxPython/contrib/gizmos/msw/gizmos.py @@ -1,18 +1,65 @@ # This file was created automatically by SWIG. # Don't modify this file, modify the SWIG interface instead. +""" +Various *gizmo* classes: `DynamicSashWindow`, `EditableListBox`, +`LEDNumberCtrl`, `TreeListCtrl`, etc. +""" + import _gizmos -import windows -import core -import controls -wx = core -__docfilter__ = wx.__docfilter__ -wxEVT_DYNAMIC_SASH_SPLIT = _gizmos.wxEVT_DYNAMIC_SASH_SPLIT -wxEVT_DYNAMIC_SASH_UNIFY = _gizmos.wxEVT_DYNAMIC_SASH_UNIFY +def _swig_setattr_nondynamic(self,class_type,name,value,static=1): + if (name == "this"): + if isinstance(value, class_type): + self.__dict__[name] = value.this + if hasattr(value,"thisown"): self.__dict__["thisown"] = value.thisown + del value.thisown + return + method = class_type.__swig_setmethods__.get(name,None) + if method: return method(self,value) + if (not static) or hasattr(self,name) or (name == "thisown"): + self.__dict__[name] = value + else: + raise AttributeError("You cannot add attributes to %s" % self) + +def _swig_setattr(self,class_type,name,value): + return _swig_setattr_nondynamic(self,class_type,name,value,0) + +def _swig_getattr(self,class_type,name): + method = class_type.__swig_getmethods__.get(name,None) + if method: return method(self) + raise AttributeError,name + +import types +try: + _object = types.ObjectType + _newclass = 1 +except AttributeError: + class _object : pass + _newclass = 0 +del types + + +def _swig_setattr_nondynamic_method(set): + def set_attr(self,name,value): + if hasattr(self,name) or (name in ("this", "thisown")): + set(self,name,value) + else: + raise AttributeError("You cannot add attributes to %s" % self) + return set_attr + + +import _windows +import _core +import _controls +import wx +__docfilter__ = wx._core.__DocFilter(globals()) DS_MANAGE_SCROLLBARS = _gizmos.DS_MANAGE_SCROLLBARS DS_DRAG_CORNER = _gizmos.DS_DRAG_CORNER -class DynamicSashSplitEvent(core.CommandEvent): +wxEVT_DYNAMIC_SASH_SPLIT = _gizmos.wxEVT_DYNAMIC_SASH_SPLIT +wxEVT_DYNAMIC_SASH_UNIFY = _gizmos.wxEVT_DYNAMIC_SASH_UNIFY +class DynamicSashSplitEvent(_core.CommandEvent): + """Proxy of C++ DynamicSashSplitEvent class""" def __repr__(self): return "<%s.%s; proxy of C++ wxDynamicSashSplitEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): @@ -33,7 +80,8 @@ DynamicSashNameStr = cvar.DynamicSashNameStr EditableListBoxNameStr = cvar.EditableListBoxNameStr TreeListCtrlNameStr = cvar.TreeListCtrlNameStr -class DynamicSashUnifyEvent(core.CommandEvent): +class DynamicSashUnifyEvent(_core.CommandEvent): + """Proxy of C++ DynamicSashUnifyEvent class""" def __repr__(self): return "<%s.%s; proxy of C++ wxDynamicSashUnifyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): @@ -50,13 +98,14 @@ class DynamicSashUnifyEventPtr(DynamicSashUnifyEvent): self.__class__ = DynamicSashUnifyEvent _gizmos.DynamicSashUnifyEvent_swigregister(DynamicSashUnifyEventPtr) -class DynamicSashWindow(core.Window): +class DynamicSashWindow(_core.Window): + """Proxy of C++ DynamicSashWindow class""" def __repr__(self): return "<%s.%s; proxy of C++ wxDynamicSashWindow instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): """ - __init__(self, Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize, - long style=wxCLIP_CHILDREN|wxDS_MANAGE_SCROLLBARS|wxDS_DRAG_CORNER, + __init__(self, Window parent, int id=-1, Point pos=DefaultPosition, + Size size=DefaultSize, long style=wxCLIP_CHILDREN|wxDS_MANAGE_SCROLLBARS|wxDS_DRAG_CORNER, String name=DynamicSashNameStr) -> DynamicSashWindow """ newobj = _gizmos.new_DynamicSashWindow(*args, **kwargs) @@ -67,8 +116,8 @@ class DynamicSashWindow(core.Window): def Create(*args, **kwargs): """ - Create(self, Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize, - long style=wxCLIP_CHILDREN|wxDS_MANAGE_SCROLLBARS|wxDS_DRAG_CORNER, + Create(self, Window parent, int id=-1, Point pos=DefaultPosition, + Size size=DefaultSize, long style=wxCLIP_CHILDREN|wxDS_MANAGE_SCROLLBARS|wxDS_DRAG_CORNER, String name=DynamicSashNameStr) -> bool """ return _gizmos.DynamicSashWindow_Create(*args, **kwargs) @@ -101,13 +150,15 @@ EVT_DYNAMIC_SASH_UNIFY = wx.PyEventBinder( wxEVT_DYNAMIC_SASH_UNIFY, 1 ) EL_ALLOW_NEW = _gizmos.EL_ALLOW_NEW EL_ALLOW_EDIT = _gizmos.EL_ALLOW_EDIT EL_ALLOW_DELETE = _gizmos.EL_ALLOW_DELETE -class EditableListBox(windows.Panel): +class EditableListBox(_windows.Panel): + """Proxy of C++ EditableListBox class""" def __repr__(self): return "<%s.%s; proxy of C++ wxEditableListBox instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): """ - __init__(self, Window parent, int id, String label, Point pos=DefaultPosition, - Size size=DefaultSize, long style=wxEL_ALLOW_NEW|wxEL_ALLOW_EDIT|wxEL_ALLOW_DELETE, + __init__(self, Window parent, int id=-1, String label=EmptyString, + Point pos=DefaultPosition, Size size=DefaultSize, + long style=wxEL_ALLOW_NEW|wxEL_ALLOW_EDIT|wxEL_ALLOW_DELETE, String name=EditableListBoxNameStr) -> EditableListBox """ newobj = _gizmos.new_EditableListBox(*args, **kwargs) @@ -125,7 +176,7 @@ class EditableListBox(windows.Panel): return _gizmos.EditableListBox_GetStrings(*args, **kwargs) def GetListCtrl(*args, **kwargs): - """GetListCtrl(self) -> wxListCtrl""" + """GetListCtrl(self) -> ListCtrl""" return _gizmos.EditableListBox_GetListCtrl(*args, **kwargs) def GetDelButton(*args, **kwargs): @@ -156,7 +207,8 @@ class EditableListBoxPtr(EditableListBox): self.__class__ = EditableListBox _gizmos.EditableListBox_swigregister(EditableListBoxPtr) -class RemotelyScrolledTreeCtrl(controls.TreeCtrl): +class RemotelyScrolledTreeCtrl(_controls.TreeCtrl): + """Proxy of C++ RemotelyScrolledTreeCtrl class""" def __repr__(self): return "<%s.%s; proxy of C++ wxRemotelyScrolledTreeCtrl instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): @@ -202,7 +254,8 @@ class RemotelyScrolledTreeCtrlPtr(RemotelyScrolledTreeCtrl): self.__class__ = RemotelyScrolledTreeCtrl _gizmos.RemotelyScrolledTreeCtrl_swigregister(RemotelyScrolledTreeCtrlPtr) -class TreeCompanionWindow(core.Window): +class TreeCompanionWindow(_core.Window): + """Proxy of C++ TreeCompanionWindow class""" def __repr__(self): return "<%s.%s; proxy of C++ wxPyTreeCompanionWindow instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): @@ -236,7 +289,8 @@ class TreeCompanionWindowPtr(TreeCompanionWindow): self.__class__ = TreeCompanionWindow _gizmos.TreeCompanionWindow_swigregister(TreeCompanionWindowPtr) -class ThinSplitterWindow(windows.SplitterWindow): +class ThinSplitterWindow(_windows.SplitterWindow): + """Proxy of C++ ThinSplitterWindow class""" def __repr__(self): return "<%s.%s; proxy of C++ wxThinSplitterWindow instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): @@ -258,7 +312,8 @@ class ThinSplitterWindowPtr(ThinSplitterWindow): self.__class__ = ThinSplitterWindow _gizmos.ThinSplitterWindow_swigregister(ThinSplitterWindowPtr) -class SplitterScrolledWindow(windows.ScrolledWindow): +class SplitterScrolledWindow(_windows.ScrolledWindow): + """Proxy of C++ SplitterScrolledWindow class""" def __repr__(self): return "<%s.%s; proxy of C++ wxSplitterScrolledWindow instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): @@ -285,7 +340,8 @@ LED_ALIGN_RIGHT = _gizmos.LED_ALIGN_RIGHT LED_ALIGN_CENTER = _gizmos.LED_ALIGN_CENTER LED_ALIGN_MASK = _gizmos.LED_ALIGN_MASK LED_DRAW_FADED = _gizmos.LED_DRAW_FADED -class LEDNumberCtrl(core.Control): +class LEDNumberCtrl(_core.Control): + """Proxy of C++ LEDNumberCtrl class""" def __repr__(self): return "<%s.%s; proxy of C++ wxLEDNumberCtrl instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): @@ -303,6 +359,8 @@ class LEDNumberCtrl(core.Control): """ Create(self, Window parent, int id=-1, Point pos=DefaultPosition, Size size=DefaultSize, long style=wxLED_ALIGN_LEFT|wxLED_DRAW_FADED) -> bool + + Do the 2nd phase and create the GUI control. """ return _gizmos.LEDNumberCtrl_Create(*args, **kwargs) @@ -319,15 +377,15 @@ class LEDNumberCtrl(core.Control): return _gizmos.LEDNumberCtrl_GetValue(*args, **kwargs) def SetAlignment(*args, **kwargs): - """SetAlignment(self, int Alignment, bool Redraw=true)""" + """SetAlignment(self, int Alignment, bool Redraw=True)""" return _gizmos.LEDNumberCtrl_SetAlignment(*args, **kwargs) def SetDrawFaded(*args, **kwargs): - """SetDrawFaded(self, bool DrawFaded, bool Redraw=true)""" + """SetDrawFaded(self, bool DrawFaded, bool Redraw=True)""" return _gizmos.LEDNumberCtrl_SetDrawFaded(*args, **kwargs) def SetValue(*args, **kwargs): - """SetValue(self, String Value, bool Redraw=true)""" + """SetValue(self, String Value, bool Redraw=True)""" return _gizmos.LEDNumberCtrl_SetValue(*args, **kwargs) @@ -348,18 +406,30 @@ TL_ALIGN_LEFT = _gizmos.TL_ALIGN_LEFT TL_ALIGN_RIGHT = _gizmos.TL_ALIGN_RIGHT TL_ALIGN_CENTER = _gizmos.TL_ALIGN_CENTER TREE_HITTEST_ONITEMCOLUMN = _gizmos.TREE_HITTEST_ONITEMCOLUMN -class TreeListColumnInfo(core.Object): +TL_SEARCH_VISIBLE = _gizmos.TL_SEARCH_VISIBLE +TL_SEARCH_LEVEL = _gizmos.TL_SEARCH_LEVEL +TL_SEARCH_FULL = _gizmos.TL_SEARCH_FULL +TL_SEARCH_PARTIAL = _gizmos.TL_SEARCH_PARTIAL +TL_SEARCH_NOCASE = _gizmos.TL_SEARCH_NOCASE +TR_DONT_ADJUST_MAC = _gizmos.TR_DONT_ADJUST_MAC +wx.TR_DONT_ADJUST_MAC = TR_DONT_ADJUST_MAC +class TreeListColumnInfo(_core.Object): + """Proxy of C++ TreeListColumnInfo class""" def __repr__(self): return "<%s.%s; proxy of C++ wxTreeListColumnInfo instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): """ __init__(self, String text=EmptyString, int image=-1, size_t width=100, - int alignment=TL_ALIGN_LEFT) -> TreeListColumnInfo + bool shown=True, int alignment=TL_ALIGN_LEFT) -> TreeListColumnInfo """ newobj = _gizmos.new_TreeListColumnInfo(*args, **kwargs) self.this = newobj.this self.thisown = 1 del newobj.thisown + def GetShown(*args, **kwargs): + """GetShown(self) -> bool""" + return _gizmos.TreeListColumnInfo_GetShown(*args, **kwargs) + def GetAlignment(*args, **kwargs): """GetAlignment(self) -> int""" return _gizmos.TreeListColumnInfo_GetAlignment(*args, **kwargs) @@ -380,6 +450,10 @@ class TreeListColumnInfo(core.Object): """GetWidth(self) -> size_t""" return _gizmos.TreeListColumnInfo_GetWidth(*args, **kwargs) + def SetShown(*args, **kwargs): + """SetShown(self, bool shown)""" + return _gizmos.TreeListColumnInfo_SetShown(*args, **kwargs) + def SetAlignment(*args, **kwargs): """SetAlignment(self, int alignment)""" return _gizmos.TreeListColumnInfo_SetAlignment(*args, **kwargs) @@ -408,7 +482,8 @@ class TreeListColumnInfoPtr(TreeListColumnInfo): self.__class__ = TreeListColumnInfo _gizmos.TreeListColumnInfo_swigregister(TreeListColumnInfoPtr) -class TreeListCtrl(core.Control): +class TreeListCtrl(_core.Control): + """Proxy of C++ TreeListCtrl class""" def __repr__(self): return "<%s.%s; proxy of C++ wxPyTreeListCtrl instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): @@ -451,14 +526,6 @@ class TreeListCtrl(core.Control): """SetIndent(self, unsigned int indent)""" return _gizmos.TreeListCtrl_SetIndent(*args, **kwargs) - def GetSpacing(*args, **kwargs): - """GetSpacing(self) -> unsigned int""" - return _gizmos.TreeListCtrl_GetSpacing(*args, **kwargs) - - def SetSpacing(*args, **kwargs): - """SetSpacing(self, unsigned int spacing)""" - return _gizmos.TreeListCtrl_SetSpacing(*args, **kwargs) - def GetLineSpacing(*args, **kwargs): """GetLineSpacing(self) -> unsigned int""" return _gizmos.TreeListCtrl_GetLineSpacing(*args, **kwargs) @@ -575,6 +642,14 @@ class TreeListCtrl(core.Control): """GetColumnImage(self, size_t column) -> int""" return _gizmos.TreeListCtrl_GetColumnImage(*args, **kwargs) + def ShowColumn(*args, **kwargs): + """ShowColumn(self, size_t column, bool shown)""" + return _gizmos.TreeListCtrl_ShowColumn(*args, **kwargs) + + def IsColumnShown(*args, **kwargs): + """IsColumnShown(self, size_t column) -> bool""" + return _gizmos.TreeListCtrl_IsColumnShown(*args, **kwargs) + def GetItemText(*args, **kwargs): """GetItemText(self, TreeItemId item, int column=-1) -> String""" return _gizmos.TreeListCtrl_GetItemText(*args, **kwargs) @@ -618,11 +693,11 @@ class TreeListCtrl(core.Control): return _gizmos.TreeListCtrl_SetItemBold(*args, **kwargs) def SetItemTextColour(*args, **kwargs): - """SetItemTextColour(self, TreeItemId item, Colour col)""" + """SetItemTextColour(self, TreeItemId item, Colour colour)""" return _gizmos.TreeListCtrl_SetItemTextColour(*args, **kwargs) def SetItemBackgroundColour(*args, **kwargs): - """SetItemBackgroundColour(self, TreeItemId item, Colour col)""" + """SetItemBackgroundColour(self, TreeItemId item, Colour colour)""" return _gizmos.TreeListCtrl_SetItemBackgroundColour(*args, **kwargs) def SetItemFont(*args, **kwargs): @@ -690,7 +765,7 @@ class TreeListCtrl(core.Control): return _gizmos.TreeListCtrl_GetFirstChild(*args, **kwargs) def GetNextChild(*args, **kwargs): - """GetNextChild(self, TreeItemId item, long cookie) -> PyObject""" + """GetNextChild(self, TreeItemId item, void cookie) -> PyObject""" return _gizmos.TreeListCtrl_GetNextChild(*args, **kwargs) def GetLastChild(*args, **kwargs): @@ -797,6 +872,10 @@ class TreeListCtrl(core.Control): """SelectItem(self, TreeItemId item, bool unselect_others=True, bool extended_select=False)""" return _gizmos.TreeListCtrl_SelectItem(*args, **kwargs) + def SelectAll(*args, **kwargs): + """SelectAll(self, bool extended_select=False)""" + return _gizmos.TreeListCtrl_SelectAll(*args, **kwargs) + def EnsureVisible(*args, **kwargs): """EnsureVisible(self, TreeItemId item)""" return _gizmos.TreeListCtrl_EnsureVisible(*args, **kwargs) @@ -825,20 +904,16 @@ class TreeListCtrl(core.Control): """SortChildren(self, TreeItemId item)""" return _gizmos.TreeListCtrl_SortChildren(*args, **kwargs) - def GetItemSelectedImage(*args, **kwargs): - """GetItemSelectedImage(self, TreeItemId item) -> int""" - return _gizmos.TreeListCtrl_GetItemSelectedImage(*args, **kwargs) - - def SetItemSelectedImage(*args, **kwargs): - """SetItemSelectedImage(self, TreeItemId item, int image)""" - return _gizmos.TreeListCtrl_SetItemSelectedImage(*args, **kwargs) + def FindItem(*args, **kwargs): + """FindItem(self, TreeItemId item, String str, int flags=0) -> TreeItemId""" + return _gizmos.TreeListCtrl_FindItem(*args, **kwargs) def GetHeaderWindow(*args, **kwargs): """GetHeaderWindow(self) -> Window""" return _gizmos.TreeListCtrl_GetHeaderWindow(*args, **kwargs) def GetMainWindow(*args, **kwargs): - """GetMainWindow(self) -> Window""" + """GetMainWindow(self) -> ScrolledWindow""" return _gizmos.TreeListCtrl_GetMainWindow(*args, **kwargs)