]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/src/cmndlgs.i
Regenerated file lists so features.h would be installed
[wxWidgets.git] / wxPython / src / cmndlgs.i
index a10349f9cb971370fa2b6a3de92f3855fa2f8e26..8cef7b42bc501060d342dbc943601c4d47e46f9d 100644 (file)
@@ -83,6 +83,7 @@ public:
     int ShowModal();
 };
 
+
 //----------------------------------------------------------------------
 
 class wxFileDialog : public wxDialog {
@@ -117,25 +118,13 @@ public:
         PyObject* GetFilenames() {
             wxArrayString arr;
             self->GetFilenames(arr);
-            size_t count = arr.GetCount();
-            PyObject* listObj = PyList_New(0);
-            for(size_t x=0; x<count; x++) {
-                PyObject* name = PyString_FromString(arr[x]);
-                PyList_Append(listObj, name);
-            }
-            return listObj;
+            return wxArrayString2PyList_helper(arr);
         }
 
         PyObject* GetPaths() {
             wxArrayString arr;
             self->GetPaths(arr);
-            size_t count = arr.GetCount();
-            PyObject* listObj = PyList_New(0);
-            for(size_t x=0; x<count; x++) {
-                PyObject* name = PyString_FromString(arr[x]);
-                PyList_Append(listObj, name);
-            }
-            return listObj;
+            return wxArrayString2PyList_helper(arr);
         }
     }
 };
@@ -143,7 +132,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());
+        }
+    }
+};
+
 
 //----------------------------------------------------------------------
 
@@ -157,7 +169,7 @@ public:
                              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);