]> git.saurik.com Git - wxWidgets.git/blobdiff - utils/wxPython/src/gtk/stattool.py
ifdef'd out wxEmptyString. This is defined in string.cpp.
[wxWidgets.git] / utils / wxPython / src / gtk / stattool.py
index f7e24332e185ac19e87bba27c555d05705b6c9db..a87137b839084608a5062b6da9b85115fd79bdc3 100644 (file)
@@ -10,52 +10,46 @@ from gdi import *
 from controls import *
 
 from events import *
+import wx
 class wxStatusBarPtr(wxWindowPtr):
     def __init__(self,this):
         self.this = this
         self.thisown = 0
-    def GetFieldRect(self,arg0):
-        val = stattoolc.wxStatusBar_GetFieldRect(self.this,arg0)
-        val = wxRectPtr(val)
-        val.thisown = 1
+    def GetFieldRect(self, *_args, **_kwargs):
+        val = apply(stattoolc.wxStatusBar_GetFieldRect,(self,) + _args, _kwargs)
+        if val: val = wxRectPtr(val) ; val.thisown = 1
         return val
-    def GetFieldsCount(self):
-        val = stattoolc.wxStatusBar_GetFieldsCount(self.this)
+    def GetFieldsCount(self, *_args, **_kwargs):
+        val = apply(stattoolc.wxStatusBar_GetFieldsCount,(self,) + _args, _kwargs)
         return val
-    def GetStatusText(self,*args):
-        val = apply(stattoolc.wxStatusBar_GetStatusText,(self.this,)+args)
+    def GetStatusText(self, *_args, **_kwargs):
+        val = apply(stattoolc.wxStatusBar_GetStatusText,(self,) + _args, _kwargs)
         return val
-    def DrawField(self,arg0,arg1):
-        val = stattoolc.wxStatusBar_DrawField(self.this,arg0.this,arg1)
+    def DrawField(self, *_args, **_kwargs):
+        val = apply(stattoolc.wxStatusBar_DrawField,(self,) + _args, _kwargs)
         return val
-    def DrawFieldText(self,arg0,arg1):
-        val = stattoolc.wxStatusBar_DrawFieldText(self.this,arg0.this,arg1)
+    def DrawFieldText(self, *_args, **_kwargs):
+        val = apply(stattoolc.wxStatusBar_DrawFieldText,(self,) + _args, _kwargs)
         return val
-    def InitColours(self):
-        val = stattoolc.wxStatusBar_InitColours(self.this)
+    def InitColours(self, *_args, **_kwargs):
+        val = apply(stattoolc.wxStatusBar_InitColours,(self,) + _args, _kwargs)
         return val
-    def SetFieldsCount(self,*args):
-        val = apply(stattoolc.wxStatusBar_SetFieldsCount,(self.this,)+args)
+    def SetFieldsCount(self, *_args, **_kwargs):
+        val = apply(stattoolc.wxStatusBar_SetFieldsCount,(self,) + _args, _kwargs)
         return val
-    def SetStatusText(self,arg0,*args):
-        val = apply(stattoolc.wxStatusBar_SetStatusText,(self.this,arg0,)+args)
+    def SetStatusText(self, *_args, **_kwargs):
+        val = apply(stattoolc.wxStatusBar_SetStatusText,(self,) + _args, _kwargs)
         return val
-    def SetStatusWidths(self,arg0,*args):
-        val = apply(stattoolc.wxStatusBar_SetStatusWidths,(self.this,arg0,)+args)
+    def SetStatusWidths(self, *_args, **_kwargs):
+        val = apply(stattoolc.wxStatusBar_SetStatusWidths,(self,) + _args, _kwargs)
         return val
     def __repr__(self):
-        return "<C wxStatusBar instance>"
+        return "<C wxStatusBar instance at %s>" % (self.this,)
 class wxStatusBar(wxStatusBarPtr):
