]> git.saurik.com Git - wxWidgets.git/blobdiff - utils/wxPython/src/msw/windows.py
minimal now works in Unicode mode
[wxWidgets.git] / utils / wxPython / src / msw / windows.py
index ca35b3c304af25d802db10143c56119c011e68bd..1d315ba70be47ed043a723cf0c15a30a22ab3503 100644 (file)
@@ -4,7 +4,14 @@ import windowsc
 from misc import *
 
 from gdi import *
-import wxp
+import wx
+
+def wxDLG_PNT(win, point):
+    return win.ConvertDialogPointToPixels(point)
+
+def wxDLG_SZE(win, size):
+    return win.ConvertDialogSizeToPixels(size)
+
 class wxEvtHandlerPtr :
     def __init__(self,this):
         self.this = this
@@ -34,8 +41,13 @@ class wxWindowPtr(wxEvtHandlerPtr):
     def Centre(self,*args):
         val = apply(windowsc.wxWindow_Centre,(self.this,)+args)
         return val
-    def ClientToScreen(self,arg0,arg1):
-        val = windowsc.wxWindow_ClientToScreen(self.this,arg0,arg1)
+    def ClientToScreenXY(self,arg0,arg1):
+        val = windowsc.wxWindow_ClientToScreenXY(self.this,arg0,arg1)
+        return val
+    def ClientToScreen(self,arg0):
+        val = windowsc.wxWindow_ClientToScreen(self.this,arg0.this)
+        val = wxPointPtr(val)
+        val.thisown = 1
         return val
     def Close(self,*args):
         val = apply(windowsc.wxWindow_Close,(self.this,)+args)
@@ -52,8 +64,8 @@ class wxWindowPtr(wxEvtHandlerPtr):
     def Enable(self,arg0):
         val = windowsc.wxWindow_Enable(self.this,arg0)
         return val
-    def FindWindowByID(self,arg0):
-        val = windowsc.wxWindow_FindWindowByID(self.this,arg0)
+    def FindWindowById(self,arg0):
+        val = windowsc.wxWindow_FindWindowById(self.this,arg0)
         val = wxWindowPtr(val)
         return val
     def FindWindowByName(self,arg0):
@@ -74,8 +86,13 @@ class wxWindowPtr(wxEvtHandlerPtr):
     def GetCharWidth(self):
         val = windowsc.wxWindow_GetCharWidth(self.this)
         return val
+    def GetClientSizeTuple(self):
+        val = windowsc.wxWindow_GetClientSizeTuple(self.this)
+        return val
     def GetClientSize(self):
         val = windowsc.wxWindow_GetClientSize(self.this)
+        val = wxSizePtr(val)
+        val.thisown = 1
         return val
     def GetConstraints(self):
         val = windowsc.wxWindow_GetConstraints(self.this)
@@ -101,9 +118,6 @@ class wxWindowPtr(wxEvtHandlerPtr):
     def GetId(self):
         val = windowsc.wxWindow_GetId(self.this)
         return val
-    def GetPosition(self):
-        val = windowsc.wxWindow_GetPosition(self.this)
-        return val
     def GetLabel(self):
         val = windowsc.wxWindow_GetLabel(self.this)
         return val
@@ -114,6 +128,19 @@ class wxWindowPtr(wxEvtHandlerPtr):
         val = windowsc.wxWindow_GetParent(self.this)
         val = wxWindowPtr(val)
         return val
+    def GetPositionTuple(self):
+        val = windowsc.wxWindow_GetPositionTuple(self.this)
+        return val
+    def GetPosition(self):
+        val = windowsc.wxWindow_GetPosition(self.this)
+        val = wxPointPtr(val)
+        val.thisown = 1
+        return val
+    def GetRect(self):
+        val = windowsc.wxWindow_GetRect(self.this)
+        val = wxRectPtr(val)
+        val.thisown = 1
+        return val
     def GetReturnCode(self):
         val = windowsc.wxWindow_GetReturnCode(self.this)
         return val
@@ -126,12 +153,24 @@ class wxWindowPtr(wxEvtHandlerPtr):
     def GetScrollRange(self,arg0):
         val = windowsc.wxWindow_GetScrollRange(self.this,arg0)
         return val
+    def GetSizeTuple(self):
+        val = windowsc.wxWindow_GetSizeTuple(self.this)
+        return val
     def GetSize(self):
         val = windowsc.wxWindow_GetSize(self.this)
