]> git.saurik.com Git - wxWidgets.git/blobdiff - utils/wxPython/src/msw/windows.py
Just a teeny change -- addition of wxFrame::IsMaximized. For wxMDIChildFrame
[wxWidgets.git] / utils / wxPython / src / msw / windows.py
index f4efa42f01a1258d28627dc4d51f33fdac200b33..eb705781e7840b51b9b1d6f04bd9e8cfadb391b5 100644 (file)
@@ -4,6 +4,14 @@ import windowsc
 from misc import *
 
 from gdi import *
+import wx
+
+def wxDLG_PNT(win, point):
+    return win.ConvertDialogPointToPixels(point)
+
+def wxDLG_SZE(win, size):
+    return win.ConvertDialogPointToPixels(size)
+
 class wxEvtHandlerPtr :
     def __init__(self,this):
         self.this = this
@@ -73,8 +81,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)
@@ -100,9 +113,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
@@ -113,6 +123,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
@@ -125,8 +148,13 @@ 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)
@@ -190,6 +218,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
@@ -262,104 +293,39 @@ class wxWindowPtr(wxEvtHandlerPtr):
     def WarpPointer(self,arg0,arg1):
         val = windowsc.wxWindow_WarpPointer(self.this,arg0,arg1)
         return val
-    def __repr__(self):
-        return "<C wxWindow instance>"
-class wxWindow(wxWindowPtr):
-    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(windowsc.new_wxWindow,(arg0.this,arg1,)+args)
-        self.thisown = 1
-
-
-
-
-class wxFramePtr(wxWindowPtr):
-    def __init__(self,this):
-        self.this = this
-        self.thisown = 0
-    def Centre(self,*args):
-        val = apply(windowsc.wxFrame_Centre,(self.this,)+args)
-        return val
-    def Command(self,arg0):
-        val = windowsc.wxFrame_Command(self.this,arg0)
-        return val
-    def CreateStatusBar(self,*args):
-        val = apply(windowsc.wxFrame_CreateStatusBar,(self.this,)+args)
-        return val
-    def GetMenuBar(self):
-        val = windowsc.wxFrame_GetMenuBar(self.this)
-        val = wxMenuBarPtr(val)
-        return val
-    def GetStatusBar(self):
-        val = windowsc.wxFrame_GetStatusBar(self.this)
-        return val
-    def GetTitle(self):
-        val = windowsc.wxFrame_GetTitle(self.this)
-        return val
-    def Iconize(self,arg0):
-        val = windowsc.wxFrame_Iconize(self.this,arg0)
-        return val
-    def IsIconized(self):
-        val = windowsc.wxFrame_IsIconized(self.this)
-        return val
-    def Maximize(self,arg0):
-        val = windowsc.wxFrame_Maximize(self.this,arg0)
-        return val
-    def SetAcceleratorTable(self,arg0):
-        val = windowsc.wxFrame_SetAcceleratorTable(self.this,arg0.this)
-        return val
-    def SetIcon(self,arg0):
-        val = windowsc.wxFrame_SetIcon(self.this,arg0.this)
-        return val
-    def SetMenuBar(self,arg0):
-        val = windowsc.wxFrame_SetMenuBar(self.this,arg0.this)
+    def ConvertDialogPointToPixels(self,arg0):
+        val = windowsc.wxWindow_ConvertDialogPointToPixels(self.this,arg0.this)
+        val = wxPointPtr(val)
+        val.thisown = 1
         return val
-    def SetStatusText(self,arg0,*args):
-        val = apply(windowsc.wxFrame_SetStatusText,(self.this,arg0,)+args)
+    def ConvertDialogSizeToPixels(self,arg0):
+        val = windowsc.wxWindow_ConvertDialogSizeToPixels(self.this,arg0.this)
+        val = wxSizePtr(val)
+        val.thisown = 1
         return val
-    def SetStatusWidths(self,arg0,*args):
-        val = apply(windowsc.wxFrame_SetStatusWidths,(self.this,arg0,)+args)
+    def ConvertPixelPointToDialog(self,arg0):
+        val = windowsc.wxWindow_ConvertPixelPointToDialog(self.this,arg0.this)
+        val = wxPointPtr(val)
+        val.thisown = 1
         return val
-    def SetTitle(self,arg0):
-        val = windowsc.wxFrame_SetTitle(self.this,arg0)
+    def ConvertPixelSizeToDialog(self,arg0):
+        val = windowsc.wxWindow_ConvertPixelSizeToDialog(self.this,arg0.this)
+        val = wxSizePtr(val)
+        val.thisown = 1
         return val
     def __repr__(self):
-        return "<C wxFrame instance>"
-class wxFrame(wxFramePtr):
-    def __init__(self,arg0,arg1,arg2,*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(windowsc.new_wxFrame,(arg0.this,arg1,arg2,)+args)
-        self.thisown = 1
-
-
-
-
-class wxMiniFramePtr(wxFramePtr):
-    def __init__(self,this):
-        self.this = this
-        self.thisown = 0
-    def __repr__(self):
-        return "<C wxMiniFrame instance>"
-class wxMiniFrame(wxMiniFramePtr):
-    def __init__(self,arg0,arg1,arg2,*args) :
+        return "<C wxWindow instance>"
+class wxWindow(wxWindowPtr):
+    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(windowsc.new_wxMiniFrame,(arg0.this,arg1,arg2,)+args)
+        self.this = apply(windowsc.new_wxWindow,(arg0.this,arg1,)+args)
         self.thisown = 1
+        wx._StdWindowCallbacks(self)
 
 
 
@@ -383,6 +349,7 @@ class wxPanel(wxPanelPtr):
         args = tuple(argl)
         self.this = apply(windowsc.new_wxPanel,(arg0.this,arg1,)+args)
         self.thisown = 1
+        wx._StdWindowCallbacks(self)
 
 
 
@@ -433,6 +400,7 @@ class wxDialog(wxDialogPtr):
         args = tuple(argl)
         self.this = apply(windowsc.new_wxDialog,(arg0.this,arg1,arg2,)+args)
         self.thisown = 1
+        wx._StdDialogCallbacks(self)
 
 
 
@@ -477,6 +445,8 @@ class wxScrolledWindow(wxScrolledWindowPtr):
         args = tuple(argl)
         self.this = apply(windowsc.new_wxScrolledWindow,(arg0.this,)+args)
         self.thisown = 1
+        wx._StdWindowCallbacks(self)
+        wx._StdOnScrollCallbacks(self)