]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/contrib/gizmos/mac/gizmos.py
fixed improper (long) casts
[wxWidgets.git] / wxPython / contrib / gizmos / mac / gizmos.py
index 107bedf7d4cbf7207d1f4c7e1edf50ab766cc478..f455fc70ca8e4ca25ee731cf5ef131b79b3964e4 100644 (file)
@@ -8,16 +8,58 @@ Various *gizmo* classes: `DynamicSashWindow`, `EditableListBox`,
 
 import _gizmos
 
 
 import _gizmos
 
+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 _windows
 import _core
 import _controls
-wx = _core 
-__docfilter__ = wx.__DocFilter(globals()) 
-wxEVT_DYNAMIC_SASH_SPLIT = _gizmos.wxEVT_DYNAMIC_SASH_SPLIT
-wxEVT_DYNAMIC_SASH_UNIFY = _gizmos.wxEVT_DYNAMIC_SASH_UNIFY
+import wx 
+__docfilter__ = wx._core.__DocFilter(globals()) 
 DS_MANAGE_SCROLLBARS = _gizmos.DS_MANAGE_SCROLLBARS
 DS_DRAG_CORNER = _gizmos.DS_DRAG_CORNER
 DS_MANAGE_SCROLLBARS = _gizmos.DS_MANAGE_SCROLLBARS
 DS_DRAG_CORNER = _gizmos.DS_DRAG_CORNER
+wxEVT_DYNAMIC_SASH_SPLIT = _gizmos.wxEVT_DYNAMIC_SASH_SPLIT
+wxEVT_DYNAMIC_SASH_UNIFY = _gizmos.wxEVT_DYNAMIC_SASH_UNIFY
 class DynamicSashSplitEvent(_core.CommandEvent):
 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):
     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):
@@ -37,8 +79,10 @@ cvar = _gizmos.cvar
 DynamicSashNameStr = cvar.DynamicSashNameStr
 EditableListBoxNameStr = cvar.EditableListBoxNameStr
 TreeListCtrlNameStr = cvar.TreeListCtrlNameStr
 DynamicSashNameStr = cvar.DynamicSashNameStr
 EditableListBoxNameStr = cvar.EditableListBoxNameStr
 TreeListCtrlNameStr = cvar.TreeListCtrlNameStr
+StaticPictureNameStr = cvar.StaticPictureNameStr
 
 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):
     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):
@@ -56,12 +100,13 @@ class DynamicSashUnifyEventPtr(DynamicSashUnifyEvent):
 _gizmos.DynamicSashUnifyEvent_swigregister(DynamicSashUnifyEventPtr)
 
 class DynamicSashWindow(_core.Window):
 _gizmos.DynamicSashUnifyEvent_swigregister(DynamicSashUnifyEventPtr)
 
 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):
         """
     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)
             String name=DynamicSashNameStr) -> DynamicSashWindow
         """
         newobj = _gizmos.new_DynamicSashWindow(*args, **kwargs)
@@ -72,8 +117,8 @@ class DynamicSashWindow(_core.Window):
 
     def Create(*args, **kwargs):
         """
 
     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)
             String name=DynamicSashNameStr) -> bool
         """
         return _gizmos.DynamicSashWindow_Create(*args, **kwargs)
@@ -107,12 +152,14 @@ 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):
 EL_ALLOW_EDIT = _gizmos.EL_ALLOW_EDIT
 EL_ALLOW_DELETE = _gizmos.EL_ALLOW_DELETE
 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):
         """
     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)
             String name=EditableListBoxNameStr) -> EditableListBox
         """
         newobj = _gizmos.new_EditableListBox(*args, **kwargs)
@@ -130,7 +177,7 @@ class EditableListBox(_windows.Panel):
         return _gizmos.EditableListBox_GetStrings(*args, **kwargs)
 
     def GetListCtrl(*args, **kwargs):
         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):
         return _gizmos.EditableListBox_GetListCtrl(*args, **kwargs)
 
     def GetDelButton(*args, **kwargs):
@@ -162,6 +209,7 @@ class EditableListBoxPtr(EditableListBox):
 _gizmos.EditableListBox_swigregister(EditableListBoxPtr)
 
 class RemotelyScrolledTreeCtrl(_controls.TreeCtrl):
 _gizmos.EditableListBox_swigregister(EditableListBoxPtr)
 
 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):
     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):
@@ -208,6 +256,7 @@ class RemotelyScrolledTreeCtrlPtr(RemotelyScrolledTreeCtrl):
 _gizmos.RemotelyScrolledTreeCtrl_swigregister(RemotelyScrolledTreeCtrlPtr)
 
 class TreeCompanionWindow(_core.Window):
 _gizmos.RemotelyScrolledTreeCtrl_swigregister(RemotelyScrolledTreeCtrlPtr)
 
 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):
     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):
@@ -242,6 +291,7 @@ class TreeCompanionWindowPtr(TreeCompanionWindow):
 _gizmos.TreeCompanionWindow_swigregister(TreeCompanionWindowPtr)
 
 class ThinSplitterWindow(_windows.SplitterWindow):
 _gizmos.TreeCompanionWindow_swigregister(TreeCompanionWindowPtr)
 
 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):
     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):
@@ -264,6 +314,7 @@ class ThinSplitterWindowPtr(ThinSplitterWindow):
 _gizmos.ThinSplitterWindow_swigregister(ThinSplitterWindowPtr)
 
 class SplitterScrolledWindow(_windows.ScrolledWindow):
 _gizmos.ThinSplitterWindow_swigregister(ThinSplitterWindowPtr)
 
 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):
     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):
@@ -291,6 +342,7 @@ 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):
 LED_ALIGN_MASK = _gizmos.LED_ALIGN_MASK
 LED_DRAW_FADED = _gizmos.LED_DRAW_FADED
 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):
     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):
