X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1169a91932273bc84c23ed9dbd0a2da064d59d66..ba1e9d6cede4073faf42e3e290a030965a2205c3:/include/wx/generic/choicdgg.h diff --git a/include/wx/generic/choicdgg.h b/include/wx/generic/choicdgg.h index d583b4f489..3038a2dff5 100644 --- a/include/wx/generic/choicdgg.h +++ b/include/wx/generic/choicdgg.h @@ -38,7 +38,7 @@ class WXDLLEXPORT wxListBox; class WXDLLEXPORT wxAnyChoiceDialog : public wxDialog { public: - wxAnyChoiceDialog(); + wxAnyChoiceDialog() { } wxAnyChoiceDialog(wxWindow *parent, const wxString& message, @@ -46,7 +46,22 @@ public: int n, const wxString *choices, long styleDlg = wxCHOICEDLG_STYLE, const wxPoint& pos = wxDefaultPosition, - long styleLbox = wxLB_ALWAYS_SB); + long styleLbox = wxLB_ALWAYS_SB) + { + (void)Create(parent, message, caption, n, choices, + styleDlg, pos, styleLbox); + } + wxAnyChoiceDialog(wxWindow *parent, + const wxString& message, + const wxString& caption, + const wxArrayString& choices, + long styleDlg = wxCHOICEDLG_STYLE, + const wxPoint& pos = wxDefaultPosition, + long styleLbox = wxLB_ALWAYS_SB) + { + (void)Create(parent, message, caption, choices, + styleDlg, pos, styleLbox); + } bool Create(wxWindow *parent, const wxString& message, @@ -55,6 +70,13 @@ public: long styleDlg = wxCHOICEDLG_STYLE, const wxPoint& pos = wxDefaultPosition, long styleLbox = wxLB_ALWAYS_SB); + bool Create(wxWindow *parent, + const wxString& message, + const wxString& caption, + const wxArrayString& choices, + long styleDlg = wxCHOICEDLG_STYLE, + const wxPoint& pos = wxDefaultPosition, + long styleLbox = wxLB_ALWAYS_SB); protected: wxListBox *m_listbox; @@ -69,7 +91,10 @@ protected: class WXDLLEXPORT wxSingleChoiceDialog : public wxAnyChoiceDialog { public: - wxSingleChoiceDialog(); + wxSingleChoiceDialog() + { + m_selection = -1; + } wxSingleChoiceDialog(wxWindow *parent, const wxString& message, @@ -79,6 +104,13 @@ public: char **clientData = (char **)NULL, long style = wxCHOICEDLG_STYLE, const wxPoint& pos = wxDefaultPosition); + wxSingleChoiceDialog(wxWindow *parent, + const wxString& message, + const wxString& caption, + const wxArrayString& choices, + char **clientData = (char **)NULL, + long style = wxCHOICEDLG_STYLE, + const wxPoint& pos = wxDefaultPosition); bool Create(wxWindow *parent, const wxString& message, @@ -88,6 +120,13 @@ public: char **clientData = (char **)NULL, long style = wxCHOICEDLG_STYLE, const wxPoint& pos = wxDefaultPosition); + bool Create(wxWindow *parent, + const wxString& message, + const wxString& caption, + const wxArrayString& choices, + char **clientData = (char **)NULL, + long style = wxCHOICEDLG_STYLE, + const wxPoint& pos = wxDefaultPosition); void SetSelection(int sel); int GetSelection() const { return m_selection; } @@ -116,7 +155,7 @@ private: class WXDLLEXPORT wxMultiChoiceDialog : public wxAnyChoiceDialog { public: - wxMultiChoiceDialog(); + wxMultiChoiceDialog() { } wxMultiChoiceDialog(wxWindow *parent, const wxString& message, @@ -124,7 +163,19 @@ public: int n, const wxString *choices, long style = wxCHOICEDLG_STYLE, - const wxPoint& pos = wxDefaultPosition); + const wxPoint& pos = wxDefaultPosition) + { + (void)Create(parent, message, caption, n, choices, style, pos); + } + wxMultiChoiceDialog(wxWindow *parent, + const wxString& message, + const wxString& caption, + const wxArrayString& choices, + long style = wxCHOICEDLG_STYLE, + const wxPoint& pos = wxDefaultPosition) + { + (void)Create(parent, message, caption, choices, style, pos); + } bool Create(wxWindow *parent, const wxString& message, @@ -133,6 +184,12 @@ public: const wxString *choices, long style = wxCHOICEDLG_STYLE, const wxPoint& pos = wxDefaultPosition); + bool Create(wxWindow *parent, + const wxString& message, + const wxString& caption, + const wxArrayString& choices, + long style = wxCHOICEDLG_STYLE, + const wxPoint& pos = wxDefaultPosition); void SetSelections(const wxArrayInt& selections); wxArrayInt GetSelections() const { return m_selections; }