-    def __init__(self,arg0,arg1,*args) :
-        argl = map(None,args)
-        try: argl[0] = argl[0].this
-        except: pass
-        try: argl[1] = argl[1].this
-        except: pass
-        args = tuple(argl)
-        self.this = apply(stattoolc.new_wxStatusBar,(arg0.this,arg1,)+args)
+    def __init__(self,*_args,**_kwargs):
+        self.this = apply(stattoolc.new_wxStatusBar,_args,_kwargs)
         self.thisown = 1
-        wxp._StdWindowCallbacks(self)
+        wx._StdWindowCallbacks(self)
 
 
 
@@ -64,78 +58,78 @@ class wxToolBarToolPtr :
     def __init__(self,this):
         self.this = this
         self.thisown = 0
-    def __del__(self):
+    def __del__(self,stattoolc=stattoolc):
         if self.thisown == 1 :
-            stattoolc.delete_wxToolBarTool(self.this)
+            stattoolc.delete_wxToolBarTool(self)
     def __setattr__(self,name,value):
         if name == "m_toolStyle" :
-            stattoolc.wxToolBarTool_m_toolStyle_set(self.this,value)
+            stattoolc.wxToolBarTool_m_toolStyle_set(self,value)
             return
         if name == "m_clientData" :
-            stattoolc.wxToolBarTool_m_clientData_set(self.this,value)
+            stattoolc.wxToolBarTool_m_clientData_set(self,value)
             return
         if name == "m_index" :
-            stattoolc.wxToolBarTool_m_index_set(self.this,value)
+            stattoolc.wxToolBarTool_m_index_set(self,value)
             return
         if name == "m_toggleState" :
-            stattoolc.wxToolBarTool_m_toggleState_set(self.this,value)
+            stattoolc.wxToolBarTool_m_toggleState_set(self,value)
             return
         if name == "m_isToggle" :
-            stattoolc.wxToolBarTool_m_isToggle_set(self.this,value)
+            stattoolc.wxToolBarTool_m_isToggle_set(self,value)
             return
         if name == "m_deleteSecondBitmap" :
-            stattoolc.wxToolBarTool_m_deleteSecondBitmap_set(self.this,value)
+            stattoolc.wxToolBarTool_m_deleteSecondBitmap_set(self,value)
             return
         if name == "m_enabled" :
-            stattoolc.wxToolBarTool_m_enabled_set(self.this,value)
+            stattoolc.wxToolBarTool_m_enabled_set(self,value)
             return
         if name == "m_bitmap1" :
-            stattoolc.wxToolBarTool_m_bitmap1_set(self.this,value.this)
+            stattoolc.wxToolBarTool_m_bitmap1_set(self,value.this)
             return
         if name == "m_bitmap2" :
-            stattoolc.wxToolBarTool_m_bitmap2_set(self.this,value.this)
+            stattoolc.wxToolBarTool_m_bitmap2_set(self,value.this)
             return
         if name == "m_isMenuCommand" :
-            stattoolc.wxToolBarTool_m_isMenuCommand_set(self.this,value)
+            stattoolc.wxToolBarTool_m_isMenuCommand_set(self,value)
             return
         if name == "m_shortHelpString" :
-            stattoolc.wxToolBarTool_m_shortHelpString_set(self.this,value)
+            stattoolc.wxToolBarTool_m_shortHelpString_set(self,value)
             return
         if name == "m_longHelpString" :
-            stattoolc.wxToolBarTool_m_longHelpString_set(self.this,value)
+            stattoolc.wxToolBarTool_m_longHelpString_set(self,value)
             return
         self.__dict__[name] = value
     def __getattr__(self,name):
         if name == "m_toolStyle" : 
-            return stattoolc.wxToolBarTool_m_toolStyle_get(self.this)
+            return stattoolc.wxToolBarTool_m_toolStyle_get(self)
         if name == "m_clientData" : 
-            return stattoolc.wxToolBarTool_m_clientData_get(self.this)
+            return stattoolc.wxToolBarTool_m_clientData_get(self)
         if name == "m_index" : 
-            return stattoolc.wxToolBarTool_m_index_get(self.this)
+            return stattoolc.wxToolBarTool_m_index_get(self)
         if name == "m_toggleState" : 
