]> git.saurik.com Git - wxWidgets.git/blobdiff - utils/wxPython/src/windows.i
Added missing files to filelist.txt and regenerated makefiles.
[wxWidgets.git] / utils / wxPython / src / windows.i
index 1cc3b9fb841645c2e072cab37f921c9f8ba27eb1..1bb931f5187d8a0b3bd76735f2ad2793dadd12c4 100644 (file)
@@ -29,6 +29,8 @@
 %import gdi.i
 
 %pragma(python) code = "import wx"
+//%pragma(python) code = "import controls"
+//%pragma(python) code = "wxButtonPtr = controls.wxWindowPtr"
 
 //---------------------------------------------------------------------------
 
@@ -62,12 +64,12 @@ public:
     %pragma(python) addtomethod = "__init__:wx._StdWindowCallbacks(self)"
 
     void CaptureMouse();
-    void Center(int direction = wxHORIZONTAL);
-    void Centre(int direction = wxHORIZONTAL);
+    void Center(int direction = wxBOTH);
+    void Centre(int direction = wxBOTH);
+    void CentreOnParent(int direction = wxBOTH );
+    void CenterOnParent(int direction = wxBOTH );
     %name(ClientToScreenXY)void ClientToScreen(int *BOTH, int *BOTH);
-#ifndef __WXGTK__
     wxPoint ClientToScreen(const wxPoint& pt);
-#endif
     bool Close(int force = FALSE);
     bool Destroy();
     void DestroyChildren();
@@ -85,9 +87,6 @@ public:
     %name(GetClientSizeTuple) void GetClientSize(int *OUTPUT, int *OUTPUT);
     wxSize GetClientSize();
     wxLayoutConstraints * GetConstraints();
-#ifdef __WXMSW__
-    wxButton* GetDefaultItem();
-#endif
     //wxEvtHandler* GetEventHandler();
 
     wxFont& GetFont();
@@ -95,6 +94,7 @@ public:
     wxWindow * GetGrandParent();
     int GetId();
     wxString GetLabel();
+    void SetLabel(const wxString& label);
     wxString GetName();
     wxWindow * GetParent();
     %name(GetPositionTuple) void GetPosition(int *OUTPUT, int *OUTPUT);
@@ -110,11 +110,14 @@ public:
                        int *OUTPUT, int *OUTPUT, int *OUTPUT, int* OUTPUT,
                        const wxFont* font = NULL); //, bool use16 = FALSE)
     wxString GetTitle();
+    wxRegion GetUpdateRegion();
     long GetWindowStyleFlag();
+    bool Hide();
     void InitDialog();
     bool IsEnabled();
     bool IsRetained();
     bool IsShown();
+    bool IsTopLevel();
     void Layout();
     bool LoadFromResource(wxWindow* parent, const wxString& resourceName, const wxResourceTable* resourceTable = NULL);
     void Lower();
@@ -123,23 +126,24 @@ public:
     void Move(const wxPoint& point);
 
     //wxEvtHandler* PopEventHandler(bool deleteHandler = FALSE);
-    bool PopupMenu(wxMenu *menu, int x, int y);
     //void PushEventHandler(wxEvtHandler* handler);
 
+    %name(PopupMenuXY)bool PopupMenu(wxMenu *menu, int x, int y);
+    bool PopupMenu(wxMenu *menu, const wxPoint& pos);
+
     void Raise();
     void Refresh(bool eraseBackground = TRUE, const wxRect* rect = NULL);
     void ReleaseMouse();
+    bool Reparent( wxWindow* newParent );
+
     %name(ScreenToClientXY)void ScreenToClient(int *BOTH, int *BOTH);
-#ifndef __WXGTK__
     wxPoint ScreenToClient(const wxPoint& pt);
-#endif
 
     void ScrollWindow(int dx, int dy, const wxRect* rect = NULL);
     void SetAcceleratorTable(const wxAcceleratorTable& accel);
     void SetAutoLayout(bool autoLayout);
     void SetBackgroundColour(const wxColour& colour);
     void SetConstraints(wxLayoutConstraints *constraints);
-//    void SetDoubleClick(bool allowDoubleClick);
     void SetFocus();
     void SetFont(const wxFont& font);
     void SetForegroundColour(const wxColour& colour);
@@ -187,11 +191,17 @@ public:
 };
 
 %pragma(python) code = "
-def wxDLG_PNT(win, point):
-    return win.ConvertDialogPointToPixels(point)
-
-def wxDLG_SZE(win, size):
-    return win.ConvertDialogSizeToPixels(size)
+def wxDLG_PNT(win, point_or_x, y=None):
+    if y is None:
+        return win.ConvertDialogPointToPixels(point_or_x)
+    else:
+        return win.ConvertDialogPointToPixels(wxPoint(point_or_x, y))
+
+def wxDLG_SZE(win, size_width, height=None):
+    if height is None:
+        return win.ConvertDialogSizeToPixels(size_width)
+    else:
+        return win.ConvertDialogSizeToPixels(wxSize(size_width, height))
 "
 
 #ifdef __WXMSW__