+        val = wxSizePtr(val)
+        val.thisown = 1
         return val
     def GetTextExtent(self,arg0):
         val = windowsc.wxWindow_GetTextExtent(self.this,arg0)
         return val
+    def GetFullTextExtent(self,arg0,*args):
+        argl = map(None,args)
+        try: argl[0] = argl[0].this
+        except: pass
+        args = tuple(argl)
+        val = apply(windowsc.wxWindow_GetFullTextExtent,(self.this,arg0,)+args)
+        return val
     def GetTitle(self):
         val = windowsc.wxWindow_GetTitle(self.this)
         return val
@@ -162,8 +201,11 @@ class wxWindowPtr(wxEvtHandlerPtr):
     def MakeModal(self,arg0):
         val = windowsc.wxWindow_MakeModal(self.this,arg0)
         return val
-    def Move(self,arg0,arg1):
-        val = windowsc.wxWindow_Move(self.this,arg0,arg1)
+    def MoveXY(self,arg0,arg1):
+        val = windowsc.wxWindow_MoveXY(self.this,arg0,arg1)
+        return val
+    def Move(self,arg0):
+        val = windowsc.wxWindow_Move(self.this,arg0.this)
         return val
     def PopupMenu(self,arg0,arg1,arg2):
         val = windowsc.wxWindow_PopupMenu(self.this,arg0.this,arg1,arg2)
@@ -181,8 +223,13 @@ class wxWindowPtr(wxEvtHandlerPtr):
     def ReleaseMouse(self):
         val = windowsc.wxWindow_ReleaseMouse(self.this)
         return val
-    def ScreenToClient(self,arg0,arg1):
-        val = windowsc.wxWindow_ScreenToClient(self.this,arg0,arg1)
+    def ScreenToClientXY(self,arg0,arg1):
+        val = windowsc.wxWindow_ScreenToClientXY(self.this,arg0,arg1)
+        return val
+    def ScreenToClient(self,arg0):
+        val = windowsc.wxWindow_ScreenToClient(self.this,arg0.this)
+        val = wxPointPtr(val)
+        val.thisown = 1
         return val
     def ScrollWindow(self,arg0,arg1,*args):
         argl = map(None,args)
@@ -191,6 +238,9 @@ class wxWindowPtr(wxEvtHandlerPtr):
         args = tuple(argl)
         val = apply(windowsc.wxWindow_ScrollWindow,(self.this,arg0,arg1,)+args)
         return val
+    def SetAcceleratorTable(self,arg0):
+        val = windowsc.wxWindow_SetAcceleratorTable(self.this,arg0.this)
+        return val
     def SetAutoLayout(self,arg0):
         val = windowsc.wxWindow_SetAutoLayout(self.this,arg0)
         return val
@@ -239,8 +289,11 @@ class wxWindowPtr(wxEvtHandlerPtr):
     def SetSizeHints(self,*args):
         val = apply(windowsc.wxWindow_SetSizeHints,(self.this,)+args)
         return val
-    def SetClientSize(self,arg0,arg1):
-        val = windowsc.wxWindow_SetClientSize(self.this,arg0,arg1)
+    def SetClientSizeWH(self,arg0,arg1):
+        val = windowsc.wxWindow_SetClientSizeWH(self.this,arg0,arg1)
+        return val
+    def SetClientSize(self,arg0):
+        val = windowsc.wxWindow_SetClientSize(self.this,arg0.this)
         return val
     def SetCursor(self,arg0):
         val = windowsc.wxWindow_SetCursor(self.this,arg0.this)
@@ -263,6 +316,36 @@ class wxWindowPtr(wxEvtHandlerPtr):
     def WarpPointer(self,arg0,arg1):
         val = windowsc.wxWindow_WarpPointer(self.this,arg0,arg1)
         return val