-            return stattoolc.wxToolBarTool_m_toggleState_get(self.this)
+            return stattoolc.wxToolBarTool_m_toggleState_get(self)
         if name == "m_isToggle" : 
-            return stattoolc.wxToolBarTool_m_isToggle_get(self.this)
+            return stattoolc.wxToolBarTool_m_isToggle_get(self)
         if name == "m_deleteSecondBitmap" : 
-            return stattoolc.wxToolBarTool_m_deleteSecondBitmap_get(self.this)
+            return stattoolc.wxToolBarTool_m_deleteSecondBitmap_get(self)
         if name == "m_enabled" : 
-            return stattoolc.wxToolBarTool_m_enabled_get(self.this)
+            return stattoolc.wxToolBarTool_m_enabled_get(self)
         if name == "m_bitmap1" : 
-            return wxBitmapPtr(stattoolc.wxToolBarTool_m_bitmap1_get(self.this))
+            return wxBitmapPtr(stattoolc.wxToolBarTool_m_bitmap1_get(self))
         if name == "m_bitmap2" : 
-            return wxBitmapPtr(stattoolc.wxToolBarTool_m_bitmap2_get(self.this))
+            return wxBitmapPtr(stattoolc.wxToolBarTool_m_bitmap2_get(self))
         if name == "m_isMenuCommand" : 
-            return stattoolc.wxToolBarTool_m_isMenuCommand_get(self.this)
+            return stattoolc.wxToolBarTool_m_isMenuCommand_get(self)
         if name == "m_shortHelpString" : 
-            return stattoolc.wxToolBarTool_m_shortHelpString_get(self.this)
+            return stattoolc.wxToolBarTool_m_shortHelpString_get(self)
         if name == "m_longHelpString" : 
-            return stattoolc.wxToolBarTool_m_longHelpString_get(self.this)
+            return stattoolc.wxToolBarTool_m_longHelpString_get(self)
         raise AttributeError,name
     def __repr__(self):
-        return "<C wxToolBarTool instance>"
+        return "<C wxToolBarTool instance at %s>" % (self.this,)
 class wxToolBarTool(wxToolBarToolPtr):
