]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/src/cmndlgs.i
Removed bogus default parameters, applying
[wxWidgets.git] / wxPython / src / cmndlgs.i
index 02ebd4eff9ac2bcd080799339e73772da31e3a69..b69e07c4b030550c8a67f9a1a1e375814d40f37a 100644 (file)
 
 //----------------------------------------------------------------------
 
 
 //----------------------------------------------------------------------
 
+%{
+    // Put some wx default wxChar* values into wxStrings.
+    DECLARE_DEF_STRING(FileSelectorPromptStr);
+    DECLARE_DEF_STRING(DirSelectorPromptStr);
+    DECLARE_DEF_STRING(DirDialogNameStr);
+    DECLARE_DEF_STRING(FileSelectorDefaultWildcardStr);
+    DECLARE_DEF_STRING(GetTextFromUserPromptStr);
+    DECLARE_DEF_STRING(MessageBoxCaptionStr);
+    static const wxString wxPyEmptyString(wxT(""));
+
+%}
+
+//----------------------------------------------------------------------
+
 class wxColourData : public wxObject {
 public:
     wxColourData();
 class wxColourData : public wxObject {
 public:
     wxColourData();
@@ -68,10 +82,12 @@ public:
 class wxDirDialog : public wxDialog {
 public:
     wxDirDialog(wxWindow* parent,
 class wxDirDialog : public wxDialog {
 public:
     wxDirDialog(wxWindow* parent,
-                char* message = "Choose a directory",
-                char* defaultPath = "",
+                const wxString& message = wxPyDirSelectorPromptStr,
+                const wxString& defaultPath = wxPyEmptyString,
                 long style = 0,
                 long style = 0,
-                const wxPoint& pos = wxDefaultPosition);
+                const wxPoint& pos = wxDefaultPosition,
+                const wxSize& size = wxDefaultSize,
+                const wxString& name = wxPyDirDialogNameStr);
 
     %pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
 
 
     %pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
 
@@ -89,10 +105,10 @@ public:
 class wxFileDialog : public wxDialog {
 public:
     wxFileDialog(wxWindow* parent,
 class wxFileDialog : public wxDialog {
 public:
     wxFileDialog(wxWindow* parent,
-                 char* message = "Choose a file",
-                 char* defaultDir = "",
-                 char* defaultFile = "",
-                 char* wildcard = "*.*",
+                 const wxString& message = wxPyFileSelectorPromptStr,
+                 const wxString& defaultDir = wxPyEmptyString,
+                 const wxString& defaultFile = wxPyEmptyString,
+                 const wxString& wildcard = wxPyFileSelectorDefaultWildcardStr,
                  long style = 0,
                  const wxPoint& pos = wxDefaultPosition);
 
                  long style = 0,
                  const wxPoint& pos = wxDefaultPosition);
 
@@ -132,7 +148,30 @@ public:
 
 //----------------------------------------------------------------------
 
 
 //----------------------------------------------------------------------
 
-//TODO: wxMultipleChoiceDialog
+enum { wxCHOICEDLG_STYLE };
+
+class wxMultiChoiceDialog : public wxDialog
+{
+public:
+    wxMultiChoiceDialog(wxWindow *parent,
+                        const wxString& message,
+                        const wxString& caption,
+                        int LCOUNT, wxString *choices,
+                        long style = wxCHOICEDLG_STYLE,
+                        const wxPoint& pos = wxDefaultPosition);
+
+    %pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
+
+    void SetSelections(const wxArrayInt& selections);
+
+    // wxArrayInt GetSelections() const;
+    %addmethods {
+        PyObject* GetSelections() {
+            return wxArrayInt2PyList_helper(self->GetSelections());
+        }
+    }
+};
+
 
 //----------------------------------------------------------------------
 
 
 //----------------------------------------------------------------------
 
@@ -146,7 +185,7 @@ public:
                              wxString* caption,
                              int LCOUNT, wxString* choices,
                              //char** clientData = NULL,
                              wxString* caption,
                              int LCOUNT, wxString* choices,
                              //char** clientData = NULL,
-                             long style = wxOK | wxCANCEL | wxCENTRE,
+                             long style = wxCHOICEDLG_STYLE,
                              wxPoint* pos = &wxDefaultPosition) {
             return new wxSingleChoiceDialog(parent, *message, *caption,
                                             LCOUNT, choices, NULL, style, *pos);
                              wxPoint* pos = &wxDefaultPosition) {
             return new wxSingleChoiceDialog(parent, *message, *caption,
                                             LCOUNT, choices, NULL, style, *pos);
@@ -167,9 +206,9 @@ public:
 class wxTextEntryDialog : public wxDialog {
 public:
     wxTextEntryDialog(wxWindow* parent,
 class wxTextEntryDialog : public wxDialog {
 public:
     wxTextEntryDialog(wxWindow* parent,
-                      char* message,
-                      char* caption = "Input Text",
-                      char* defaultValue = "",
+                      const wxString& message,
+                      const wxString& caption = wxPyGetTextFromUserPromptStr,
+                      const wxString& defaultValue = wxPyEmptyString,
                       long style = wxOK | wxCANCEL | wxCENTRE,
                       const wxPoint& pos = wxDefaultPosition);
 
                       long style = wxOK | wxCANCEL | wxCENTRE,
                       const wxPoint& pos = wxDefaultPosition);
 
@@ -205,7 +244,7 @@ public:
 
 class wxFontDialog : public wxDialog {
 public:
 
 class wxFontDialog : public wxDialog {
 public:
-    wxFontDialog(wxWindow* parent, wxFontData* data);
+    wxFontDialog(wxWindow* parent, const wxFontData& data);
     %pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
 
     wxFontData& GetFontData();
     %pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
 
     wxFontData& GetFontData();
@@ -218,8 +257,8 @@ public:
 class wxMessageDialog : public wxDialog {
 public:
     wxMessageDialog(wxWindow* parent,
 class wxMessageDialog : public wxDialog {
 public:
     wxMessageDialog(wxWindow* parent,
-                    char* message,
-                    char* caption = "Message box",
+                    const wxString& message,
+                    const wxString& caption = wxPyMessageBoxCaptionStr,
                     long style = wxOK | wxCANCEL | wxCENTRE,
                     const wxPoint& pos = wxDefaultPosition);
     %pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
                     long style = wxOK | wxCANCEL | wxCENTRE,
                     const wxPoint& pos = wxDefaultPosition);
     %pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
@@ -238,7 +277,7 @@ public:
                      int style = wxPD_AUTO_HIDE | wxPD_APP_MODAL );
     %pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
 
                      int style = wxPD_AUTO_HIDE | wxPD_APP_MODAL );
     %pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
 
-    bool Update(int value = -1, const char* newmsg = NULL);
+    bool Update(int value, const wxString& newmsg = wxPyEmptyString);
     void Resume();
 }
 
     void Resume();
 }