]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/src/windows2.i
no, we shouldn't inconditionally add the separator at the end even if wxPATH_GET_SEPA...
[wxWidgets.git] / wxPython / src / windows2.i
index d1be157786f77764a6ee29ecedd352a44b8444ce..3183aca7cf88930f15e7fe9d9847b383622537e7 100644 (file)
 
 //----------------------------------------------------------------------
 
+%{
+    // Put some wx default wxChar* values into wxStrings.
+    DECLARE_DEF_STRING(NOTEBOOK_NAME);
+    DECLARE_DEF_STRING(PanelNameStr);
+
+    static const wxChar* wxSplitterNameStr = wxT("splitter");
+    DECLARE_DEF_STRING(SplitterNameStr);
+    static const wxString wxPyEmptyString(wxT(""));
+%}
+
+//----------------------------------------------------------------------
+
 %include typemaps.i
 %include my_typemaps.i
 
@@ -69,7 +81,7 @@ public:
                const wxPoint& pos = wxDefaultPosition,
                const wxSize& size = wxDefaultSize,
                long style = 0,
-               char* name = "notebook");
+               const wxString& name = wxPyNOTEBOOK_NAME);
     %name(wxPreNotebook)wxNotebook();
 
     bool Create(wxWindow *parent,
@@ -77,10 +89,10 @@ public:
                const wxPoint& pos = wxDefaultPosition,
                const wxSize& size = wxDefaultSize,
                long style = 0,
-               char* name = "notebook");
+               const wxString& name = wxPyNOTEBOOK_NAME);
 
     %pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
-    %pragma(python) addtomethod = "wxPreNotebook:val._setOORInfo(self)"
+    %pragma(python) addtomethod = "wxPreNotebook:val._setOORInfo(val)"
 
     int GetPageCount();
     int SetSelection(int nPage);
@@ -146,7 +158,7 @@ enum
 };
 
 
-class wxSplitterEvent : public wxCommandEvent {
+class wxSplitterEvent : public wxNotifyEvent {
 public:
      wxSplitterEvent(wxEventType type = wxEVT_NULL,
                      wxSplitterWindow *splitter = NULL);
@@ -167,17 +179,17 @@ public:
                      const wxPoint& point = wxDefaultPosition,
                      const wxSize& size = wxDefaultSize,
                      long style=wxSP_3D|wxCLIP_CHILDREN,
-                     char* name = "splitterWindow");
+                     const wxString& name = wxPySplitterNameStr);
     %name(wxPreSplitterWindow)wxSplitterWindow();
 
     bool Create(wxWindow* parent, wxWindowID id,
                 const wxPoint& point = wxDefaultPosition,
                 const wxSize& size = wxDefaultSize,
                 long style=wxSP_3D|wxCLIP_CHILDREN,
-                char* name = "splitterWindow");
+                const wxString& name = wxPySplitterNameStr);
 
     %pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
-    %pragma(python) addtomethod = "wxPreSplitterWindow:val._setOORInfo(self)"
+    %pragma(python) addtomethod = "wxPreSplitterWindow:val._setOORInfo(val)"
 
     // Gets the only or left/top pane
     wxWindow *GetWindow1();
@@ -240,6 +252,12 @@ public:
     void SetMinimumPaneSize(int min);
     int GetMinimumPaneSize();
 
+    // Resizes subwindows
+    virtual void SizeWindows();
+
+    void SetNeedUpdating(bool needUpdating) { m_needUpdating = needUpdating; }
+    bool GetNeedUpdating() const { return m_needUpdating ; }
+
 };
 
 //---------------------------------------------------------------------------
@@ -273,7 +291,7 @@ public:
     %pragma(python) addtomethod = "__init__:wx._checkForCallback(self, 'OnLButtonDClick',wxEVT_TASKBAR_LEFT_DCLICK)"
     %pragma(python) addtomethod = "__init__:wx._checkForCallback(self, 'OnRButtonDClick',wxEVT_TASKBAR_RIGHT_DCLICK)"
 
-    bool SetIcon(const wxIcon& icon, const char* tooltip = "");
+    bool SetIcon(const wxIcon& icon, const wxString& tooltip = wxPyEmptyString);
     bool RemoveIcon(void);
     bool PopupMenu(wxMenu *menu);
     bool IsIconInstalled();
@@ -281,4 +299,74 @@ public:
 };
 #endif
 
+//---------------------------------------------------------------------------
+//---------------------------------------------------------------------------
+// wxPyWindow derives from wxWindow and adds support for overriding many of
+// the virtual methods in Python derived classes.
+
+// Do wxPyControl too.
+
+//  %{
+//  class wxPyWindow : public wxWindow
+//  {
+//      DECLARE_DYNAMIC_CLASS(wxPyWindow)
+//  public:
+//      wxPyWindow(wxWindow* parent, const wxWindowID id,
+//                 const wxPoint& pos = wxDefaultPosition,
+//                 const wxSize& size = wxDefaultSize,
+//                 long style = 0,
+//                 const wxString& name = wxPyPanelNameStr)
+//          : wxWindow(parent, id, pos, size, style, name) {}
+
+
+//      // Which of these should be done???
+//      DoSetSize
+//      DoGetSize
+//      DoSetClientSize
+//      DoGetClientSize
+//      DoGetPosition
+//      DoSetVirtualSize
+//      DoGetVirtualSize
+
+//      GetClientAreaOrigin
+//      Fit
+//      SetSizeHints
+//      SetVirtualSizeHints
+//      GetMaxSize
+//      Show
+//      Enable
+//      SetFocus
+//      SetFocusFromKbd
+//      AcceptsFocus
+//      AcceptsFocusFromKeyboard
+//      GetDefaultItem
+//      SetDefaultItem
+//      IsTopLevel
+//      AddChild
+//      RemoveChild
+//      Validate
+//      TransferDataToWindow
+//      TransferDataFromWindow
+//      InitDialog
+//      SetBackgroundColour
+//      SetForegroundColour
+//      GetCharHeight
+//      GetCharWidth
+//      DoClientToScreen
+//      DoScreenToClient
+//      DoHitTest
+//      DoPopupMenu
+//      DoSetToolTip
+//      DoCaptureMouse
+//      DoReleaseMouse
+//      DoMoveWindow
+
+
+//      PYPRIVATE;
+//  };
+
+
+//  %}
+
+
 //---------------------------------------------------------------------------