@@ -308,6 +360,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
         """
         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)
 
         """
         return _gizmos.LEDNumberCtrl_Create(*args, **kwargs)
 
@@ -324,15 +378,15 @@ class LEDNumberCtrl(_core.Control):
         return _gizmos.LEDNumberCtrl_GetValue(*args, **kwargs)
 
     def SetAlignment(*args, **kwargs):
         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):
         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):
         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)
 
 
         return _gizmos.LEDNumberCtrl_SetValue(*args, **kwargs)
 
 
@@ -358,7 +412,10 @@ 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
 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):
 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):
     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):
@@ -427,6 +484,7 @@ class TreeListColumnInfoPtr(TreeListColumnInfo):
 _gizmos.TreeListColumnInfo_swigregister(TreeListColumnInfoPtr)
 
 class TreeListCtrl(_core.Control):
 _gizmos.TreeListColumnInfo_swigregister(TreeListColumnInfoPtr)
 
 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):
     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):
@@ -856,7 +914,7 @@ class TreeListCtrl(_core.Control):
         return _gizmos.TreeListCtrl_GetHeaderWindow(*args, **kwargs)
 
     def GetMainWindow(*args, **kwargs):
         return _gizmos.TreeListCtrl_GetHeaderWindow(*args, **kwargs)
 
     def GetMainWindow(*args, **kwargs):
-        """GetMainWindow(self) -> Window"""
+        """GetMainWindow(self) -> ScrolledWindow"""
         return _gizmos.TreeListCtrl_GetMainWindow(*args, **kwargs)
 
 
         return _gizmos.TreeListCtrl_GetMainWindow(*args, **kwargs)
 
 
@@ -873,4 +931,86 @@ def PreTreeListCtrl(*args, **kwargs):
     val.thisown = 1
     return val
 
     val.thisown = 1
     return val
 
+SCALE_HORIZONTAL = _gizmos.SCALE_HORIZONTAL
+SCALE_VERTICAL = _gizmos.SCALE_VERTICAL
+SCALE_UNIFORM = _gizmos.SCALE_UNIFORM
+SCALE_CUSTOM = _gizmos.SCALE_CUSTOM
+class StaticPicture(_core.Control):
+    """Proxy of C++ StaticPicture class"""
+    def __repr__(self):
+        return "<%s.%s; proxy of C++ wxStaticPicture instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
+    def __init__(self, *args, **kwargs):
+        """
+        __init__(self, Window parent, int id=-1, Bitmap label=wxNullBitmap, 
+            Point pos=DefaultPosition, Size size=DefaultSize, 
+            long style=0, String name=StaticPictureNameStr) -> StaticPicture
+        """
+        newobj = _gizmos.new_StaticPicture(*args, **kwargs)
+        self.this = newobj.this
+        self.thisown = 1
+        del newobj.thisown
+        self._setOORInfo(self)
+
+    def Create(*args, **kwargs):
+        """
+        Create(self, Window parent, int id=-1, Bitmap label=wxNullBitmap, 
+            Point pos=DefaultPosition, Size size=DefaultSize, 
+            long style=0, String name=StaticPictureNameStr) -> bool
+        """
+        return _gizmos.StaticPicture_Create(*args, **kwargs)
+
+    def SetBitmap(*args, **kwargs):
+        """SetBitmap(self, Bitmap bmp)"""
+        return _gizmos.StaticPicture_SetBitmap(*args, **kwargs)
+
+    def GetBitmap(*args, **kwargs):
+        """GetBitmap(self) -> Bitmap"""
+        return _gizmos.StaticPicture_GetBitmap(*args, **kwargs)
+
+    def SetIcon(*args, **kwargs):
+        """SetIcon(self, Icon icon)"""
+        return _gizmos.StaticPicture_SetIcon(*args, **kwargs)
+
+    def GetIcon(*args, **kwargs):
+        """GetIcon(self) -> Icon"""
+        return _gizmos.StaticPicture_GetIcon(*args, **kwargs)
+
+    def SetAlignment(*args, **kwargs):
+        """SetAlignment(self, int align)"""
+        return _gizmos.StaticPicture_SetAlignment(*args, **kwargs)
+
+    def GetAlignment(*args, **kwargs):
+        """GetAlignment(self) -> int"""
+        return _gizmos.StaticPicture_GetAlignment(*args, **kwargs)
+
+    def SetScale(*args, **kwargs):
+        """SetScale(self, int scale)"""
+        return _gizmos.StaticPicture_SetScale(*args, **kwargs)
+
+    def GetScale(*args, **kwargs):
+        """GetScale(self) -> int"""
+        return _gizmos.StaticPicture_GetScale(*args, **kwargs)
+
+    def SetCustomScale(*args, **kwargs):
+        """SetCustomScale(self, float sx, float sy)"""
+        return _gizmos.StaticPicture_SetCustomScale(*args, **kwargs)
+
+    def GetCustomScale(*args, **kwargs):
+        """GetCustomScale(self, float OUTPUT, float OUTPUT)"""
+        return _gizmos.StaticPicture_GetCustomScale(*args, **kwargs)
+
+
+class StaticPicturePtr(StaticPicture):
+    def __init__(self, this):
+        self.this = this
+        if not hasattr(self,"thisown"): self.thisown = 0
+        self.__class__ = StaticPicture
+_gizmos.StaticPicture_swigregister(StaticPicturePtr)
+
+def PreStaticPicture(*args, **kwargs):
+    """PreStaticPicture() -> StaticPicture"""
+    val = _gizmos.new_PreStaticPicture(*args, **kwargs)
+    val.thisown = 1
+    return val
+