X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b37c7e1dcdad16c20d9800d2abaf53cc6b653a64..cb7acf9cc78c309026bed1038631f2663cd90bda:/wxPython/src/cmndlgs.i diff --git a/wxPython/src/cmndlgs.i b/wxPython/src/cmndlgs.i index 402f5b7c1d..8cef7b42bc 100644 --- a/wxPython/src/cmndlgs.i +++ b/wxPython/src/cmndlgs.i @@ -83,6 +83,7 @@ public: int ShowModal(); }; + //---------------------------------------------------------------------- class wxFileDialog : public wxDialog { @@ -131,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()); + } + } +}; + //---------------------------------------------------------------------- @@ -145,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);