@@ -227,7 +237,17 @@ public:
     %pragma(python) addtomethod = "__init__:wx._StdWindowCallbacks(self)"
 
     void InitDialog();
-
+    wxButton* GetDefaultItem();
+    void SetDefaultItem(wxButton *btn);
+
+    // fix a SWIG turd...
+    %pragma(python) addtoclass = "
+    def GetDefaultItem(self):
+        import controls
+        val = windowsc.wxPanel_GetDefaultItem(self.this)
+        val = controls.wxButtonPtr(val)
+        return val
+"
 };
 
 //---------------------------------------------------------------------------
@@ -261,7 +281,7 @@ public:
 
 //---------------------------------------------------------------------------
 
-class wxScrolledWindow : public wxWindow {
+class wxScrolledWindow : public wxPanel {
 public:
     wxScrolledWindow(wxWindow* parent,
                      const wxWindowID id = -1,
@@ -290,7 +310,7 @@ public:
 
 class wxMenu : public wxEvtHandler {
 public:
-    wxMenu(const wxString& title = wxPyEmptyStr);
+    wxMenu(const wxString& title = wxPyEmptyStr, long style = 0);
 
     void Append(int id, const wxString& item,
                 const wxString& helpString = wxPyEmptyStr,
@@ -315,6 +335,7 @@ public:
     bool IsChecked(int id);
     bool IsEnabled(int id);
     void SetLabel(int id, const wxString& label);
+    void UpdateUI(wxEvtHandler* source = NULL);
 };
 
 
@@ -323,11 +344,11 @@ public:
 // be used for PopupMenus, but you must retain a referece to it while using
 // it.
 //
-class wxPyMenu : public wxMenu {
-public:
-    wxPyMenu(const wxString& title = wxPyEmptyStr, PyObject* func = NULL);
-    ~wxPyMenu();
-};
+//  class wxPyMenu : public wxMenu {
+//  public:
+//      wxPyMenu(const wxString& title = wxPyEmptyStr, PyObject* func = NULL);
+//      ~wxPyMenu();
+//  };
 
 //----------------------------------------------------------------------
 
@@ -401,7 +422,58 @@ public:
 /////////////////////////////////////////////////////////////////////////////
 //
 // $Log$
+// Revision 1.18  1999/07/31 07:54:35  RD
+// wxPython 2.1b1:
+//
+//     Added the missing wxWindow.GetUpdateRegion() method.
+//
+//     Made a new change in SWIG (update your patches everybody) that
+//     provides a fix for global shadow objects that get an exception in
+//     their __del__ when their extension module has already been deleted.
+//     It was only a 1 line change in .../SWIG/Modules/pycpp.cxx at about
+//     line 496 if you want to do it by hand.
+//
+//     It is now possible to run through MainLoop more than once in any one
+//     process.  The cleanup that used to happen as MainLoop completed (and
+//     prevented it from running again) has been delayed until the wxc module
+//     is being unloaded by Python.
+//
+//     wxWindow.PopupMenu() now takes a wxPoint instead of  x,y.  Added
+//     wxWindow.PopupMenuXY to be consistent with some other methods.
+//
+//     Added wxGrid.SetEditInPlace and wxGrid.GetEditInPlace.
+//
+//     You can now provide your own app.MainLoop method.  See
+//     wxPython/demo/demoMainLoop.py for an example and some explaination.
+//
+//     Got the in-place-edit for the wxTreeCtrl fixed and added some demo
+//     code to show how to use it.
+//
+//     Put the wxIcon constructor back in for GTK as it now has one that
+//     matches MSW's.
+//
+//     Added wxGrid.GetCells
+//
+//     Added wxSystemSettings static methods as functions with names like
+//     wxSystemSettings_GetSystemColour.
+//
+//     Removed wxPyMenu since using menu callbacks have been depreciated in
+//     wxWindows.  Use wxMenu and events instead.
+//
+//     Added alternate wxBitmap constructor (for MSW only) as
+//           wxBitmapFromData(data, type, width, height, depth = 1)
+//
+//     Added a helper function named wxPyTypeCast that can convert shadow
+//     objects of one type into shadow objects of another type.  (Like doing
+//     a down-cast.)  See the implementation in wx.py for some docs.
+//
+// Revision 1.17  1999/06/22 07:03:03  RD
+//
+// wxPython 2.1b1 for wxMSW  (wxGTK coming soon)
+// Lots of changes, see the README.txt for details...
+//
 // Revision 1.16  1999/05/15 00:56:04  RD
+//
 // fixes for GetReturnCode/SetReturnCode
 //
 // Revision 1.15  1999/04/30 03:29:19  RD