+    def ConvertDialogPointToPixels(self,arg0):
+        val = windowsc.wxWindow_ConvertDialogPointToPixels(self.this,arg0.this)
+        val = wxPointPtr(val)
+        val.thisown = 1
+        return val
+    def ConvertDialogSizeToPixels(self,arg0):
+        val = windowsc.wxWindow_ConvertDialogSizeToPixels(self.this,arg0.this)
+        val = wxSizePtr(val)
+        val.thisown = 1
+        return val
+    def ConvertPixelPointToDialog(self,arg0):
+        val = windowsc.wxWindow_ConvertPixelPointToDialog(self.this,arg0.this)
+        val = wxPointPtr(val)
+        val.thisown = 1
+        return val
+    def ConvertPixelSizeToDialog(self,arg0):
+        val = windowsc.wxWindow_ConvertPixelSizeToDialog(self.this,arg0.this)
+        val = wxSizePtr(val)
+        val.thisown = 1
+        return val
+    def SetToolTipString(self,arg0):
+        val = windowsc.wxWindow_SetToolTipString(self.this,arg0)
+        return val
+    def SetToolTip(self,arg0):
+        val = windowsc.wxWindow_SetToolTip(self.this,arg0.this)
+        return val
+    def GetToolTip(self):
+        val = windowsc.wxWindow_GetToolTip(self.this)
+        val = wxToolTipPtr(val)
+        return val
     def __repr__(self):
         return "<C wxWindow instance>"
 class wxWindow(wxWindowPtr):
@@ -275,7 +358,7 @@ class wxWindow(wxWindowPtr):
         args = tuple(argl)
         self.this = apply(windowsc.new_wxWindow,(arg0.this,arg1,)+args)
         self.thisown = 1
-        wxp._StdWindowCallbacks(self)
+        wx._StdWindowCallbacks(self)
 
 
 
@@ -299,7 +382,7 @@ class wxPanel(wxPanelPtr):
         args = tuple(argl)
         self.this = apply(windowsc.new_wxPanel,(arg0.this,arg1,)+args)
         self.thisown = 1
-        wxp._StdWindowCallbacks(self)
+        wx._StdWindowCallbacks(self)
 
 
 
@@ -350,7 +433,7 @@ class wxDialog(wxDialogPtr):
         args = tuple(argl)
         self.this = apply(windowsc.new_wxDialog,(arg0.this,arg1,arg2,)+args)
         self.thisown = 1
-        wxp._StdDialogCallbacks(self)
+        wx._StdDialogCallbacks(self)
 
 
 
@@ -395,8 +478,8 @@ class wxScrolledWindow(wxScrolledWindowPtr):
         args = tuple(argl)
         self.this = apply(windowsc.new_wxScrolledWindow,(arg0.this,)+args)
         self.thisown = 1
-        wxp._StdWindowCallbacks(self)
-        wxp._StdOnScrollCallbacks(self)
+        wx._StdWindowCallbacks(self)
+        wx._StdOnScrollCallbacks(self)
 
 
 
@@ -411,6 +494,9 @@ class wxMenuPtr(wxEvtHandlerPtr):
     def AppendMenu(self,arg0,arg1,arg2,*args):
         val = apply(windowsc.wxMenu_AppendMenu,(self.this,arg0,arg1,arg2.this,)+args)
         return val
+    def AppendItem(self,arg0):
+        val = windowsc.wxMenu_AppendItem(self.this,arg0.this)
+        return val
     def AppendSeparator(self):
         val = windowsc.wxMenu_AppendSeparator(self.this)
         return val
@@ -571,9 +657,6 @@ class wxMenuItemPtr :
     def SetName(self,arg0):
         val = windowsc.wxMenuItem_SetName(self.this,arg0)
         return val
-    def DeleteSubMenu(self):
-        val = windowsc.wxMenuItem_DeleteSubMenu(self.this)
-        return val
     def GetName(self):
         val = windowsc.wxMenuItem_GetName(self.this)
         return val
@@ -589,6 +672,9 @@ class wxMenuItemPtr :
     def Check(self,*args):
         val = apply(windowsc.wxMenuItem_Check,(self.this,)+args)
         return val
+    def DeleteSubMenu(self):
+        val = windowsc.wxMenuItem_DeleteSubMenu(self.this)
+        return val
     def __repr__(self):
         return "<C wxMenuItem instance>"
 class wxMenuItem(wxMenuItemPtr):
@@ -607,6 +693,11 @@ def wxWindow_FindFocus():
     val = wxWindowPtr(val)
     return val
 
+def wxWindow_FromHWND(arg0):
+    val = windowsc.wxWindow_FromHWND(arg0)
+    val = wxWindowPtr(val)
+    return val
+
 
 
 #-------------- VARIABLE WRAPPERS ------------------