]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/src/windows2.i
In GetPath(), don't append separator if there's already one at the end
[wxWidgets.git] / wxPython / src / windows2.i
index d1be157786f77764a6ee29ecedd352a44b8444ce..8965938e887ce7d770ae81ad13a58e0cacd1bab3 100644 (file)
 
 //----------------------------------------------------------------------
 
 
 //----------------------------------------------------------------------
 
+%{
+    // Put some wx default wxChar* values into wxStrings.
+    DECLARE_DEF_STRING(NOTEBOOK_NAME);
+
+    static const wxChar* wxSplitterNameStr = wxT("splitter");
+    DECLARE_DEF_STRING(SplitterNameStr);
+    static const wxString wxPyEmptyString(wxT(""));
+%}
+
+//----------------------------------------------------------------------
+
 %include typemaps.i
 %include my_typemaps.i
 
 %include typemaps.i
 %include my_typemaps.i
 
@@ -69,7 +80,7 @@ public:
                const wxPoint& pos = wxDefaultPosition,
                const wxSize& size = wxDefaultSize,
                long style = 0,
                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,
     %name(wxPreNotebook)wxNotebook();
 
     bool Create(wxWindow *parent,
@@ -77,10 +88,10 @@ public:
                const wxPoint& pos = wxDefaultPosition,
                const wxSize& size = wxDefaultSize,
                long style = 0,
                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 = "__init__:self._setOORInfo(self)"
-    %pragma(python) addtomethod = "wxPreNotebook:val._setOORInfo(self)"
+    %pragma(python) addtomethod = "wxPreNotebook:val._setOORInfo(val)"
 
     int GetPageCount();
     int SetSelection(int nPage);
 
     int GetPageCount();
     int SetSelection(int nPage);
@@ -167,17 +178,17 @@ public:
                      const wxPoint& point = wxDefaultPosition,
                      const wxSize& size = wxDefaultSize,
                      long style=wxSP_3D|wxCLIP_CHILDREN,
                      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,
     %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 = "__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();
 
     // Gets the only or left/top pane
     wxWindow *GetWindow1();
@@ -273,7 +284,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)"
 
     %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();
     bool RemoveIcon(void);
     bool PopupMenu(wxMenu *menu);
     bool IsIconInstalled();