-    def __init__(self:
-        self.this = stattoolc.new_wxToolBarTool()
+    def __init__(self,*_args,**_kwargs):
+        self.this = apply(stattoolc.new_wxToolBarTool,_args,_kwargs)
         self.thisown = 1
 
 
@@ -145,54 +139,66 @@ class wxToolBarPtr(wxControlPtr):
     def __init__(self,this):
         self.this = this
         self.thisown = 0
-    def AddSeparator(self):
-        val = stattoolc.wxToolBar_AddSeparator(self.this)
+    def AddSeparator(self, *_args, **_kwargs):
+        val = apply(stattoolc.wxToolBar_AddSeparator,(self,) + _args, _kwargs)
         return val
-    def AddTool(self,arg0,arg1,*args):
-        argl = map(None,args)
-        try: argl[0] = argl[0].this
-        except: pass
-        args = tuple(argl)
-        val = apply(stattoolc.wxToolBar_AddTool,(self.this,arg0,arg1.this,)+args)
-        val = wxToolBarToolPtr(val)
+    def AddTool(self, *_args, **_kwargs):
+        val = apply(stattoolc.wxToolBar_AddTool,(self,) + _args, _kwargs)
+        if val: val = wxToolBarToolPtr(val) 
         return val
-    def EnableTool(self,arg0,arg1):
-        val = stattoolc.wxToolBar_EnableTool(self.this,arg0,arg1)
+    def AddSimpleTool(self, *_args, **_kwargs):
+        val = apply(stattoolc.wxToolBar_AddSimpleTool,(self,) + _args, _kwargs)
+        if val: val = wxToolBarToolPtr(val) 
         return val
-    def GetToolEnabled(self,arg0):
-        val = stattoolc.wxToolBar_GetToolEnabled(self.this,arg0)
+    def EnableTool(self, *_args, **_kwargs):
+        val = apply(stattoolc.wxToolBar_EnableTool,(self,) + _args, _kwargs)
         return val
-    def GetToolState(self,arg0):
-        val = stattoolc.wxToolBar_GetToolState(self.this,arg0)
+    def GetToolEnabled(self, *_args, **_kwargs):
+        val = apply(stattoolc.wxToolBar_GetToolEnabled,(self,) + _args, _kwargs)
         return val
-    def Realize(self):
-        val = stattoolc.wxToolBar_Realize(self.this)
+    def GetToolLongHelp(self, *_args, **_kwargs):
+        val = apply(stattoolc.wxToolBar_GetToolLongHelp,(self,) + _args, _kwargs)
         return val
-    def SetMargins(self,arg0):
-        val = stattoolc.wxToolBar_SetMargins(self.this,arg0.this)
+    def GetToolPacking(self, *_args, **_kwargs):
+        val = apply(stattoolc.wxToolBar_GetToolPacking,(self,) + _args, _kwargs)
         return val
-    def SetToolPacking(self,arg0):
-        val = stattoolc.wxToolBar_SetToolPacking(self.this,arg0)
+    def GetToolSeparation(self, *_args, **_kwargs):
+        val = apply(stattoolc.wxToolBar_GetToolSeparation,(self,) + _args, _kwargs)
         return val
-    def SetToolSeparation(self,arg0):
-        val = stattoolc.wxToolBar_SetToolSeparation(self.this,arg0)
+    def GetToolShortHelp(self, *_args, **_kwargs):
+        val = apply(stattoolc.wxToolBar_GetToolShortHelp,(self,) + _args, _kwargs)
         return val
-    def ToggleTool(self,arg0,arg1):
-        val = stattoolc.wxToolBar_ToggleTool(self.this,arg0,arg1)
+    def GetToolState(self, *_args, **_kwargs):
+        val = apply(stattoolc.wxToolBar_GetToolState,(self,) + _args, _kwargs)
+        return val
+    def Realize(self, *_args, **_kwargs):
+        val = apply(stattoolc.wxToolBar_Realize,(self,) + _args, _kwargs)
+        return val
+    def SetToolLongHelp(self, *_args, **_kwargs):
+        val = apply(stattoolc.wxToolBar_SetToolLongHelp,(self,) + _args, _kwargs)
+        return val
+    def SetToolShortHelp(self, *_args, **_kwargs):
+        val = apply(stattoolc.wxToolBar_SetToolShortHelp,(self,) + _args, _kwargs)
+        return val
+    def SetMargins(self, *_args, **_kwargs):
+        val = apply(stattoolc.wxToolBar_SetMargins,(self,) + _args, _kwargs)
+        return val
+    def SetToolPacking(self, *_args, **_kwargs):
+        val = apply(stattoolc.wxToolBar_SetToolPacking,(self,) + _args, _kwargs)
+        return val
+    def SetToolSeparation(self, *_args, **_kwargs):
+        val = apply(stattoolc.wxToolBar_SetToolSeparation,(self,) + _args, _kwargs)
+        return val
+    def ToggleTool(self, *_args, **_kwargs):
+        val = apply(stattoolc.wxToolBar_ToggleTool,(self,) + _args, _kwargs)
         return val
     def __repr__(self):
-        return "<C wxToolBar instance>"
+        return "<C wxToolBar instance at %s>" % (self.this,)
 class wxToolBar(wxToolBarPtr):
-    def __init__(self,arg0,arg1,*args) :
-        argl = map(None,args)
-        try: argl[0] = argl[0].this
-        except: pass
-        try: argl[1] = argl[1].this
-        except: pass
-        args = tuple(argl)
-        self.this = apply(stattoolc.new_wxToolBar,(arg0.this,arg1,)+args)
+    def __init__(self,*_args,**_kwargs):
+        self.this = apply(stattoolc.new_wxToolBar,_args,_kwargs)
         self.thisown = 1
-        wxp._StdWindowCallbacks(self)
+        wx._StdWindowCallbacks(self)