X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1d9301a914cb19e8721fdfae7d6d824444768138..a8fd1047b81302d010ff29b9c0885819cbf25011:/include/wx/rearrangectrl.h diff --git a/include/wx/rearrangectrl.h b/include/wx/rearrangectrl.h index eb52fd96e4..da809d5cbf 100644 --- a/include/wx/rearrangectrl.h +++ b/include/wx/rearrangectrl.h @@ -173,6 +173,9 @@ private: class WXDLLIMPEXP_CORE wxRearrangeDialog : public wxDialog { public: + // default ctor, use Create() later + wxRearrangeDialog() { Init(); } + // ctor for the dialog: message is shown inside the dialog itself, order // and items are passed to wxRearrangeList used internally wxRearrangeDialog(wxWindow *parent, @@ -181,13 +184,41 @@ public: const wxArrayInt& order, const wxArrayString& items, const wxPoint& pos = wxDefaultPosition, - const wxString& name = wxRearrangeDialogNameStr); + const wxString& name = wxRearrangeDialogNameStr) + { + Init(); + + Create(parent, message, title, order, items, pos, name); + } + + bool Create(wxWindow *parent, + const wxString& message, + const wxString& title, + const wxArrayInt& order, + const wxArrayString& items, + const wxPoint& pos = wxDefaultPosition, + const wxString& name = wxRearrangeDialogNameStr); + + + // methods for the dialog customization + + // add extra contents to the dialog below the wxRearrangeCtrl part: the + // given window (usually a wxPanel containing more control inside it) must + // have the dialog as its parent and will be inserted into it at the right + // place by this method + void AddExtraControls(wxWindow *win); + + // return the wxRearrangeList control used by the dialog + wxRearrangeList *GetList() const; + // get the order of items after it was modified by the user - wxArrayInt GetOrder() const - { return m_ctrl->GetList()->GetCurrentOrder(); } + wxArrayInt GetOrder() const; private: + // common part of all ctors + void Init() { m_ctrl = NULL; } + wxRearrangeCtrl *m_ctrl; DECLARE_NO_COPY_CLASS(wxRearrangeDialog)