]> git.saurik.com Git - wxWidgets.git/commitdiff
Added some missing STL-like wxArray/wxArrayString constructors.
authorMattia Barbon <mbarbon@cpan.org>
Sat, 31 Jan 2004 18:21:45 +0000 (18:21 +0000)
committerMattia Barbon <mbarbon@cpan.org>
Sat, 31 Jan 2004 18:21:45 +0000 (18:21 +0000)
  Added helper class wxCArrayString, better replacement for
wxArrayString::GetStringArray.
  Added overloaded constructors and Create() methods taking
a wxArrayString for wxCheckListBox, wxChoice, wxComboBox,
wxListBox, wxRadioBox, wxSingleChoiceDialog, wxMultipleChoiceDialog.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@25440 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

95 files changed:
docs/changes.txt
include/wx/arrstr.h
include/wx/cocoa/checklst.h
include/wx/cocoa/choice.h
include/wx/cocoa/combobox.h
include/wx/cocoa/listbox.h
include/wx/cocoa/radiobox.h
include/wx/dynarray.h
include/wx/generic/choicdgg.h
include/wx/gtk/checklst.h
include/wx/gtk/choice.h
include/wx/gtk/combobox.h
include/wx/gtk/listbox.h
include/wx/gtk/radiobox.h
include/wx/gtk1/checklst.h
include/wx/gtk1/choice.h
include/wx/gtk1/combobox.h
include/wx/gtk1/listbox.h
include/wx/gtk1/radiobox.h
include/wx/mac/checklst.h
include/wx/mac/choice.h
include/wx/mac/combobox.h
include/wx/mac/listbox.h
include/wx/mac/menu.h
include/wx/mac/radiobox.h
include/wx/motif/checklst.h
include/wx/motif/choice.h
include/wx/motif/combobox.h
include/wx/motif/listbox.h
include/wx/motif/menu.h
include/wx/motif/radiobox.h
include/wx/msw/checklst.h
include/wx/msw/choice.h
include/wx/msw/combobox.h
include/wx/msw/listbox.h
include/wx/msw/radiobox.h
include/wx/os2/checklst.h
include/wx/os2/choice.h
include/wx/os2/combobox.h
include/wx/os2/listbox.h
include/wx/os2/radiobox.h
include/wx/univ/checklst.h
include/wx/univ/choice.h
include/wx/univ/combobox.h
include/wx/univ/listbox.h
include/wx/univ/radiobox.h
src/cocoa/checklst.mm
src/cocoa/choice.mm
src/cocoa/combobox.mm
src/cocoa/listbox.mm
src/cocoa/radiobox.mm
src/generic/choicdgg.cpp
src/generic/grid.cpp
src/gtk/checklst.cpp
src/gtk/choice.cpp
src/gtk/combobox.cpp
src/gtk/listbox.cpp
src/gtk/radiobox.cpp
src/gtk1/checklst.cpp
src/gtk1/choice.cpp
src/gtk1/combobox.cpp
src/gtk1/listbox.cpp
src/gtk1/radiobox.cpp
src/mac/carbon/checklst.cpp
src/mac/carbon/choice.cpp
src/mac/carbon/combobox.cpp
src/mac/carbon/listbox.cpp
src/mac/carbon/radiobox.cpp
src/mac/checklst.cpp
src/mac/choice.cpp
src/mac/combobox.cpp
src/mac/listbox.cpp
src/mac/radiobox.cpp
src/motif/checklst.cpp
src/motif/choice.cpp
src/motif/combobox.cpp
src/motif/combobox_native.cpp
src/motif/listbox.cpp
src/motif/menu.cpp
src/motif/radiobox.cpp
src/msw/checklst.cpp
src/msw/choice.cpp
src/msw/combobox.cpp
src/msw/listbox.cpp
src/msw/radiobox.cpp
src/os2/checklst.cpp
src/os2/choice.cpp
src/os2/combobox.cpp
src/os2/listbox.cpp
src/os2/radiobox.cpp
src/univ/checklst.cpp
src/univ/choice.cpp
src/univ/combobox.cpp
src/univ/listbox.cpp
src/univ/radiobox.cpp

index 99e306db43559410a9e0e90eaf73c742e723ca61..9b111d4578cce3bacf0a1bd26f41ac1681285430 100644 (file)
@@ -51,7 +51,8 @@ versions, please update your code to not use them.
 - wxTheFontMapper: use wxFontMapper::Get() instead
 - wxStringHashTable: use wxHashMap instead
 - wxHashTableLong: use wxHashMap instead
-- wxArrayString::GetStringArray: no replacement
+- wxArrayString::GetStringArray: use wxCArrayString or alternative wxWindows
+                                 methods taking wxArrayString
 - wxArrayString::Remove(index, count): use RemoveAt instead
 - wxTreeItemId conversion to long is deprecated and shouldn't be used
 - [MSW only] wxWindow::GetUseCtl3D(), GetTransparentBackground() and
@@ -91,6 +92,9 @@ All:
   wxSize (Wlodzimierz Skiba)
 - intermediate wxIPaddress class added to prepare for
   wxIPV6address (Ray Gilbert)
+- added overloaded constructors and Create() methods taking wxArrayString
+  for wxChoice, wxComboBox, wxListBox, wxRadioBox, wxCheckListBox,
+  wxSingleChoiceDialog, wxMultipleChoiceDialog
 
 All (GUI):
 
index 5eed53d2cca38a7e4ea5723f8d2ec984aacd960c..9643b64e7641dba42d9171d350cc12ba879fd502 100644 (file)
@@ -92,10 +92,8 @@ public:
 
   // constructors and destructor
     // default ctor
-  wxArrayString()
-      : m_nSize(0), m_nCount(0), m_pItems(NULL), m_autoSort(FALSE)
-      { Init(FALSE); }
-    // if autoSort is TRUE, the array is always sorted (in alphabetical order)
+  wxArrayString() { Init(false); }
+    // if autoSort is true, the array is always sorted (in alphabetical order)
     //
     // NB: the reason for using int and not bool is that like this we can avoid
     //     using this ctor for implicit conversions from "const char *" (which
@@ -103,9 +101,7 @@ public:
     //
     //     of course, using explicit would be even better - if all compilers
     //     supported it...
-  wxArrayString(int autoSort)
-      : m_nSize(0), m_nCount(0), m_pItems(NULL), m_autoSort(FALSE)
-      { Init(autoSort != 0); }
+  wxArrayString(int autoSort) { Init(autoSort != 0); }
     // copy ctor
   wxArrayString(const wxArrayString& array);
     // assignment operator
@@ -155,14 +151,16 @@ public:
     // take one in their ctor.  You must delete[] it yourself
     // once you are done with it.  Will return NULL if the
     // ArrayString was empty.
+#if WXWIN_COMPATIBILITY_2_4
   wxString* GetStringArray() const;
+#endif
 
   // item management
     // Search the element in the array, starting from the beginning if
-    // bFromEnd is FALSE or from end otherwise. If bCase, comparison is case
+    // bFromEnd is false or from end otherwise. If bCase, comparison is case
     // sensitive (default). Returns index of the first item matched or
     // wxNOT_FOUND
-  int  Index (const wxChar *sz, bool bCase = TRUE, bool bFromEnd = FALSE) const;
+  int  Index (const wxChar *sz, bool bCase = true, bool bFromEnd = false) const;
     // add new element at the end (if the array is not sorted), return its
     // index
   size_t Add(const wxString& str, size_t nInsert = 1);
@@ -180,8 +178,8 @@ public:
 
   // sorting
     // sort array elements in alphabetical order (or reversed alphabetical
-    // order if reverseOrder parameter is TRUE)
-  void Sort(bool reverseOrder = FALSE);
+    // order if reverseOrder parameter is true)
+  void Sort(bool reverseOrder = false);
     // sort array elements using specified comparaison function
   void Sort(CompareFunction compareFunction);
   void Sort(CompareFunction2 compareFunction);
@@ -257,6 +255,9 @@ public:
     bool operator !=(const itor& it) { return m_ptr != it.m_ptr; }
   };
 
+  wxArrayString(const_iterator first, const_iterator last)
+    { Init(false); assign(first, last); }
+  wxArrayString(size_type n, const_reference v) { Init(false); assign(n, v); }
   void assign(const_iterator first, const_iterator last);
   void assign(size_type n, const_reference v)
     { clear(); Add(v, n); }
@@ -309,18 +310,43 @@ private:
 
   wxChar  **m_pItems; // pointer to data
 
-  bool    m_autoSort; // if TRUE, keep the array always sorted
+  bool    m_autoSort; // if true, keep the array always sorted
 };
 
 class WXDLLIMPEXP_BASE wxSortedArrayString : public wxArrayString
 {
 public:
-  wxSortedArrayString() : wxArrayString(TRUE)
+  wxSortedArrayString() : wxArrayString(true)
     { }
-  wxSortedArrayString(const wxArrayString& array) : wxArrayString(TRUE)
+  wxSortedArrayString(const wxArrayString& array) : wxArrayString(true)
     { Copy(array); }
 };
 
 #endif // !wxUSE_STL
 
+// this class provides a temporary wxString* from a
+// wxArrayString
+class WXDLLIMPEXP_BASE wxCArrayString
+{
+public:
+    wxCArrayString( const wxArrayString& array )
+        : m_array( array ), m_strings( NULL )
+    { }
+    ~wxCArrayString() { delete[] m_strings; }
+
+    size_t GetCount() const { return m_array.GetCount(); }
+    wxString* GetStrings()
+    {
+        if( m_strings ) return m_strings;
+        size_t count = m_array.GetCount();
+        m_strings = new wxString[count];
+        for( size_t i = 0; i < count; ++i )
+            m_strings[i] = m_array[i];
+        return m_strings;
+    }
+private:
+    const wxArrayString& m_array;
+    wxString* m_strings;
+};
+
 #endif
index 4286b1a3d65edf5717ed63e74d61f1ac51c5d81f..7b4c59315dfc66f8f2e56f7695cbd107eafa5941 100644 (file)
@@ -37,6 +37,16 @@ public:
     {
         Create(parent, winid,  pos, size, n, choices, style, validator, name);
     }
+    wxCheckListBox(wxWindow *parent, wxWindowID winid,
+            const wxPoint& pos,
+            const wxSize& size,
+            const wxArrayString& choices,
+            long style = 0,
+            const wxValidator& validator = wxDefaultValidator,
+            const wxString& name = wxListBoxNameStr)
+    {
+        Create(parent, winid,  pos, size, choices, style, validator, name);
+    }
 
     bool Create(wxWindow *parent, wxWindowID winid,
             const wxPoint& pos = wxDefaultPosition,
@@ -45,6 +55,13 @@ public:
             long style = 0,
             const wxValidator& validator = wxDefaultValidator,
             const wxString& name = wxListBoxNameStr);
+    bool Create(wxWindow *parent, wxWindowID winid,
+            const wxPoint& pos,
+            const wxSize& size,
+            const wxArrayString& choices,
+            long style = 0,
+            const wxValidator& validator = wxDefaultValidator,
+            const wxString& name = wxListBoxNameStr);
     virtual ~wxCheckListBox();
 
 // ------------------------------------------------------------------------
index 3f6370a6732bb64b20db72caccc2f6aaaa00ec33..7db48f39f02b75486efd7cb522d789dd501c3f39 100644 (file)
@@ -15,6 +15,8 @@
 //#include "wx/cocoa/NSPopUpButton.h"
 #include "wx/cocoa/NSMenu.h"
 
+class WXDLLIMPEXP_BASE wxSortedArrayString;
+
 // ========================================================================
 // wxChoice
 // ========================================================================
@@ -39,6 +41,17 @@ public:
         Init();
         Create(parent, winid,  pos, size, n, choices, style, validator, name);
     }
+    wxChoice(wxWindow *parent, wxWindowID winid,
+            const wxPoint& pos,
+            const wxSize& size,
+            const wxArrayString& choices,
+            long style = 0,
+            const wxValidator& validator = wxDefaultValidator,
+            const wxString& name = wxChoiceNameStr)
+    {
+        Init();
+        Create(parent, winid,  pos, size, choices, style, validator, name);
+    }
 
     bool Create(wxWindow *parent, wxWindowID winid,
             const wxPoint& pos = wxDefaultPosition,
@@ -47,6 +60,13 @@ public:
             long style = 0,
             const wxValidator& validator = wxDefaultValidator,
             const wxString& name = wxChoiceNameStr);
+    bool Create(wxWindow *parent, wxWindowID winid,
+            const wxPoint& pos,
+            const wxSize& size,
+            const wxArrayString& choices,
+            long style = 0,
+            const wxValidator& validator = wxDefaultValidator,
+            const wxString& name = wxChoiceNameStr);
     virtual ~wxChoice();
 protected:
     void Init();
index 2b665585d335e9d5d3fa38c920b34483550e6090..b1abb3950cdb61982af9b57feacf060c0587fe9a 100644 (file)
@@ -40,6 +40,18 @@ public:
     {
         Create(parent, winid, value, pos, size, n, choices, style, validator, name);
     }
+    wxComboBox(wxWindow *parent, wxWindowID winid,
+            const wxString& value,
+            const wxPoint& pos,
+            const wxSize& size,
+            const wxArrayString& choices,
+            long style = 0,
+            const wxValidator& validator = wxDefaultValidator,
+            const wxString& name = wxComboBoxNameStr)
+    {
+        Create(parent, winid, value, pos, size, choices, style,
+               validator, name);
+    }
 
     bool Create(wxWindow *parent, wxWindowID winid,
             const wxString& value = wxEmptyString,
@@ -49,6 +61,14 @@ public:
             long style = 0,
             const wxValidator& validator = wxDefaultValidator,
             const wxString& name = wxComboBoxNameStr);
+    bool Create(wxWindow *parent, wxWindowID winid,
+            const wxString& value,
+            const wxPoint& pos,
+            const wxSize& size,
+            const wxArrayString& choices,
+            long style = 0,
+            const wxValidator& validator = wxDefaultValidator,
+            const wxString& name = wxComboBoxNameStr);
     virtual ~wxComboBox();
 
 // ------------------------------------------------------------------------
index 5d2dec15ba4bb39a75db010cf416d34794ac74dc..94f6ea0897c1ff9c1bbf514d17890133a218047a 100644 (file)
@@ -39,6 +39,16 @@ public:
     {
         Create(parent, winid,  pos, size, n, choices, style, validator, name);
     }
+    wxListBox(wxWindow *parent, wxWindowID winid,
+            const wxPoint& pos,
+            const wxSize& size,
+            const wxArrayString& choices,
+            long style = 0,
+            const wxValidator& validator = wxDefaultValidator,
+            const wxString& name = wxListBoxNameStr)
+    {
+        Create(parent, winid,  pos, size, choices, style, validator, name);
+    }
 
     bool Create(wxWindow *parent, wxWindowID winid,
             const wxPoint& pos = wxDefaultPosition,
@@ -47,6 +57,13 @@ public:
             long style = 0,
             const wxValidator& validator = wxDefaultValidator,
             const wxString& name = wxListBoxNameStr);
+    bool Create(wxWindow *parent, wxWindowID winid,
+            const wxPoint& pos,
+            const wxSize& size,
+            const wxArrayString& choices,
+            long style = 0,
+            const wxValidator& validator = wxDefaultValidator,
+            const wxString& name = wxListBoxNameStr);
     virtual ~wxListBox();
 
 // ------------------------------------------------------------------------
index 7db85c0655d3653d5149042e62099ec8ca6d726a..363ffd3a359db900f69f6a1baf67538aefb73b54 100644 (file)
@@ -38,6 +38,17 @@ public:
     {
         Create(parent, winid, title, pos, size, n, choices, majorDim, style, validator, name);
     }
+    wxRadioBox(wxWindow *parent, wxWindowID winid,
+            const wxString& title,
+            const wxPoint& pos,
+            const wxSize& size,
+            const wxArrayString& choices,
+            int majorDim = 0,
+            long style = 0, const wxValidator& validator = wxDefaultValidator,
+            const wxString& name = wxRadioBoxNameStr)
+    {
+        Create(parent, winid, title, pos, size, choices, majorDim, style, validator, name);
+    }
 
     bool Create(wxWindow *parent, wxWindowID winid,
             const wxString& title,
@@ -48,6 +59,15 @@ public:
             long style = 0,
             const wxValidator& validator = wxDefaultValidator,
             const wxString& name = wxRadioBoxNameStr);
+    bool Create(wxWindow *parent, wxWindowID winid,
+            const wxString& title,
+            const wxPoint& pos,
+            const wxSize& size,
+            const wxArrayString& choices,
+            int majorDim = 0,
+            long style = 0,
+            const wxValidator& validator = wxDefaultValidator,
+            const wxString& name = wxRadioBoxNameStr);
     virtual ~wxRadioBox();
 
 // ------------------------------------------------------------------------
index d784dff844489aeca4538f0e2ede7eb6fa4b0f44..4c0346dbc9c85ccf8e81841243e5048cac266cb8 100644 (file)
@@ -442,6 +442,9 @@ public:                                                               \
     bool operator !=(const itor& it) { return m_ptr != it.m_ptr; }    \
   };                                                                  \
                                                                       \
+  name(size_type n, const_reference v) { assign(n, v); }              \
+  name(const_iterator first, const_iterator last)                     \
+    { assign(first, last); }                                          \
   void assign(const_iterator first, const_iterator last)              \
     { base::assign((bconst_iterator)first, (bconst_iterator)last); }  \
   void assign(size_type n, const_reference v)                         \
index 2ccd871e432e5e2a778859c6bc79f4b4dded85ff..3038a2dff58e85a249c828e4fb425fa16317769c 100644 (file)
@@ -51,6 +51,17 @@ public:
         (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,
@@ -59,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;
@@ -86,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,
@@ -95,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; }
@@ -135,6 +167,15 @@ public:
     {
         (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,
@@ -143,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; }
index aa26886c0f18248b748afd8e09c8627fe175b41c..b2afb54cf3dd113ac9ebf5f74baa20ba608700a2 100644 (file)
@@ -44,6 +44,13 @@ public:
             long style = 0,
             const wxValidator& validator = wxDefaultValidator,
             const wxString& name = wxListBoxNameStr);
+    wxCheckListBox(wxWindow *parent, wxWindowID id,
+            const wxPoint& pos,
+            const wxSize& size,
+            const wxArrayString& choices,
+            long style = 0,
+            const wxValidator& validator = wxDefaultValidator,
+            const wxString& name = wxListBoxNameStr);
 
     bool IsChecked( int index ) const;
     void Check( int index, bool check = TRUE );
index a6e0ecd1beb46ae62c3d6e9f41c23bfe75a87f47..d738e3e253e614adda99eb9af47a8509fc5d0287 100644 (file)
@@ -15,6 +15,7 @@
 #endif
 
 class WXDLLIMPEXP_BASE wxSortedArrayString;
+class WXDLLIMPEXP_BASE wxArrayString;
 
 //-----------------------------------------------------------------------------
 // wxChoice
@@ -36,6 +37,18 @@ public:
 
         Create(parent, id, pos, size, n, choices, style, validator, name);
     }
+    wxChoice( wxWindow *parent, wxWindowID id,
+            const wxPoint& pos,
+            const wxSize& size,
+            const wxArrayString& choices,
+            long style = 0,
+            const wxValidator& validator = wxDefaultValidator,
+            const wxString& name = wxChoiceNameStr )
+    {
+        m_strings = (wxSortedArrayString *)NULL;
+
+        Create(parent, id, pos, size, choices, style, validator, name);
+    }
     ~wxChoice();
     bool Create( wxWindow *parent, wxWindowID id,
             const wxPoint& pos = wxDefaultPosition,
@@ -44,6 +57,13 @@ public:
             long style = 0,
             const wxValidator& validator = wxDefaultValidator,
             const wxString& name = wxChoiceNameStr );
+    bool Create( wxWindow *parent, wxWindowID id,
+            const wxPoint& pos,
+            const wxSize& size,
+            const wxArrayString& choices,
+            long style = 0,
+            const wxValidator& validator = wxDefaultValidator,
+            const wxString& name = wxChoiceNameStr );
 
     // implement base class pure virtuals
     void Delete(int n);
index 54f5d30cf7acd16cd3fed3343978e9fd3e6c450b..6cd8dafe5b5ed04df92d473f787a36022a697e72 100644 (file)
@@ -54,6 +54,17 @@ public:
     {
         Create(parent, id, value, pos, size, n, choices, style, validator, name);
     }
+    inline wxComboBox(wxWindow *parent, wxWindowID id,
+           const wxString& value,
+           const wxPoint& pos,
+           const wxSize& size,
+           const wxArrayString& choices,
+           long style = 0,
+           const wxValidator& validator = wxDefaultValidator,
+           const wxString& name = wxComboBoxNameStr)
+    {
+        Create(parent, id, value, pos, size, choices, style, validator, name);
+    }
 
     ~wxComboBox();
 
@@ -65,6 +76,14 @@ public:
            long style = 0,
            const wxValidator& validator = wxDefaultValidator,
            const wxString& name = wxComboBoxNameStr);
+    bool Create(wxWindow *parent, wxWindowID id,
+           const wxString& value,
+           const wxPoint& pos,
+           const wxSize& size,
+           const wxArrayString& choices,
+           long style = 0,
+           const wxValidator& validator = wxDefaultValidator,
+           const wxString& name = wxComboBoxNameStr);
 
     void Clear();
     void Delete( int n );
index 3a91c721c78805291feb6aebd3eca58c114f6606..7974011566c330fd78e44a99574c26bb6963a52c 100644 (file)
@@ -41,6 +41,19 @@ public:
 #endif // wxUSE_CHECKLISTBOX
         Create(parent, id, pos, size, n, choices, style, validator, name);
     }
+    wxListBox( wxWindow *parent, wxWindowID id,
+            const wxPoint& pos,
+            const wxSize& size,
+            const wxArrayString& choices,
+            long style = 0,
+            const wxValidator& validator = wxDefaultValidator,
+            const wxString& name = wxListBoxNameStr )
+    {
+#if wxUSE_CHECKLISTBOX
+        m_hasCheckBoxes = FALSE;
+#endif // wxUSE_CHECKLISTBOX
+        Create(parent, id, pos, size, choices, style, validator, name);
+    }
     virtual ~wxListBox();
 
     bool Create(wxWindow *parent, wxWindowID id,
@@ -50,6 +63,13 @@ public:
                 long style = 0,
                 const wxValidator& validator = wxDefaultValidator,
                 const wxString& name = wxListBoxNameStr);
+    bool Create(wxWindow *parent, wxWindowID id,
+                const wxPoint& pos,
+                const wxSize& size,
+                const wxArrayString& choices,
+                long style = 0,
+                const wxValidator& validator = wxDefaultValidator,
+                const wxString& name = wxListBoxNameStr);
 
     // implement base class pure virtuals
     virtual void Clear();
index e0e45b054ee25dd3fd6283475ce58b33f5134840..bba9a528e2eabbe3e762dffa9ccea0c2032dac2a 100644 (file)
@@ -41,6 +41,21 @@ public:
 
         Create( parent, id, title, pos, size, n, choices, majorDim, style, val, name );
     }
+    wxRadioBox(wxWindow *parent,
+               wxWindowID id,
+               const wxString& title,
+               const wxPoint& pos,
+               const wxSize& size,
+               const wxArrayString& choices,
+               int majorDim = 1,
+               long style = wxRA_HORIZONTAL,
+               const wxValidator& val = wxDefaultValidator,
+               const wxString& name = wxRadioBoxNameStr)
+    {
+        Init();
+
+        Create( parent, id, title, pos, size, choices, majorDim, style, val, name );
+    }
 
     virtual ~wxRadioBox();
     bool Create(wxWindow *parent,
@@ -54,6 +69,16 @@ public:
                 long style = wxRA_HORIZONTAL,
                 const wxValidator& val = wxDefaultValidator,
                 const wxString& name = wxRadioBoxNameStr);
+    bool Create(wxWindow *parent,
+                wxWindowID id,
+                const wxString& title,
+                const wxPoint& pos,
+                const wxSize& size,
+                const wxArrayString& choices,
+                int majorDim = 0,
+                long style = wxRA_HORIZONTAL,
+                const wxValidator& val = wxDefaultValidator,
+                const wxString& name = wxRadioBoxNameStr);
 
     int FindString( const wxString& s) const;
     void SetSelection( int n );
index aa26886c0f18248b748afd8e09c8627fe175b41c..b2afb54cf3dd113ac9ebf5f74baa20ba608700a2 100644 (file)
@@ -44,6 +44,13 @@ public:
             long style = 0,
             const wxValidator& validator = wxDefaultValidator,
             const wxString& name = wxListBoxNameStr);
+    wxCheckListBox(wxWindow *parent, wxWindowID id,
+            const wxPoint& pos,
+            const wxSize& size,
+            const wxArrayString& choices,
+            long style = 0,
+            const wxValidator& validator = wxDefaultValidator,
+            const wxString& name = wxListBoxNameStr);
 
     bool IsChecked( int index ) const;
     void Check( int index, bool check = TRUE );
index a6e0ecd1beb46ae62c3d6e9f41c23bfe75a87f47..d738e3e253e614adda99eb9af47a8509fc5d0287 100644 (file)
@@ -15,6 +15,7 @@
 #endif
 
 class WXDLLIMPEXP_BASE wxSortedArrayString;
+class WXDLLIMPEXP_BASE wxArrayString;
 
 //-----------------------------------------------------------------------------
 // wxChoice
@@ -36,6 +37,18 @@ public:
 
         Create(parent, id, pos, size, n, choices, style, validator, name);
     }
+    wxChoice( wxWindow *parent, wxWindowID id,
+            const wxPoint& pos,
+            const wxSize& size,
+            const wxArrayString& choices,
+            long style = 0,
+            const wxValidator& validator = wxDefaultValidator,
+            const wxString& name = wxChoiceNameStr )
+    {
+        m_strings = (wxSortedArrayString *)NULL;
+
+        Create(parent, id, pos, size, choices, style, validator, name);
+    }
     ~wxChoice();
     bool Create( wxWindow *parent, wxWindowID id,
             const wxPoint& pos = wxDefaultPosition,
@@ -44,6 +57,13 @@ public:
             long style = 0,
             const wxValidator& validator = wxDefaultValidator,
             const wxString& name = wxChoiceNameStr );
+    bool Create( wxWindow *parent, wxWindowID id,
+            const wxPoint& pos,
+            const wxSize& size,
+            const wxArrayString& choices,
+            long style = 0,
+            const wxValidator& validator = wxDefaultValidator,
+            const wxString& name = wxChoiceNameStr );
 
     // implement base class pure virtuals
     void Delete(int n);
index 54f5d30cf7acd16cd3fed3343978e9fd3e6c450b..6cd8dafe5b5ed04df92d473f787a36022a697e72 100644 (file)
@@ -54,6 +54,17 @@ public:
     {
         Create(parent, id, value, pos, size, n, choices, style, validator, name);
     }
+    inline wxComboBox(wxWindow *parent, wxWindowID id,
+           const wxString& value,
+           const wxPoint& pos,
+           const wxSize& size,
+           const wxArrayString& choices,
+           long style = 0,
+           const wxValidator& validator = wxDefaultValidator,
+           const wxString& name = wxComboBoxNameStr)
+    {
+        Create(parent, id, value, pos, size, choices, style, validator, name);
+    }
 
     ~wxComboBox();
 
@@ -65,6 +76,14 @@ public:
            long style = 0,
            const wxValidator& validator = wxDefaultValidator,
            const wxString& name = wxComboBoxNameStr);
+    bool Create(wxWindow *parent, wxWindowID id,
+           const wxString& value,
+           const wxPoint& pos,
+           const wxSize& size,
+           const wxArrayString& choices,
+           long style = 0,
+           const wxValidator& validator = wxDefaultValidator,
+           const wxString& name = wxComboBoxNameStr);
 
     void Clear();
     void Delete( int n );
index 3a91c721c78805291feb6aebd3eca58c114f6606..7974011566c330fd78e44a99574c26bb6963a52c 100644 (file)
@@ -41,6 +41,19 @@ public:
 #endif // wxUSE_CHECKLISTBOX
         Create(parent, id, pos, size, n, choices, style, validator, name);
     }
+    wxListBox( wxWindow *parent, wxWindowID id,
+            const wxPoint& pos,
+            const wxSize& size,
+            const wxArrayString& choices,
+            long style = 0,
+            const wxValidator& validator = wxDefaultValidator,
+            const wxString& name = wxListBoxNameStr )
+    {
+#if wxUSE_CHECKLISTBOX
+        m_hasCheckBoxes = FALSE;
+#endif // wxUSE_CHECKLISTBOX
+        Create(parent, id, pos, size, choices, style, validator, name);
+    }
     virtual ~wxListBox();
 
     bool Create(wxWindow *parent, wxWindowID id,
@@ -50,6 +63,13 @@ public:
                 long style = 0,
                 const wxValidator& validator = wxDefaultValidator,
                 const wxString& name = wxListBoxNameStr);
+    bool Create(wxWindow *parent, wxWindowID id,
+                const wxPoint& pos,
+                const wxSize& size,
+                const wxArrayString& choices,
+                long style = 0,
+                const wxValidator& validator = wxDefaultValidator,
+                const wxString& name = wxListBoxNameStr);
 
     // implement base class pure virtuals
     virtual void Clear();
index e0e45b054ee25dd3fd6283475ce58b33f5134840..bba9a528e2eabbe3e762dffa9ccea0c2032dac2a 100644 (file)
@@ -41,6 +41,21 @@ public:
 
         Create( parent, id, title, pos, size, n, choices, majorDim, style, val, name );
     }
+    wxRadioBox(wxWindow *parent,
+               wxWindowID id,
+               const wxString& title,
+               const wxPoint& pos,
+               const wxSize& size,
+               const wxArrayString& choices,
+               int majorDim = 1,
+               long style = wxRA_HORIZONTAL,
+               const wxValidator& val = wxDefaultValidator,
+               const wxString& name = wxRadioBoxNameStr)
+    {
+        Init();
+
+        Create( parent, id, title, pos, size, choices, majorDim, style, val, name );
+    }
 
     virtual ~wxRadioBox();
     bool Create(wxWindow *parent,
@@ -54,6 +69,16 @@ public:
                 long style = wxRA_HORIZONTAL,
                 const wxValidator& val = wxDefaultValidator,
                 const wxString& name = wxRadioBoxNameStr);
+    bool Create(wxWindow *parent,
+                wxWindowID id,
+                const wxString& title,
+                const wxPoint& pos,
+                const wxSize& size,
+                const wxArrayString& choices,
+                int majorDim = 0,
+                long style = wxRA_HORIZONTAL,
+                const wxValidator& val = wxDefaultValidator,
+                const wxString& name = wxRadioBoxNameStr);
 
     int FindString( const wxString& s) const;
     void SetSelection( int n );
index 3bf972d7a244e1eb2649d74b563ac064a6a0a32f..35f3bd885deebeede877992f0971fea39bbc0f2a 100644 (file)
@@ -41,6 +41,19 @@ public:
 
         Create(parent, id, pos, size, nStrings, choices, style, validator, name);
     }
+    wxCheckListBox(wxWindow *parent,
+                   wxWindowID id,
+                   const wxPoint& pos,
+                   const wxSize& size,
+                   const wxArrayString& choices,
+                   long style = 0,
+                   const wxValidator& validator = wxDefaultValidator,
+                   const wxString& name = wxListBoxNameStr)
+    {
+        Init();
+
+        Create(parent, id, pos, size, choices, style, validator, name);
+    }
 
     bool Create(wxWindow *parent,
                 wxWindowID id,
@@ -51,6 +64,14 @@ public:
                 long style = 0,
                 const wxValidator& validator = wxDefaultValidator,
                 const wxString& name = wxListBoxNameStr);
+    bool Create(wxWindow *parent,
+                wxWindowID id,
+                const wxPoint& pos,
+                const wxSize& size,
+                const wxArrayString& choices,
+                long style = 0,
+                const wxValidator& validator = wxDefaultValidator,
+                const wxString& name = wxListBoxNameStr);
 
   // items may be checked
   bool  IsChecked(size_t uiIndex) const;
index 26ac3359c0766f78447bcd7b9bc4b7c3fbc77eb8..4c10bab315ef2574864ab567a4f30ebd731c291b 100644 (file)
@@ -18,7 +18,8 @@
 
 #include "wx/control.h"
 
-  #include  "wx/dynarray.h"
+#include  "wx/dynarray.h"
+#include  "wx/arrstr.h"
 
 WXDLLEXPORT_DATA(extern const wxChar*) wxChoiceNameStr;
 
@@ -46,6 +47,16 @@ public:
   {
     Create(parent, id, pos, size, n, choices, style, validator, name);
   }
+  wxChoice(wxWindow *parent, wxWindowID id,
+           const wxPoint& pos,
+           const wxSize& size,
+           const wxArrayString& choices,
+           long style = 0,
+           const wxValidator& validator = wxDefaultValidator,
+           const wxString& name = wxChoiceNameStr)
+  {
+    Create(parent, id, pos, size, choices, style, validator, name);
+  }
 
   bool Create(wxWindow *parent, wxWindowID id,
            const wxPoint& pos = wxDefaultPosition,
@@ -54,6 +65,13 @@ public:
            long style = 0,
            const wxValidator& validator = wxDefaultValidator,
            const wxString& name = wxChoiceNameStr);
+  bool Create(wxWindow *parent, wxWindowID id,
+           const wxPoint& pos,
+           const wxSize& size,
+           const wxArrayString& choices,
+           long style = 0,
+           const wxValidator& validator = wxDefaultValidator,
+           const wxString& name = wxChoiceNameStr);
 
   // implement base class pure virtuals
   virtual int DoAppend(const wxString& item);
index d2528db2375ee17a4bc7a074b947f420001ab6c4..68b3b0282074b94315b119bca3c93ca6f3b54f6a 100644 (file)
@@ -53,6 +53,17 @@ class WXDLLEXPORT wxComboBox : public wxControl, public wxComboBoxBase
     {
     Create(parent, id, value, pos, size, n, choices, style, validator, name);
     }
+    inline wxComboBox(wxWindow *parent, wxWindowID id,
+           const wxString& value,
+           const wxPoint& pos,
+           const wxSize& size,
+           const wxArrayString& choices,
+           long style = 0,
+           const wxValidator& validator = wxDefaultValidator,
+           const wxString& name = wxComboBoxNameStr)
+    {
+    Create(parent, id, value, pos, size, choices, style, validator, name);
+    }
 
     bool Create(wxWindow *parent, wxWindowID id,
            const wxString& value = wxEmptyString,
@@ -62,6 +73,14 @@ class WXDLLEXPORT wxComboBox : public wxControl, public wxComboBoxBase
            long style = 0,
            const wxValidator& validator = wxDefaultValidator,
            const wxString& name = wxComboBoxNameStr);
+    bool Create(wxWindow *parent, wxWindowID id,
+           const wxString& value,
+           const wxPoint& pos,
+           const wxSize& size,
+           const wxArrayString& choices,
+           long style = 0,
+           const wxValidator& validator = wxDefaultValidator,
+           const wxString& name = wxComboBoxNameStr);
 
     // List functions
     virtual void Delete(int n);
index d1ca11ca7a99e8378fb86708c494031e7388bc68..0df5bd0366c24e091e2bda4485552a469428ed1e 100644 (file)
@@ -21,7 +21,7 @@
 // simple types
 // ----------------------------------------------------------------------------
 #include  "wx/dynarray.h"
-
+#include  "wx/arrstr.h"
 
 #if wxUSE_OWNER_DRAWN
   class WXDLLEXPORT wxOwnerDrawn;
@@ -58,6 +58,16 @@ public:
     {
         Create(parent, id, pos, size, n, choices, style, validator, name);
     }
+    wxListBox(wxWindow *parent, wxWindowID id,
+            const wxPoint& pos,
+            const wxSize& size,
+            const wxArrayString& choices,
+            long style = 0,
+            const wxValidator& validator = wxDefaultValidator,
+            const wxString& name = wxListBoxNameStr)
+    {
+        Create(parent, id, pos, size, choices, style, validator, name);
+    }
 
     bool Create(wxWindow *parent, wxWindowID id,
                 const wxPoint& pos = wxDefaultPosition,
@@ -66,6 +76,13 @@ public:
                 long style = 0,
                 const wxValidator& validator = wxDefaultValidator,
                 const wxString& name = wxListBoxNameStr);
+    bool Create(wxWindow *parent, wxWindowID id,
+                const wxPoint& pos,
+                const wxSize& size,
+                const wxArrayString& choices,
+                long style = 0,
+                const wxValidator& validator = wxDefaultValidator,
+                const wxString& name = wxListBoxNameStr);
 
     virtual ~wxListBox();
     virtual void Refresh(bool eraseBack = TRUE, const wxRect *rect = NULL);
index 5f2cd2344c6036a89f927f743b60b3ebdd7f48e9..854a70d107e077a37dd73e69d9159caed9f7e649 100644 (file)
@@ -18,6 +18,8 @@
 
 class WXDLLEXPORT wxFrame;
 
+#include "wx/arrstr.h"
+
 // ----------------------------------------------------------------------------
 // Menu
 // ----------------------------------------------------------------------------
index 79bd01c0ac2dbcb594324957efef84fd53a7db4b..c9642e2debcaecaad1d243b8d670be74b763d647 100644 (file)
@@ -35,12 +35,28 @@ public:
         {
             Create(parent, id, title, pos, size, n, choices, majorDim, style, val, name);
         }
+    inline wxRadioBox(wxWindow *parent, wxWindowID id, const wxString& title,
+             const wxPoint& pos, const wxSize& size,
+             const wxArrayString& choices,
+             int majorDim = 0, long style = wxRA_HORIZONTAL,
+             const wxValidator& val = wxDefaultValidator,
+             const wxString& name = wxRadioBoxNameStr)
+     {
+         Create(parent, id, title, pos, size, choices,
+                majorDim, style, val, name);
+     }
     ~wxRadioBox();
     bool Create(wxWindow *parent, wxWindowID id, const wxString& title,
              const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
              int n = 0, const wxString choices[] = NULL,
              int majorDim = 0, long style = wxRA_HORIZONTAL,
              const wxValidator& val = wxDefaultValidator, const wxString& name = wxRadioBoxNameStr);
+    bool Create(wxWindow *parent, wxWindowID id, const wxString& title,
+             const wxPoint& pos, const wxSize& size,
+             const wxArrayString& choices,
+             int majorDim = 0, long style = wxRA_HORIZONTAL,
+             const wxValidator& val = wxDefaultValidator,
+             const wxString& name = wxRadioBoxNameStr);
 
 // Specific functions (in wxWindows2 reference)
     virtual void SetSelection(int item);
index 32370ab30cadfa23836e183b83b5e243b6e4b780..f097bd739f0eba22e874ba6ba489331caf31015d 100644 (file)
@@ -35,6 +35,14 @@ public:
         const wxValidator& validator = wxDefaultValidator,
         const wxString& name = wxListBoxNameStr);
 
+    wxCheckListBox(wxWindow *parent, wxWindowID id,
+        const wxPoint& pos,
+        const wxSize& size,
+        const wxArrayString& choices,
+        long style = 0,
+        const wxValidator& validator = wxDefaultValidator,
+        const wxString& name = wxListBoxNameStr);
+
     bool Create(wxWindow *parent, wxWindowID id,
         const wxPoint& pos = wxDefaultPosition,
         const wxSize& size = wxDefaultSize,
@@ -43,6 +51,14 @@ public:
         const wxValidator& validator = wxDefaultValidator,
         const wxString& name = wxListBoxNameStr);
     
+    bool Create(wxWindow *parent, wxWindowID id,
+        const wxPoint& pos,
+        const wxSize& size,
+        const wxArrayString& choices,
+        long style = 0,
+        const wxValidator& validator = wxDefaultValidator,
+        const wxString& name = wxListBoxNameStr);
+    
     // items may be checked
     bool IsChecked(size_t uiIndex) const;
     void Check(size_t uiIndex, bool bCheck = TRUE);
index 1636502e63030e8fd4f2e69e08d6843cc07ba964..8a01c3cb2347039f6b8aacfb2a366753c7e90370 100644 (file)
@@ -46,6 +46,18 @@ public:
         Create(parent, id, pos, size, n, choices, style, validator, name);
     }
     
+    wxChoice(wxWindow *parent, wxWindowID id,
+        const wxPoint& pos,
+        const wxSize& size,
+        const wxArrayString& choices,
+        long style = 0,
+        const wxValidator& validator = wxDefaultValidator,
+        const wxString& name = wxChoiceNameStr)
+    {
+        Init();
+        Create(parent, id, pos, size, choices, style, validator, name);
+    }
+
     bool Create(wxWindow *parent, wxWindowID id,
         const wxPoint& pos = wxDefaultPosition,
         const wxSize& size = wxDefaultSize,
@@ -54,6 +66,14 @@ public:
         const wxValidator& validator = wxDefaultValidator,
         const wxString& name = wxChoiceNameStr);
 
+    bool Create(wxWindow *parent, wxWindowID id,
+        const wxPoint& pos,
+        const wxSize& size,
+        const wxArrayString& choices,
+        long style = 0,
+        const wxValidator& validator = wxDefaultValidator,
+        const wxString& name = wxChoiceNameStr);
+
     // implementation of wxControlWithItems
     virtual int GetCount() const;
     virtual int DoAppend(const wxString& item);
index c3f748e0fe7c327e2107e6f1495896372deb5133..d0b5b2532c18253915b959cde6ce42dc2448ec1c 100644 (file)
@@ -41,6 +41,20 @@ public:
                style, validator, name);
     }
     
+    inline wxComboBox(wxWindow *parent, wxWindowID id,
+        const wxString& value,
+        const wxPoint& pos,
+        const wxSize& size,
+        const wxArrayString& choices,
+        long style = 0,
+        const wxValidator& validator = wxDefaultValidator,
+        const wxString& name = wxComboBoxNameStr)
+    {
+        m_inSetSelection = false;
+        Create(parent, id, value, pos, size, choices,
+               style, validator, name);
+    }
+    
     bool Create(wxWindow *parent, wxWindowID id,
         const wxString& value = wxEmptyString,
         const wxPoint& pos = wxDefaultPosition,
@@ -50,6 +64,15 @@ public:
         const wxValidator& validator = wxDefaultValidator,
         const wxString& name = wxComboBoxNameStr);
     
+    bool Create(wxWindow *parent, wxWindowID id,
+        const wxString& value,
+        const wxPoint& pos,
+        const wxSize& size,
+        const wxArrayString& choices,
+        long style = 0,
+        const wxValidator& validator = wxDefaultValidator,
+        const wxString& name = wxComboBoxNameStr);
+    
     // implementation of wxControlWithItems
     virtual int DoAppend(const wxString& item);
     virtual int DoInsert(const wxString& item, int pos);
index 93a3fac24cd9ad5832297c4115c6a1194364aabb..07c77df706460fc4f5061fda59bbbe733017fd96 100644 (file)
@@ -40,6 +40,17 @@ public:
         Create(parent, id, pos, size, n, choices, style, validator, name);
     }
     
+    wxListBox(wxWindow *parent, wxWindowID id,
+        const wxPoint& pos,
+        const wxSize& size,
+        const wxArrayString& choices,
+        long style = 0,
+        const wxValidator& validator = wxDefaultValidator,
+        const wxString& name = wxListBoxNameStr)
+    {
+        Create(parent, id, pos, size, choices, style, validator, name);
+    }
+    
     bool Create(wxWindow *parent, wxWindowID id,
         const wxPoint& pos = wxDefaultPosition,
         const wxSize& size = wxDefaultSize,
@@ -48,6 +59,14 @@ public:
         const wxValidator& validator = wxDefaultValidator,
         const wxString& name = wxListBoxNameStr);
     
+    bool Create(wxWindow *parent, wxWindowID id,
+        const wxPoint& pos,
+        const wxSize& size,
+        const wxArrayString& choices,
+        long style = 0,
+        const wxValidator& validator = wxDefaultValidator,
+        const wxString& name = wxListBoxNameStr);
+    
     ~wxListBox();
     
     // implementation of wxControlWithItems
index 64ad89e2d06d04a0bc8e3271b0dd6d3bccad9c7c..eb26667a365649e6a967df963a25716912c7a6d8 100644 (file)
@@ -118,6 +118,7 @@ public:
     wxMenuBar() { Init(); }
     wxMenuBar(long WXUNUSED(style)) { Init(); }
     wxMenuBar(int n, wxMenu *menus[], const wxString titles[]);
+    wxMenuBar(int n, wxMenu *menus[], const wxArrayString& titles);
     virtual ~wxMenuBar();
     
     // implement base class (pure) virtuals
index 81f1900b3d71ae3ea8b7b0e38b080c4ec1e8b6f3..d1e91a0bfc727c0ea7f09434efaba6713bb4ab4d 100644 (file)
@@ -46,6 +46,20 @@ public:
                majorDim, style, val, name);
     }
 
+    wxRadioBox(wxWindow *parent, wxWindowID id, const wxString& title,
+               const wxPoint& pos,
+               const wxSize& size,
+               const wxArrayString& choices,
+               int majorDim = 0, long style = wxRA_HORIZONTAL,
+               const wxValidator& val = wxDefaultValidator,
+               const wxString& name = wxRadioBoxNameStr)
+    {
+        Init();
+
+        Create(parent, id, title, pos, size, choices,
+               majorDim, style, val, name);
+    }
+
     ~wxRadioBox();
 
     bool Create(wxWindow *parent, wxWindowID id, const wxString& title,
@@ -56,6 +70,14 @@ public:
                 const wxValidator& val = wxDefaultValidator,
                 const wxString& name = wxRadioBoxNameStr);
 
+    bool Create(wxWindow *parent, wxWindowID id, const wxString& title,
+                const wxPoint& pos,
+                const wxSize& size,
+                const wxArrayString& choices,
+                int majorDim = 0, long style = wxRA_HORIZONTAL,
+                const wxValidator& val = wxDefaultValidator,
+                const wxString& name = wxRadioBoxNameStr);
+
     int FindString(const wxString& s) const;
     void SetSelection(int N);
     int GetSelection() const;
index 96df78ad124b6bfd33ad337d4d24a77f0e6e1a5d..73385b20da94aa28f48087a1600ce3404ef020dd 100644 (file)
@@ -36,6 +36,13 @@ public:
                  long style = 0,
                  const wxValidator& validator = wxDefaultValidator,
                  const wxString& name = wxListBoxNameStr);
+  wxCheckListBox(wxWindow *parent, wxWindowID id,
+                 const wxPoint& pos,
+                 const wxSize& size,
+                 const wxArrayString& choices,
+                 long style = 0,
+                 const wxValidator& validator = wxDefaultValidator,
+                 const wxString& name = wxListBoxNameStr);
 
   bool Create(wxWindow *parent, wxWindowID id,
                 const wxPoint& pos = wxDefaultPosition,
@@ -44,6 +51,13 @@ public:
                 long style = 0,
                 const wxValidator& validator = wxDefaultValidator,
                 const wxString& name = wxListBoxNameStr);
+  bool Create(wxWindow *parent, wxWindowID id,
+                const wxPoint& pos,
+                const wxSize& size,
+                const wxArrayString& choices,
+                long style = 0,
+                const wxValidator& validator = wxDefaultValidator,
+                const wxString& name = wxListBoxNameStr);
 
   // override base class virtuals
   virtual void Delete(int n);
index c2b47f69c583ee2fb6134f21d4c3e353453ee18a..ab7016061f66e83770bacaf0ad30c94f01cd02b3 100644 (file)
@@ -38,6 +38,17 @@ public:
     {
         Create(parent, id, pos, size, n, choices, style, validator, name);
     }
+    wxChoice(wxWindow *parent,
+             wxWindowID id,
+             const wxPoint& pos,
+             const wxSize& size,
+             const wxArrayString& choices,
+             long style = 0,
+             const wxValidator& validator = wxDefaultValidator,
+             const wxString& name = wxChoiceNameStr)
+    {
+        Create(parent, id, pos, size, choices, style, validator, name);
+    }
 
     bool Create(wxWindow *parent,
                 wxWindowID id,
@@ -47,6 +58,14 @@ public:
                 long style = 0,
                 const wxValidator& validator = wxDefaultValidator,
                 const wxString& name = wxChoiceNameStr);
+    bool Create(wxWindow *parent,
+                wxWindowID id,
+                const wxPoint& pos,
+                const wxSize& size,
+                const wxArrayString& choices,
+                long style = 0,
+                const wxValidator& validator = wxDefaultValidator,
+                const wxString& name = wxChoiceNameStr);
 
     // implement base class pure virtuals
     virtual int DoAppend(const wxString& item);
index a369165d75fae3812109200127966ad3b8febd31..f47d004cb6bae5e730fbd085992e3a90b6c98d87 100644 (file)
@@ -40,6 +40,17 @@ public:
     {
         Create(parent, id, value, pos, size, n, choices, style, validator, name);
     }
+    wxComboBox(wxWindow *parent, wxWindowID id,
+            const wxString& value,
+            const wxPoint& pos,
+            const wxSize& size,
+            const wxArrayString& choices,
+            long style = 0,
+            const wxValidator& validator = wxDefaultValidator,
+            const wxString& name = wxComboBoxNameStr)
+    {
+        Create(parent, id, value, pos, size, choices, style, validator, name);
+    }
 
     bool Create(wxWindow *parent,
                 wxWindowID id,
@@ -51,6 +62,15 @@ public:
                 long style = 0,
                 const wxValidator& validator = wxDefaultValidator,
                 const wxString& name = wxComboBoxNameStr);
+    bool Create(wxWindow *parent,
+                wxWindowID id,
+                const wxString& value,
+                const wxPoint& pos,
+                const wxSize& size,
+                const wxArrayString& choices,
+                long style = 0,
+                const wxValidator& validator = wxDefaultValidator,
+                const wxString& name = wxComboBoxNameStr);
 
     // List functions: see wxChoice
 
index 9574e73e9f105506368240abd5de60fa6eed391e..5ab31ebbedf973cc5040d7fde57bd29201b9c4ad 100644 (file)
@@ -53,6 +53,16 @@ public:
     {
         Create(parent, id, pos, size, n, choices, style, validator, name);
     }
+    wxListBox(wxWindow *parent, wxWindowID id,
+            const wxPoint& pos,
+            const wxSize& size,
+            const wxArrayString& choices,
+            long style = 0,
+            const wxValidator& validator = wxDefaultValidator,
+            const wxString& name = wxListBoxNameStr)
+    {
+        Create(parent, id, pos, size, choices, style, validator, name);
+    }
 
     bool Create(wxWindow *parent, wxWindowID id,
                 const wxPoint& pos = wxDefaultPosition,
@@ -61,6 +71,13 @@ public:
                 long style = 0,
                 const wxValidator& validator = wxDefaultValidator,
                 const wxString& name = wxListBoxNameStr);
+    bool Create(wxWindow *parent, wxWindowID id,
+                const wxPoint& pos,
+                const wxSize& size,
+                const wxArrayString& choices,
+                long style = 0,
+                const wxValidator& validator = wxDefaultValidator,
+                const wxString& name = wxListBoxNameStr);
 
     virtual ~wxListBox();
 
index 0cab158a275fc12c4f9b9cef995560c5555f5b10..9b3a90c1216a2450fa38cbf4b0e949cdaba3def2 100644 (file)
@@ -41,6 +41,20 @@ public:
         (void)Create(parent, id, title, pos, size, n, choices, majorDim,
                      style, val, name);
     }
+    wxRadioBox(wxWindow *parent,
+               wxWindowID id,
+               const wxString& title,
+               const wxPoint& pos,
+               const wxSize& size,
+               const wxArrayString& choices,
+               int majorDim = 0,
+               long style = wxRA_HORIZONTAL,
+               const wxValidator& val = wxDefaultValidator,
+               const wxString& name = wxRadioBoxNameStr)
+    {
+        (void)Create(parent, id, title, pos, size, choices, majorDim,
+                     style, val, name);
+    }
 
     ~wxRadioBox();
 
@@ -54,6 +68,16 @@ public:
                 long style = wxRA_HORIZONTAL,
                 const wxValidator& val = wxDefaultValidator,
                 const wxString& name = wxRadioBoxNameStr);
+    bool Create(wxWindow *parent,
+                wxWindowID id,
+                const wxString& title,
+                const wxPoint& pos,
+                const wxSize& size,
+                const wxArrayString& choices,
+                int majorDim = 0,
+                long style = wxRA_HORIZONTAL,
+                const wxValidator& val = wxDefaultValidator,
+                const wxString& name = wxRadioBoxNameStr);
 
     // implement the radiobox interface
     virtual void SetSelection(int n);
index 6a73d7052b345e686796cdc68b8f289412dbd672..d2d75ec498f412470b3d3476a4452cc8b1573710 100644 (file)
@@ -38,6 +38,15 @@ public:
                    ,const wxValidator& rValidator = wxDefaultValidator
                    ,const wxString&    rsName = wxListBoxNameStr
                   );
+    wxCheckListBox( wxWindow*            pParent
+                   ,wxWindowID           vId
+                   ,const wxPoint&       rPos
+                   ,const wxSize&        vSize
+                   ,const wxArrayString& asChoices
+                   ,long                 lStyle = 0
+                   ,const wxValidator&   rValidator = wxDefaultValidator
+                   ,const wxString&      rsName = wxListBoxNameStr
+                  );
 
     //
     // Override base class virtuals
index 9c4e0f47a554ff3bb4d64202d4e7a6158581cdcd..9293bdab9f2f22ddc14e8ce13cd320998b9cfaeb 100644 (file)
@@ -44,6 +44,27 @@ public:
               );
     }
 
+    inline wxChoice( wxWindow*            pParent
+                    ,wxWindowID           vId
+                    ,const wxPoint&       rPos
+                    ,const wxSize&        rSize
+                    ,const wxArrayString& asChoices
+                    ,long                 lStyle = 0
+                    ,const wxValidator&   rValidator = wxDefaultValidator
+                    ,const wxString&      rsName = wxChoiceNameStr
+                   )
+    {
+        Create( pParent
+               ,vId
+               ,rPos
+               ,rSize
+               ,asChoices
+               ,lStyle
+               ,rValidator
+               ,rsName
+              );
+    }
+
     bool Create( wxWindow*          pParent
                 ,wxWindowID         vId
                 ,const wxPoint&     rPos = wxDefaultPosition
@@ -55,6 +76,16 @@ public:
                 ,const wxString&    rsName = wxChoiceNameStr
                );
 
+    bool Create( wxWindow*            pParent
+                ,wxWindowID           vId
+                ,const wxPoint&       rPos
+                ,const wxSize&        rSize
+                ,const wxArrayString& asChoices
+                ,long                 lStyle = 0
+                ,const wxValidator&   rValidator = wxDefaultValidator
+                ,const wxString&      rsName = wxChoiceNameStr
+               );
+
     //
     // Implement base class virtuals
     //
index 4e3993699104289a81e4677b5c0f287bfe3c3a14..e1373b9bdc62877475bd5ffea993d73438a43adb 100644 (file)
@@ -48,6 +48,29 @@ class WXDLLEXPORT wxComboBox : public wxChoice
               );
     }
 
+  inline wxComboBox( wxWindow*            pParent
+                    ,wxWindowID           vId
+                    ,const wxString&      rsValue
+                    ,const wxPoint&       rPos
+                    ,const wxSize&        rSize
+                    ,const wxArrayString& asChoices
+                    ,long                 lStyle = 0
+                    ,const wxValidator&   rValidator = wxDefaultValidator
+                    ,const wxString&      rsName = wxComboBoxNameStr
+                   )
+    {
+        Create( pParent
+               ,vId
+               ,rsValue
+               ,rPos
+               ,rSize
+               ,asChoices
+               ,lStyle
+               ,rValidator
+               ,rsName
+              );
+    }
+
     bool Create( wxWindow*          pParent
                 ,wxWindowID         vId
                 ,const wxString&    rsValue = wxEmptyString
@@ -60,6 +83,17 @@ class WXDLLEXPORT wxComboBox : public wxChoice
                 ,const wxString&    rsName = wxComboBoxNameStr
                );
 
+    bool Create( wxWindow*            pParent
+                ,wxWindowID           vId
+                ,const wxString&      rsValue
+                ,const wxPoint&       rPos
+                ,const wxSize&        rSize
+                ,const wxArrayString& asChoices
+                ,long                 lStyle = 0
+                ,const wxValidator&   rValidator = wxDefaultValidator
+                ,const wxString&      rsName = wxComboBoxNameStr
+               );
+
     //
     // List functions: see wxChoice
     //
index 813885934abc2aca8db7c301446a803f3564fb05..a1bba2d821f1cf57917e1bae105432b937ca4b3b 100644 (file)
@@ -58,6 +58,25 @@ public:
                ,rsName
               );
     }
+    wxListBox( wxWindow*            pParent
+              ,wxWindowID           vId
+              ,const wxPoint&       rPos
+              ,const wxSize&        rSize
+              ,const wxArrayString& asChoices
+              ,long                 lStyle = 0
+              ,const wxValidator&   rValidator = wxDefaultValidator
+              ,const wxString&      rsName = wxListBoxNameStr)
+    {
+        Create( pParent
+               ,vId
+               ,rPos
+               ,rSize
+               ,asChoices
+               ,lStyle
+               ,rValidator
+               ,rsName
+              );
+    }
 
     bool Create( wxWindow*          pParent
                 ,wxWindowID         vId
@@ -69,6 +88,15 @@ public:
                 ,const wxValidator& rValidator = wxDefaultValidator
                 ,const wxString&    rsName = wxListBoxNameStr
                );
+    bool Create( wxWindow*            pParent
+                ,wxWindowID           vId
+                ,const wxPoint&       rPos
+                ,const wxSize&        rSize
+                ,const wxArrayString& asChoices
+                ,long                 lStyle = 0
+                ,const wxValidator&   rValidator = wxDefaultValidator
+                ,const wxString&      rsName = wxListBoxNameStr
+               );
 
     virtual ~wxListBox();
 
index d6eb7cc229744727917f08e81bdc4f9b6b8e9ba0..9534ba0ba0fcd67b58e7d5dc7ad3a22e08e09f83 100644 (file)
@@ -47,6 +47,31 @@ public:
               );
     }
 
+    inline wxRadioBox( wxWindow*            pParent
+                      ,wxWindowID           vId
+                      ,const wxString&      rsTitle
+                      ,const wxPoint&       rPos
+                      ,const wxSize&        rSize
+                      ,const wxArrayString& asChoices
+                      ,int                  nMajorDim = 0
+                      ,long                 lStyle = wxRA_HORIZONTAL
+                      ,const wxValidator&   rVal = wxDefaultValidator
+                      ,const wxString&      rsName = wxRadioBoxNameStr
+                     )
+    {
+        Create( pParent
+               ,vId
+               ,rsTitle
+               ,rPos
+               ,rSize
+               ,asChoices
+               ,nMajorDim
+               ,lStyle
+               ,rVal
+               ,rsName
+              );
+    }
+
     ~wxRadioBox();
 
     bool Create( wxWindow*          pParent
@@ -62,6 +87,18 @@ public:
                 ,const wxString&    rsName = wxRadioBoxNameStr
                );
 
+    bool Create( wxWindow*            pParent
+                ,wxWindowID           vId
+                ,const wxString&      rsTitle
+                ,const wxPoint&       rPos
+                ,const wxSize&        rSize
+                ,const wxArrayString& asChoices
+                ,int                  nMajorDim = 0
+                ,long                 lStyle = wxRA_HORIZONTAL
+                ,const wxValidator&   rVal = wxDefaultValidator
+                ,const wxString&      rsName = wxRadioBoxNameStr
+               );
+
     void             Command(wxCommandEvent& rEvent);
     bool             ContainsHWND(WXHWND hWnd) const;
     virtual bool     Enable(bool bEnable = TRUE);
index ee6232792541b218b785fac1c6aa9f849da02cb2..af878cad02b634807e2486699e43797a91a5bd99 100644 (file)
@@ -46,6 +46,14 @@ public:
 
         Create(parent, id, pos, size, nStrings, choices, style, validator, name);
     }
+    wxCheckListBox(wxWindow *parent,
+                   wxWindowID id,
+                   const wxPoint& pos,
+                   const wxSize& size,
+                   const wxArrayString& choices,
+                   long style = 0,
+                   const wxValidator& validator = wxDefaultValidator,
+                   const wxString& name = wxListBoxNameStr);
 
     bool Create(wxWindow *parent,
                 wxWindowID id,
@@ -56,6 +64,14 @@ public:
                 long style = 0,
                 const wxValidator& validator = wxDefaultValidator,
                 const wxString& name = wxListBoxNameStr);
+    bool Create(wxWindow *parent,
+                wxWindowID id,
+                const wxPoint& pos,
+                const wxSize& size,
+                const wxArrayString& choices,
+                long style = 0,
+                const wxValidator& validator = wxDefaultValidator,
+                const wxString& name = wxListBoxNameStr);
 
     // implement check list box methods
     virtual bool IsChecked(size_t item) const;
index a96d443d0215ac0b44388dccd3969ef2e5d89255..7e7d8522398ee6ce9f7076b32592446570b9aede 100644 (file)
@@ -34,6 +34,13 @@ public:
     {
         Create(parent, id, pos, size, n, choices, style, validator, name);
     }
+    wxChoice(wxWindow *parent, wxWindowID id,
+            const wxPoint& pos,
+            const wxSize& size,
+            const wxArrayString& choices,
+            long style = 0,
+            const wxValidator& validator = wxDefaultValidator,
+            const wxString& name = wxChoiceNameStr);
 
     bool Create(wxWindow *parent, wxWindowID id,
                 const wxPoint& pos = wxDefaultPosition,
@@ -42,6 +49,13 @@ public:
                 long style = 0,
                 const wxValidator& validator = wxDefaultValidator,
                 const wxString& name = wxChoiceNameStr);
+    bool Create(wxWindow *parent, wxWindowID id,
+                const wxPoint& pos,
+                const wxSize& size,
+                const wxArrayString& choices,
+                long style = 0,
+                const wxValidator& validator = wxDefaultValidator,
+                const wxString& name = wxChoiceNameStr);
     
 private:
     void OnComboBox(wxCommandEvent &event);
index 28be5a0a2e5f44a22a8cd9d04dd48f2524a39778..bfc643c696d45a06e156ba6171c5719cf53ff12b 100644 (file)
@@ -231,6 +231,15 @@ public:
         (void)Create(parent, id, value, pos, size, n, choices,
                      style, validator, name);
     }
+    wxComboBox(wxWindow *parent,
+               wxWindowID id,
+               const wxString& value,
+               const wxPoint& pos,
+               const wxSize& size,
+               const wxArrayString& choices,
+               long style = 0,
+               const wxValidator& validator = wxDefaultValidator,
+               const wxString& name = wxComboBoxNameStr);
 
     bool Create(wxWindow *parent,
                 wxWindowID id,
@@ -242,7 +251,15 @@ public:
                 long style = 0,
                 const wxValidator& validator = wxDefaultValidator,
                 const wxString& name = wxComboBoxNameStr);
-
+    bool Create(wxWindow *parent,
+                wxWindowID id,
+                const wxString& value,
+                const wxPoint& pos,
+                const wxSize& size,
+                const wxArrayString& choices,
+                long style = 0,
+                const wxValidator& validator = wxDefaultValidator,
+                const wxString& name = wxComboBoxNameStr);
 
     virtual ~wxComboBox();
 
index b5c6cc2c21d42b26ae007bd06c36f0a158c3f16c..acc660541a78e5bb164c4250631a3d5e37c64b94 100644 (file)
@@ -70,6 +70,14 @@ public:
 
         Create(parent, id, pos, size, n, choices, style, validator, name);
     }
+    wxListBox(wxWindow *parent,
+              wxWindowID id,
+              const wxPoint& pos,
+              const wxSize& size,
+              const wxArrayString& choices,
+              long style = 0,
+              const wxValidator& validator = wxDefaultValidator,
+              const wxString& name = wxListBoxNameStr );
 
     virtual ~wxListBox();
 
@@ -81,6 +89,14 @@ public:
                 long style = 0,
                 const wxValidator& validator = wxDefaultValidator,
                 const wxString& name = wxListBoxNameStr);
+    bool Create(wxWindow *parent,
+                wxWindowID id,
+                const wxPoint& pos,
+                const wxSize& size,
+                const wxArrayString& choices,
+                long style = 0,
+                const wxValidator& validator = wxDefaultValidator,
+                const wxString& name = wxListBoxNameStr);
 
     // implement the listbox interface defined by wxListBoxBase
     virtual void Clear();
index 409d647d15643a36300f5cf36201db42bdbdbe4f..6072641499de7f95bb96bc736c5c586101c60e15 100644 (file)
@@ -50,6 +50,16 @@ public:
         (void)Create(parent, id, title, pos, size, n, choices,
                      majorDim, style, val, name);
     }
+    wxRadioBox(wxWindow *parent,
+               wxWindowID id,
+               const wxString& title,
+               const wxPoint& pos,
+               const wxSize& size,
+               const wxArrayString& choices,
+               int majorDim = 0,
+               long style = wxRA_SPECIFY_COLS,
+               const wxValidator& val = wxDefaultValidator,
+               const wxString& name = wxRadioBoxNameStr);
 
     bool Create(wxWindow *parent,
                 wxWindowID id,
@@ -61,6 +71,16 @@ public:
                 long style = wxRA_SPECIFY_COLS,
                 const wxValidator& val = wxDefaultValidator,
                 const wxString& name = wxRadioBoxNameStr);
+    bool Create(wxWindow *parent,
+                wxWindowID id,
+                const wxString& title,
+                const wxPoint& pos,
+                const wxSize& size,
+                const wxArrayString& choices,
+                int majorDim = 0,
+                long style = wxRA_SPECIFY_COLS,
+                const wxValidator& val = wxDefaultValidator,
+                const wxString& name = wxRadioBoxNameStr);
 
     virtual ~wxRadioBox();
 
index abda41c2a4fed4a174b0c3767057e793dc20a128..5fa53cf917d97a9fc802d5dfd4bfcf42dd17b34a 100644 (file)
@@ -21,6 +21,20 @@ BEGIN_EVENT_TABLE(wxCheckListBox, wxCheckListBoxBase)
 END_EVENT_TABLE()
 // WX_IMPLEMENT_COCOA_OWNER(wxCheckListBox,NSButton,NSControl,NSView)
 
+bool wxCheckListBox::Create(wxWindow *parent, wxWindowID winid,
+            const wxPoint& pos,
+            const wxSize& size,
+            const wxArrayString& choices,
+            long style,
+            const wxValidator& validator,
+            const wxString& name)
+{
+    wxCArrayString chs(choices);
+
+    return Create(parent, winid, pos, size, chs.GetCount(), chs.GetStrings(),
+                  style, validator, name);
+}
+
 bool wxCheckListBox::Create(wxWindow *parent, wxWindowID winid,
             const wxPoint& pos,
             const wxSize& size,
index 3840e0994bac315657b3227472591bdb77a708c8..91ca7a94b93a7eda3c144ad3841093b660cf9016 100644 (file)
@@ -14,6 +14,7 @@
     #include "wx/log.h"
     #include "wx/app.h"
     #include "wx/choice.h"
+    #include "wx/arrstr.h"
 #endif //WX_PRECOMP
 
 #include "wx/cocoa/string.h"
@@ -33,6 +34,20 @@ void wxChoice::Init()
     m_sortedStrings = NULL;
 }
 
+bool wxChoice::Create(wxWindow *parent, wxWindowID winid,
+            const wxPoint& pos,
+            const wxSize& size,
+            const wxArrayString& choices,
+            long style,
+            const wxValidator& validator,
+            const wxString& name)
+{
+    wxCArrayString chs(choices);
+
+    return Create(parent, winid, pos, size, chs.GetCount(), chs.GetStrings(),
+                  style, validator, name);
+}
+
 bool wxChoice::Create(wxWindow *parent, wxWindowID winid,
             const wxPoint& pos,
             const wxSize& size,
index ae2b9015fdf4d2f7b2bb9c29e78b1f5203d10141..8500a22382b4afebf4d5e2863c2fcf3b4f5106ed 100644 (file)
@@ -27,6 +27,21 @@ BEGIN_EVENT_TABLE(wxComboBox, wxTextCtrl)
 END_EVENT_TABLE()
 // WX_IMPLEMENT_COCOA_OWNER(wxComboBox,NSComboBox,NSTextField,NSView)
 
+bool wxComboBox::Create(wxWindow *parent, wxWindowID winid,
+            const wxString& value,
+            const wxPoint& pos,
+            const wxSize& size,
+            const wxArrayString& choices,
+            long style,
+            const wxValidator& validator,
+            const wxString& name)
+{
+    wxCArrayString chs(choices);
+
+    return Create(parent, winid, value, pos, size, chs.GetCount(),
+                  chs.GetStrings(), style, validator, name);
+}
+
 bool wxComboBox::Create(wxWindow *parent, wxWindowID winid,
             const wxString& value,
             const wxPoint& pos,
index 2f35c368cdcc831ac45f13649dae8cd77731b637..a379cdd02ea217fc88e5927f488df7a51a7e798f 100644 (file)
@@ -30,6 +30,20 @@ BEGIN_EVENT_TABLE(wxListBox, wxListBoxBase)
 END_EVENT_TABLE()
 WX_IMPLEMENT_COCOA_OWNER(wxListBox,NSTableView,NSControl,NSView)
 
+bool wxListBox::Create(wxWindow *parent, wxWindowID winid,
+            const wxPoint& pos,
+            const wxSize& size,
+            const wxArrayString& choices,
+            long style,
+            const wxValidator& validator,
+            const wxString& name)
+{
+    wxCArrayString chs(choices);
+
+    return Create(parent, winid, pos, size, chs.GetCount(), chs.GetStrings(),
+                  style, validator, name);
+}
+
 bool wxListBox::Create(wxWindow *parent, wxWindowID winid,
             const wxPoint& pos,
             const wxSize& size,
index ff0626e5c50b8907e3709fc8d51e38c2c3982b52..216038e63d4829f8008c453f34628eb78b042f32 100644 (file)
@@ -13,6 +13,7 @@
 #ifndef WX_PRECOMP
     #include "wx/app.h"
     #include "wx/radiobox.h"
+    #include "wx/arrstr.h"
 #endif //WX_PRECOMP
 
 #import <AppKit/NSView.h>
@@ -22,6 +23,21 @@ BEGIN_EVENT_TABLE(wxRadioBox, wxControl)
 END_EVENT_TABLE()
 // WX_IMPLEMENT_COCOA_OWNER(wxRadioBox,NSTextField,NSControl,NSView)
 
+bool wxRadioBox::Create(wxWindow *parent, wxWindowID winid,
+            const wxString& title,
+            const wxPoint& pos,
+            const wxSize& size,
+            const wxArrayString& choices,
+            int majorDim,
+            long style, const wxValidator& validator,
+            const wxString& name)
+{
+    wxCArrayString chs(choices);
+
+    return Create(parent, winid, title, pos, size, chs.GetCount(),
+                  chs.GetStrings(), majorDim, style, validator, name);
+}
+
 bool wxRadioBox::Create(wxWindow *parent, wxWindowID winid,
             const wxString& title,
             const wxPoint& pos,
index 629284a4badeb17fe983051f8e704842bd4bb71b..1abec6f0cb6901f7e63576e2488b7830f8c5c50b 100644 (file)
@@ -285,6 +285,19 @@ bool wxAnyChoiceDialog::Create(wxWindow *parent,
     return TRUE;
 }
 
+bool wxAnyChoiceDialog::Create(wxWindow *parent,
+                               const wxString& message,
+                               const wxString& caption,
+                               const wxArrayString& choices,
+                               long styleDlg,
+                               const wxPoint& pos,
+                               long styleLbox)
+{
+    wxCArrayString chs(choices);
+    return Create(parent, message, caption, chs.GetCount(), chs.GetStrings(),
+                  styleDlg, pos, styleLbox);
+}
+
 // ----------------------------------------------------------------------------
 // wxSingleChoiceDialog
 // ----------------------------------------------------------------------------
@@ -308,6 +321,17 @@ wxSingleChoiceDialog::wxSingleChoiceDialog(wxWindow *parent,
     Create(parent, message, caption, n, choices, clientData, style);
 }
 
+wxSingleChoiceDialog::wxSingleChoiceDialog(wxWindow *parent,
+                                           const wxString& message,
+                                           const wxString& caption,
+                                           const wxArrayString& choices,
+                                           char **clientData,
+                                           long style,
+                                           const wxPoint& WXUNUSED(pos))
+{
+    Create(parent, message, caption, choices, clientData, style);
+}
+
 bool wxSingleChoiceDialog::Create( wxWindow *parent,
                                    const wxString& message,
                                    const wxString& caption,
@@ -333,6 +357,19 @@ bool wxSingleChoiceDialog::Create( wxWindow *parent,
     return TRUE;
 }
 
+bool wxSingleChoiceDialog::Create( wxWindow *parent,
+                                   const wxString& message,
+                                   const wxString& caption,
+                                   const wxArrayString& choices,
+                                   char **clientData,
+                                   long style,
+                                   const wxPoint& pos )
+{
+    wxCArrayString chs(choices);
+    return Create( parent, message, caption, chs.GetCount(), chs.GetStrings(),
+                   clientData, style, pos );
+}
+
 // Set the selection
 void wxSingleChoiceDialog::SetSelection(int sel)
 {
@@ -383,6 +420,18 @@ bool wxMultiChoiceDialog::Create( wxWindow *parent,
     return TRUE;
 }
 
+bool wxMultiChoiceDialog::Create( wxWindow *parent,
+                                  const wxString& message,
+                                  const wxString& caption,
+                                  const wxArrayString& choices,
+                                  long style,
+                                  const wxPoint& pos )
+{
+    wxCArrayString chs(choices);
+    return Create( parent, message, caption, chs.GetCount(),
+                   chs.GetStrings(), style, pos );
+}
+
 void wxMultiChoiceDialog::SetSelections(const wxArrayInt& selections)
 {
     size_t count = selections.GetCount();
index 753fcf01b729b24696101ed7dd09d944e7aec28e..9ad4536bc821498b577a46ae3f8a150759654db0 100644 (file)
@@ -1398,20 +1398,11 @@ void wxGridCellChoiceEditor::Create(wxWindow* parent,
                                     wxWindowID id,
                                     wxEvtHandler* evtHandler)
 {
-    size_t count = m_choices.GetCount();
-    wxString *choices = new wxString[count];
-    for ( size_t n = 0; n < count; n++ )
-    {
-        choices[n] = m_choices[n];
-    }
-
     m_control = new wxComboBox(parent, id, wxEmptyString,
                                wxDefaultPosition, wxDefaultSize,
-                               count, choices,
+                               m_choices,
                                m_allowOthers ? 0 : wxCB_READONLY);
 
-    delete [] choices;
-
     wxGridCellEditor::Create(parent, id, evtHandler);
 }
 
index fc1aa4602adf0965682e13890c11f9190360bc22..45bc4adc20454d44f51cd6d5e21c1fe17ab231da 100644 (file)
@@ -48,6 +48,19 @@ wxCheckListBox::wxCheckListBox(wxWindow *parent, wxWindowID id,
     wxListBox::Create( parent, id, pos, size, nStrings, choices, style, validator, name );
 }
 
+wxCheckListBox::wxCheckListBox(wxWindow *parent, wxWindowID id,
+                               const wxPoint& pos,
+                               const wxSize& size,
+                               const wxArrayString& choices,
+                               long style,
+                               const wxValidator& validator,
+                               const wxString& name )
+{
+    m_hasCheckBoxes = TRUE;
+    wxListBox::Create( parent, id, pos, size, choices,
+                       style, validator, name );
+}
+
 bool wxCheckListBox::IsChecked( int index ) const
 {
     wxCHECK_MSG( m_list != NULL, FALSE, wxT("invalid checklistbox") );
index f437527d6c265f1480b603c59861114d2679a0b4..6eef00f62464aaa8624cee8ed764329769eeadde 100644 (file)
@@ -73,6 +73,18 @@ wxChoice::wxChoice()
     m_strings = (wxSortedArrayString *)NULL;
 }
 
+bool wxChoice::Create( wxWindow *parent, wxWindowID id,
+                       const wxPoint &pos, const wxSize &size,
+                       const wxArrayString& choices,
+                       long style, const wxValidator& validator,
+                       const wxString &name )
+{
+    wxCArrayString chs(choices);
+
+    return Create( parent, id, pos, size, chs.GetCount(), chs.GetStrings(),
+                   style, validator, name );
+}
+
 bool wxChoice::Create( wxWindow *parent, wxWindowID id,
                        const wxPoint &pos, const wxSize &size,
                        int n, const wxString choices[],
index 6e268ed40d90f6cc7d76211336550c5bd9a40efe..e6190604055dc272d8640b39b321693118940be1 100644 (file)
@@ -19,6 +19,7 @@
 #if wxUSE_COMBOBOX
 
 #include "wx/settings.h"
+#include "wx/arrstr.h"
 #include "wx/intl.h"
 
 #include "wx/textctrl.h"    // for wxEVT_COMMAND_TEXT_UPDATED
@@ -102,6 +103,19 @@ BEGIN_EVENT_TABLE(wxComboBox, wxControl)
     EVT_CHAR(wxComboBox::OnChar)
 END_EVENT_TABLE()
 
+bool wxComboBox::Create( wxWindow *parent, wxWindowID id,
+                         const wxString& value,
+                         const wxPoint& pos, const wxSize& size,
+                         const wxArrayString& choices,
+                         long style, const wxValidator& validator,
+                         const wxString& name )
+{
+    wxCArrayString chs(choices);
+
+    return Create( parent, id, value, pos, size, chs.GetCount(),
+                   chs.GetStrings(), style, validator, name );
+}
+
 bool wxComboBox::Create( wxWindow *parent, wxWindowID id, const wxString& value,
                          const wxPoint& pos, const wxSize& size,
                          int n, const wxString choices[],
index a8a680a940158541278211db23c3f20c6b28e6e4..a4304cfe0195769a69853fa0d64448a61c1e1ca6 100644 (file)
@@ -316,6 +316,18 @@ wxListBox::wxListBox()
 #endif // wxUSE_CHECKLISTBOX
 }
 
+bool wxListBox::Create( wxWindow *parent, wxWindowID id,
+                        const wxPoint &pos, const wxSize &size,
+                        const wxArrayString& choices,
+                        long style, const wxValidator& validator,
+                        const wxString &name )
+{
+    wxCArrayString chs(choices);
+
+    return Create( parent, id, pos, size, chs.GetCount(), chs.GetStrings(),
+                   style, validator, name );
+}
+
 bool wxListBox::Create( wxWindow *parent, wxWindowID id,
                         const wxPoint &pos, const wxSize &size,
                         int n, const wxString choices[],
index 1fd590f205983c1e4e05e681794b1c7aaaf169e2..7463243d03c322c1c8c093391f54cabafd4dde66 100644 (file)
@@ -168,6 +168,19 @@ void wxRadioBox::Init()
     m_lostFocus = FALSE;
 }
 
+bool wxRadioBox::Create( wxWindow *parent, wxWindowID id,
+                         const wxString& title,
+                         const wxPoint &pos, const wxSize &size,
+                         const wxArrayString& choices, int majorDim,
+                         long style, const wxValidator& validator,
+                         const wxString &name )
+{
+    wxCArrayString chs(choices);
+
+    return Create( parent, id, title, pos, size, chs.GetCount(),
+                   chs.GetStrings(), majorDim, style, validator, name );
+}
+
 bool wxRadioBox::Create( wxWindow *parent, wxWindowID id, const wxString& title,
                          const wxPoint &pos, const wxSize &size,
                          int n, const wxString choices[], int majorDim,
index fc1aa4602adf0965682e13890c11f9190360bc22..45bc4adc20454d44f51cd6d5e21c1fe17ab231da 100644 (file)
@@ -48,6 +48,19 @@ wxCheckListBox::wxCheckListBox(wxWindow *parent, wxWindowID id,
     wxListBox::Create( parent, id, pos, size, nStrings, choices, style, validator, name );
 }
 
+wxCheckListBox::wxCheckListBox(wxWindow *parent, wxWindowID id,
+                               const wxPoint& pos,
+                               const wxSize& size,
+                               const wxArrayString& choices,
+                               long style,
+                               const wxValidator& validator,
+                               const wxString& name )
+{
+    m_hasCheckBoxes = TRUE;
+    wxListBox::Create( parent, id, pos, size, choices,
+                       style, validator, name );
+}
+
 bool wxCheckListBox::IsChecked( int index ) const
 {
     wxCHECK_MSG( m_list != NULL, FALSE, wxT("invalid checklistbox") );
index f437527d6c265f1480b603c59861114d2679a0b4..6eef00f62464aaa8624cee8ed764329769eeadde 100644 (file)
@@ -73,6 +73,18 @@ wxChoice::wxChoice()
     m_strings = (wxSortedArrayString *)NULL;
 }
 
+bool wxChoice::Create( wxWindow *parent, wxWindowID id,
+                       const wxPoint &pos, const wxSize &size,
+                       const wxArrayString& choices,
+                       long style, const wxValidator& validator,
+                       const wxString &name )
+{
+    wxCArrayString chs(choices);
+
+    return Create( parent, id, pos, size, chs.GetCount(), chs.GetStrings(),
+                   style, validator, name );
+}
+
 bool wxChoice::Create( wxWindow *parent, wxWindowID id,
                        const wxPoint &pos, const wxSize &size,
                        int n, const wxString choices[],
index 6e268ed40d90f6cc7d76211336550c5bd9a40efe..e6190604055dc272d8640b39b321693118940be1 100644 (file)
@@ -19,6 +19,7 @@
 #if wxUSE_COMBOBOX
 
 #include "wx/settings.h"
+#include "wx/arrstr.h"
 #include "wx/intl.h"
 
 #include "wx/textctrl.h"    // for wxEVT_COMMAND_TEXT_UPDATED
@@ -102,6 +103,19 @@ BEGIN_EVENT_TABLE(wxComboBox, wxControl)
     EVT_CHAR(wxComboBox::OnChar)
 END_EVENT_TABLE()
 
+bool wxComboBox::Create( wxWindow *parent, wxWindowID id,
+                         const wxString& value,
+                         const wxPoint& pos, const wxSize& size,
+                         const wxArrayString& choices,
+                         long style, const wxValidator& validator,
+                         const wxString& name )
+{
+    wxCArrayString chs(choices);
+
+    return Create( parent, id, value, pos, size, chs.GetCount(),
+                   chs.GetStrings(), style, validator, name );
+}
+
 bool wxComboBox::Create( wxWindow *parent, wxWindowID id, const wxString& value,
                          const wxPoint& pos, const wxSize& size,
                          int n, const wxString choices[],
index a8a680a940158541278211db23c3f20c6b28e6e4..a4304cfe0195769a69853fa0d64448a61c1e1ca6 100644 (file)
@@ -316,6 +316,18 @@ wxListBox::wxListBox()
 #endif // wxUSE_CHECKLISTBOX
 }
 
+bool wxListBox::Create( wxWindow *parent, wxWindowID id,
+                        const wxPoint &pos, const wxSize &size,
+                        const wxArrayString& choices,
+                        long style, const wxValidator& validator,
+                        const wxString &name )
+{
+    wxCArrayString chs(choices);
+
+    return Create( parent, id, pos, size, chs.GetCount(), chs.GetStrings(),
+                   style, validator, name );
+}
+
 bool wxListBox::Create( wxWindow *parent, wxWindowID id,
                         const wxPoint &pos, const wxSize &size,
                         int n, const wxString choices[],
index 1fd590f205983c1e4e05e681794b1c7aaaf169e2..7463243d03c322c1c8c093391f54cabafd4dde66 100644 (file)
@@ -168,6 +168,19 @@ void wxRadioBox::Init()
     m_lostFocus = FALSE;
 }
 
+bool wxRadioBox::Create( wxWindow *parent, wxWindowID id,
+                         const wxString& title,
+                         const wxPoint &pos, const wxSize &size,
+                         const wxArrayString& choices, int majorDim,
+                         long style, const wxValidator& validator,
+                         const wxString &name )
+{
+    wxCArrayString chs(choices);
+
+    return Create( parent, id, title, pos, size, chs.GetCount(),
+                   chs.GetStrings(), majorDim, style, validator, name );
+}
+
 bool wxRadioBox::Create( wxWindow *parent, wxWindowID id, const wxString& title,
                          const wxPoint &pos, const wxSize &size,
                          int n, const wxString choices[], int majorDim,
index 1e88ce34f6cce33300cbf0c4d472812253fd1105..cb7c4a818f7e007c3cff9aa62d3262f43755f188 100644 (file)
@@ -22,6 +22,7 @@
 #if wxUSE_CHECKLISTBOX
 
 #include "wx/checklst.h"
+#include "wx/arrstr.h"
 
 #include "wx/mac/uma.h"
 #include "Appearance.h"
@@ -172,6 +173,21 @@ void wxCheckListBox::Init()
 {
 }
 
+bool wxCheckListBox::Create(wxWindow *parent,
+                            wxWindowID id,
+                            const wxPoint &pos,
+                            const wxSize &size,
+                            const wxArrayString& choices,
+                            long style,
+                            const wxValidator& validator,
+                            const wxString &name)
+{
+    wxCArrayString chs(choices);
+
+    return Create(parent, id, pos, size, chs.GetCount(), chs.GetStrings(),
+                  style, validator, name);
+}
+
 bool wxCheckListBox::Create(wxWindow *parent,
                             wxWindowID id,
                             const wxPoint &pos,
index 55a9268e108486daed5eee2e83d1b3005e5b0921..a18113dbf37d7c3651c8e431ac2aab0abc1af36d 100644 (file)
@@ -38,6 +38,20 @@ wxChoice::~wxChoice()
     // DisposeMenu( m_macPopUpMenuHandle ) ;
 }
 
+bool wxChoice::Create(wxWindow *parent, wxWindowID id,
+           const wxPoint& pos,
+           const wxSize& size,
+           const wxArrayString& choices,
+           long style,
+           const wxValidator& validator,
+           const wxString& name)
+{
+    wxCArrayString chs(choices);
+
+    return Create(parent, id, pos, size, chs.GetCount(), chs.GetStrings(),
+                  style, validator, name);
+}
+
 bool wxChoice::Create(wxWindow *parent, wxWindowID id,
            const wxPoint& pos,
            const wxSize& size,
index 5a911361cf45633608dd12505d3a67c6c3ec64ed..27aa1a58de3e840e05d6153dc326262a3e011822 100644 (file)
@@ -256,6 +256,22 @@ void wxComboBox::DelegateChoice( const wxString& value )
 }
 
 
+bool wxComboBox::Create(wxWindow *parent, wxWindowID id,
+           const wxString& value,
+           const wxPoint& pos,
+           const wxSize& size,
+           const wxArrayString& choices,
+           long style,
+           const wxValidator& validator,
+           const wxString& name)
+{
+    wxCArrayString chs( choices );
+
+    return Create( parent, id, value, pos, size, chs.GetCount(),
+                   chs.GetStrings(), style, validator, name );
+}
+
+
 bool wxComboBox::Create(wxWindow *parent, wxWindowID id,
            const wxString& value,
            const wxPoint& pos,
index fe39a0a19fcea8baca9128e2129e718f949e055b..ea675aaf1c754b8d70e26bcceb3a85cbae4aadf9 100644 (file)
@@ -193,6 +193,20 @@ wxListBox::wxListBox()
 
 static ListDefUPP macListDefUPP = NULL ;
 
+bool wxListBox::Create(wxWindow *parent, wxWindowID id,
+                       const wxPoint& pos,
+                       const wxSize& size,
+                       const wxArrayString& choices,
+                       long style,
+                       const wxValidator& validator,
+                       const wxString& name)
+{
+    wxCArrayString chs(choices);
+
+    return Create(parent, id, pos, size, chs.GetCount(), chs.GetStrings(),
+                  style, validator, name);
+}
+
 bool wxListBox::Create(wxWindow *parent, wxWindowID id,
                        const wxPoint& pos,
                        const wxSize& size,
index 9ef60f55940169502ca6b111a60cb7a172b4935a..103d68ca440e684148637c4b011267d31b503bfc 100644 (file)
@@ -19,6 +19,7 @@
 //-------------------------------------------------------------------------------------
 
 #include "wx/defs.h"
+#include "wx/arrstr.h"
 
 #include "wx/radiobox.h"
 #include "wx/radiobut.h"
@@ -93,6 +94,18 @@ wxRadioBox::~wxRadioBox()
 //-------------------------------------------------------------------------------------
 // Create the radiobox for two-step construction
 
+bool wxRadioBox::Create(wxWindow *parent, wxWindowID id, const wxString& label,
+                        const wxPoint& pos, const wxSize& size,
+                        const wxArrayString& choices,
+                        int majorDim, long style,
+                        const wxValidator& val, const wxString& name)
+{
+    wxCArrayString chs(choices);
+
+    return Create(parent, id, label, pos, size, chs.GetCount(),
+                  chs.GetStrings(), majorDim, style, val, name);
+}
+
 bool wxRadioBox::Create(wxWindow *parent, wxWindowID id, const wxString& label,
                         const wxPoint& pos, const wxSize& size,
                         int n, const wxString choices[],
index 1e88ce34f6cce33300cbf0c4d472812253fd1105..cb7c4a818f7e007c3cff9aa62d3262f43755f188 100644 (file)
@@ -22,6 +22,7 @@
 #if wxUSE_CHECKLISTBOX
 
 #include "wx/checklst.h"
+#include "wx/arrstr.h"
 
 #include "wx/mac/uma.h"
 #include "Appearance.h"
@@ -172,6 +173,21 @@ void wxCheckListBox::Init()
 {
 }
 
+bool wxCheckListBox::Create(wxWindow *parent,
+                            wxWindowID id,
+                            const wxPoint &pos,
+                            const wxSize &size,
+                            const wxArrayString& choices,
+                            long style,
+                            const wxValidator& validator,
+                            const wxString &name)
+{
+    wxCArrayString chs(choices);
+
+    return Create(parent, id, pos, size, chs.GetCount(), chs.GetStrings(),
+                  style, validator, name);
+}
+
 bool wxCheckListBox::Create(wxWindow *parent,
                             wxWindowID id,
                             const wxPoint &pos,
index 55a9268e108486daed5eee2e83d1b3005e5b0921..a18113dbf37d7c3651c8e431ac2aab0abc1af36d 100644 (file)
@@ -38,6 +38,20 @@ wxChoice::~wxChoice()
     // DisposeMenu( m_macPopUpMenuHandle ) ;
 }
 
+bool wxChoice::Create(wxWindow *parent, wxWindowID id,
+           const wxPoint& pos,
+           const wxSize& size,
+           const wxArrayString& choices,
+           long style,
+           const wxValidator& validator,
+           const wxString& name)
+{
+    wxCArrayString chs(choices);
+
+    return Create(parent, id, pos, size, chs.GetCount(), chs.GetStrings(),
+                  style, validator, name);
+}
+
 bool wxChoice::Create(wxWindow *parent, wxWindowID id,
            const wxPoint& pos,
            const wxSize& size,
index 5a911361cf45633608dd12505d3a67c6c3ec64ed..27aa1a58de3e840e05d6153dc326262a3e011822 100644 (file)
@@ -256,6 +256,22 @@ void wxComboBox::DelegateChoice( const wxString& value )
 }
 
 
+bool wxComboBox::Create(wxWindow *parent, wxWindowID id,
+           const wxString& value,
+           const wxPoint& pos,
+           const wxSize& size,
+           const wxArrayString& choices,
+           long style,
+           const wxValidator& validator,
+           const wxString& name)
+{
+    wxCArrayString chs( choices );
+
+    return Create( parent, id, value, pos, size, chs.GetCount(),
+                   chs.GetStrings(), style, validator, name );
+}
+
+
 bool wxComboBox::Create(wxWindow *parent, wxWindowID id,
            const wxString& value,
            const wxPoint& pos,
index fe39a0a19fcea8baca9128e2129e718f949e055b..ea675aaf1c754b8d70e26bcceb3a85cbae4aadf9 100644 (file)
@@ -193,6 +193,20 @@ wxListBox::wxListBox()
 
 static ListDefUPP macListDefUPP = NULL ;
 
+bool wxListBox::Create(wxWindow *parent, wxWindowID id,
+                       const wxPoint& pos,
+                       const wxSize& size,
+                       const wxArrayString& choices,
+                       long style,
+                       const wxValidator& validator,
+                       const wxString& name)
+{
+    wxCArrayString chs(choices);
+
+    return Create(parent, id, pos, size, chs.GetCount(), chs.GetStrings(),
+                  style, validator, name);
+}
+
 bool wxListBox::Create(wxWindow *parent, wxWindowID id,
                        const wxPoint& pos,
                        const wxSize& size,
index 9ef60f55940169502ca6b111a60cb7a172b4935a..103d68ca440e684148637c4b011267d31b503bfc 100644 (file)
@@ -19,6 +19,7 @@
 //-------------------------------------------------------------------------------------
 
 #include "wx/defs.h"
+#include "wx/arrstr.h"
 
 #include "wx/radiobox.h"
 #include "wx/radiobut.h"
@@ -93,6 +94,18 @@ wxRadioBox::~wxRadioBox()
 //-------------------------------------------------------------------------------------
 // Create the radiobox for two-step construction
 
+bool wxRadioBox::Create(wxWindow *parent, wxWindowID id, const wxString& label,
+                        const wxPoint& pos, const wxSize& size,
+                        const wxArrayString& choices,
+                        int majorDim, long style,
+                        const wxValidator& val, const wxString& name)
+{
+    wxCArrayString chs(choices);
+
+    return Create(parent, id, label, pos, size, chs.GetCount(),
+                  chs.GetStrings(), majorDim, style, val, name);
+}
+
 bool wxRadioBox::Create(wxWindow *parent, wxWindowID id, const wxString& label,
                         const wxPoint& pos, const wxSize& size,
                         int n, const wxString choices[],
index ef510315156bedd0b82c77fd0336b187a1b3fe6e..be028532038e9a98078758f9ae5ec7a4b2c592f8 100644 (file)
@@ -75,6 +75,17 @@ wxCheckListBox::wxCheckListBox(wxWindow *parent, wxWindowID id,
            style, val, name);
 }
 
+wxCheckListBox::wxCheckListBox(wxWindow *parent, wxWindowID id,
+                               const wxPoint& pos, const wxSize& size,
+                               const wxArrayString& choices,
+                               long style, const wxValidator& val,
+                               const wxString& name)
+                               : wxCheckListBoxBase()
+{
+    Create(parent, id, pos, size, choices,
+           style, val, name);
+}
+
 bool wxCheckListBox::Create(wxWindow *parent, wxWindowID id,
                             const wxPoint& pos,
                             const wxSize& size,
@@ -89,6 +100,20 @@ bool wxCheckListBox::Create(wxWindow *parent, wxWindowID id,
     return retVal;
 }   
 
+bool wxCheckListBox::Create(wxWindow *parent, wxWindowID id,
+                            const wxPoint& pos,
+                            const wxSize& size,
+                            const wxArrayString& choices,
+                            long style,
+                            const wxValidator& validator,
+                            const wxString& name)
+{
+    // wxListBox::Create calls set, which adds the prefixes
+    bool retVal = wxListBox::Create(parent, id, pos, size, choices,
+                                    style, validator, name);
+    return retVal;
+}   
+
 // check items
 // -----------
 
index 27673013faa6fbd150a5bf1a454132b7350fac00..fbc5fdc03ededafbb85e27ab0c00e1ded8e99fc8 100644 (file)
@@ -22,6 +22,7 @@
 
 #include "wx/choice.h"
 #include "wx/utils.h"
+#include "wx/arrstr.h"
 
 #ifdef __VMS__
 #pragma message disable nosimpint
@@ -143,6 +144,19 @@ bool wxChoice::Create(wxWindow *parent, wxWindowID id,
     return TRUE;
 }
 
+bool wxChoice::Create(wxWindow *parent, wxWindowID id,
+                      const wxPoint& pos,
+                      const wxSize& size,
+                      const wxArrayString& choices,
+                      long style,
+                      const wxValidator& validator,
+                      const wxString& name)
+{
+    wxCArrayString chs(choices);
+    return Create(parent, id, pos, size, chs.GetCount(), chs.GetStrings(),
+                  style, validator, name);
+}
+
 wxChoice::~wxChoice()
 {
     // For some reason destroying the menuWidget
index e4ec22c7daf918708ec16b5e89b5be99dce48cfb..4389cc1f00edc2d0b6415f99e27dbdeb1cb2ded5 100644 (file)
@@ -18,6 +18,7 @@
 #if wxUSE_COMBOBOX
 
 #include "wx/combobox.h"
+#include "wx/arrstr.h"
 
 #ifdef __VMS__
 #pragma message disable nosimpint
@@ -93,6 +94,20 @@ bool wxComboBox::Create(wxWindow *parent, wxWindowID id,
     return TRUE;
 }
 
+bool wxComboBox::Create(wxWindow *parent, wxWindowID id,
+                        const wxString& value,
+                        const wxPoint& pos,
+                        const wxSize& size,
+                        const wxArrayString& choices,
+                        long style,
+                        const wxValidator& validator,
+                        const wxString& name)
+{
+    wxCArrayString chs(choices);
+    return Create(parent, id, value, pos, size, chs.GetCount(), 
+                  chs.GetStrings(), style, validator, name);
+}
+
 wxComboBox::~wxComboBox()
 {
     DetachWidget((Widget) m_mainWidget); // Removes event handlers
index 9e1eec75f9df7fdf01f8f2da54d27173a303c2a4..0d588f0911e8ac4b1a12ac4ef0e253fdabd5cab6 100644 (file)
@@ -14,6 +14,7 @@
 #if wxUSE_COMBOBOX
 
 #include "wx/combobox.h"
+#include "wx/arrstr.h"
 
 #ifdef __VMS__
 #pragma message disable nosimpint
@@ -122,6 +123,20 @@ bool wxComboBox::Create(wxWindow *parent, wxWindowID id,
     return true;
 }
 
+bool wxComboBox::Create(wxWindow *parent, wxWindowID id,
+                        const wxString& value,
+                        const wxPoint& pos,
+                        const wxSize& size,
+                        const wxArrayString& choices,
+                        long style,
+                        const wxValidator& validator,
+                        const wxString& name)
+{
+    wxCArrayString chs(choices);
+    return Create(parent, id, value, pos, size, chs.GetCount(), 
+                  chs.GetStrings(), style, validator, name);
+}
+
 void wxComboBox::AdjustDropDownListSize()
 {
     int newListCount = -1, itemCount = GetCount();
index 9908f10c237d174101bd7ca8e32404f560065bb2..1ad6566347e527948eee4557b7a9783bacac5734 100644 (file)
@@ -23,6 +23,7 @@
 #include "wx/dynarray.h"
 #include "wx/log.h"
 #include "wx/utils.h"
+#include "wx/arrstr.h"
 
 #ifdef __VMS__
 #pragma message disable nosimpint
@@ -157,6 +158,19 @@ bool wxListBox::Create(wxWindow *parent, wxWindowID id,
     return TRUE;
 }
 
+bool wxListBox::Create(wxWindow *parent, wxWindowID id,
+                       const wxPoint& pos,
+                       const wxSize& size,
+                       const wxArrayString& choices,
+                       long style,
+                       const wxValidator& validator,
+                       const wxString& name)
+{
+    wxCArrayString chs(choices);
+    return Create(parent, id, pos, size, chs.GetCount(), chs.GetStrings(),
+                  style, validator, name);
+}
+
 wxListBox::~wxListBox()
 {
     if( HasClientObjectData() )
index c85dea8e7412056b1b22ef7eab62b63645816a6c..82193e0cceccc507926f455329c91f3988364b40 100644 (file)
@@ -206,6 +206,17 @@ void wxMenuBar::Init()
     m_font = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT);
 }
 
+wxMenuBar::wxMenuBar(int n, wxMenu *menus[], const wxArrayString& titles)
+{
+    wxASSERT( size_t(n) == titles.GetCount() );
+
+    Init();
+
+    m_titles = titles;
+    for ( int i = 0; i < n; i++ )
+        m_menus.Append(menus[i]);
+}
+
 wxMenuBar::wxMenuBar(int n, wxMenu *menus[], const wxString titles[])
 {
     Init();
index 62fb7e2b3d9c237c800112b22225427bd540b0fa..774c4df47c5fa79edfeefeb0a8296ba59936aeb7 100644 (file)
@@ -21,6 +21,7 @@
 
 #include "wx/radiobox.h"
 #include "wx/utils.h"
+#include "wx/arrstr.h"
 
 #ifdef __VMS__
 #pragma message disable nosimpint
@@ -157,6 +158,16 @@ bool wxRadioBox::Create(wxWindow *parent, wxWindowID id, const wxString& title,
     return TRUE;
 }
 
+bool wxRadioBox::Create(wxWindow *parent, wxWindowID id, const wxString& title,
+             const wxPoint& pos, const wxSize& size,
+             const wxArrayString& choices,
+             int majorDim, long style,
+             const wxValidator& val, const wxString& name)
+{
+    wxCArrayString chs(choices);
+    return Create(parent, id, title, pos, size, chs.GetCount(),
+                  chs.GetStrings(), majorDim, style, val, name);
+}
 
 wxRadioBox::~wxRadioBox()
 {
index 7f4c77711aa3b7835113854e87c218286e8bf7b5..47867f2de0d5618825eff64cad08cd781f229d2a 100644 (file)
@@ -345,6 +345,15 @@ wxCheckListBox::wxCheckListBox(wxWindow *parent, wxWindowID id,
     Create(parent, id, pos, size, nStrings, choices, style, val, name);
 }
 
+wxCheckListBox::wxCheckListBox(wxWindow *parent, wxWindowID id,
+                               const wxPoint& pos, const wxSize& size,
+                               const wxArrayString& choices,
+                               long style, const wxValidator& val,
+                               const wxString& name)
+{
+    Create(parent, id, pos, size, choices, style, val, name);
+}
+
 bool wxCheckListBox::Create(wxWindow *parent, wxWindowID id,
                             const wxPoint& pos, const wxSize& size,
                             int n, const wxString choices[],
@@ -355,6 +364,16 @@ bool wxCheckListBox::Create(wxWindow *parent, wxWindowID id,
                              style | wxLB_OWNERDRAW, validator, name);
 }
 
+bool wxCheckListBox::Create(wxWindow *parent, wxWindowID id,
+                            const wxPoint& pos, const wxSize& size,
+                            const wxArrayString& choices,
+                            long style,
+                            const wxValidator& validator, const wxString& name)
+{
+    return wxListBox::Create(parent, id, pos, size, choices,
+                             style | wxLB_OWNERDRAW, validator, name);
+}
+
 // misc overloaded methods
 // -----------------------
 
index 3a5919592bb15fc0153a0c9135a91938010d686e..220f7c8cfd555c259865017f15d6ad3defe025b0 100644 (file)
@@ -151,6 +151,20 @@ bool wxChoice::Create(wxWindow *parent,
     return TRUE;
 }
 
+bool wxChoice::Create(wxWindow *parent,
+                      wxWindowID id,
+                      const wxPoint& pos,
+                      const wxSize& size,
+                      const wxArrayString& choices,
+                      long style,
+                      const wxValidator& validator,
+                      const wxString& name)
+{
+    wxCArrayString chs(choices);
+    return Create(parent, id, pos, size, chs.GetCount(), chs.GetStrings(),
+                  style, validator, name);
+}
+
 wxChoice::~wxChoice()
 {
     Free();
index f71cb41a3f5352e0f8838abadb693efe184228f9..e23e1fa66ee726f79da4f52a0764723c36b7bf3e 100644 (file)
@@ -433,6 +433,20 @@ bool wxComboBox::Create(wxWindow *parent, wxWindowID id,
     return TRUE;
 }
 
+bool wxComboBox::Create(wxWindow *parent, wxWindowID id,
+                        const wxString& value,
+                        const wxPoint& pos,
+                        const wxSize& size,
+                        const wxArrayString& choices,
+                        long style,
+                        const wxValidator& validator,
+                        const wxString& name)
+{
+    wxCArrayString chs(choices);
+    return Create(parent, id, value, pos, size, chs.GetCount(),
+                  chs.GetStrings(), style, validator, name);
+}
+
 void wxComboBox::SetValue(const wxString& value)
 {
     if ( HasFlag(wxCB_READONLY) )
index 90cfac17792dd7f8e8982855ef1405f4e06fa97d..1102d6f012b5d6325b4d4747615810b24f6a0832 100644 (file)
@@ -251,6 +251,20 @@ bool wxListBox::Create(wxWindow *parent,
     return TRUE;
 }
 
+bool wxListBox::Create(wxWindow *parent,
+                       wxWindowID id,
+                       const wxPoint& pos,
+                       const wxSize& size,
+                       const wxArrayString& choices,
+                       long style,
+                       const wxValidator& wxVALIDATOR_PARAM(validator),
+                       const wxString& name)
+{
+    wxCArrayString chs(choices);
+    return Create(parent, id, pos, size, chs.GetCount(), chs.GetStrings(),
+                  style, validator, name);
+}
+
 wxListBox::~wxListBox()
 {
     Free();
index 58d056fa613bc8c55297b17a30ec2083b369f30b..bb1b247614aac745fdf1f2c11c37583e518a1c0d 100644 (file)
@@ -352,6 +352,22 @@ bool wxRadioBox::Create(wxWindow *parent,
     return TRUE;
 }
 
+bool wxRadioBox::Create(wxWindow *parent,
+                        wxWindowID id,
+                        const wxString& title,
+                        const wxPoint& pos,
+                        const wxSize& size,
+                        const wxArrayString& choices,
+                        int majorDim,
+                        long style,
+                        const wxValidator& val,
+                        const wxString& name)
+{
+    wxCArrayString chs(choices);
+    return Create(parent, id, title, pos, size, chs.GetCount(),
+                  chs.GetStrings(), majorDim, style, val, name);
+}
+
 wxRadioBox::~wxRadioBox()
 {
     m_isBeingDeleted = TRUE;
index ec5776444d2965b20cd9c670ab8a2c6cf2866492..6c06fa391beb735cf12d405b1ff466d5acd98e7a 100644 (file)
@@ -291,6 +291,31 @@ wxCheckListBox::wxCheckListBox (
           );
 } // end of wxCheckListBox::wxCheckListBox
 
+wxCheckListBox::wxCheckListBox (
+  wxWindow*                         pParent
+, wxWindowID                        vId
+, const wxPoint&                    rPos
+, const wxSize&                     rSize
+, const wxArrayString&              asChoices
+, long                              lStyle
+, const wxValidator&                rVal
+, const wxString&                   rsName
+)
+              : wxListBox()
+{
+    wxCArrayString chs(asChoices);
+    Create( pParent
+           ,vId
+           ,rPos
+           ,rSize
+           ,chs.GetCount()
+           ,chs.GetStrings()
+           ,lStyle | wxLB_OWNERDRAW
+           ,rVal
+           ,rsName
+          );
+} // end of wxCheckListBox::wxCheckListBox
+
 void wxCheckListBox::Delete(
   int                               N
 )
index 6098b3afa471faf797745c9081ea096616bdc5b6..b980792934bc8a4037ee4f858c7e6517e05b1f48 100644 (file)
 
 IMPLEMENT_DYNAMIC_CLASS(wxChoice, wxControl)
 
+bool wxChoice::Create(
+  wxWindow*                         pParent
+, wxWindowID                        vId
+, const wxPoint&                    rPos
+, const wxSize&                     rSize
+, const wxArrayString&              asChoices
+, long                              lStyle
+, const wxValidator&                rValidator
+, const wxString&                   rsName
+)
+{
+    wxCArrayString chs(asChoices);
+
+    return Create(pParent, vId, rPos, rSize, chs.GetCount(), chs.GetStrings(),
+                  lStyle, rValidator, rsName);
+}
+
 bool wxChoice::Create(
   wxWindow*                         pParent
 , wxWindowID                        vId
index 90a8241fae21a63ca96348322652e631966e976a..a3123e63472b04709cc6ca5b4305b25b05e2446b 100644 (file)
@@ -86,6 +86,24 @@ bool wxComboBox::OS2Command(
     return FALSE;
 } // end of wxComboBox::OS2Command
 
+bool wxComboBox::Create(
+  wxWindow*                         pParent
+, wxWindowID                        vId
+, const wxString&                   rsValue
+, const wxPoint&                    rPos
+, const wxSize&                     rSize
+, const wxArrayString&              asChoices
+, long                              lStyle
+, const wxValidator&                rValidator
+, const wxString&                   rsName
+)
+{
+    wxCArrayString chs(asChoices);
+
+    return Create(pParent, vId, rsValue, rPos, rSize, chs.GetCount(),
+                  chs.GetStrings(), lStyle, rValidator, rsName);
+}
+
 bool wxComboBox::Create(
   wxWindow*                         pParent
 , wxWindowID                        vId
index 69ba786869cb12edc69ff528e480d9573b81c8c5..6d56ce18909a32c3dad9b9201f0a3257528b0ed4 100644 (file)
@@ -85,6 +85,23 @@ wxListBox::wxListBox()
     m_nSelected = 0;
 } // end of wxListBox::wxListBox
 
+bool wxListBox::Create(
+  wxWindow*                         pParent
+, wxWindowID                        vId
+, const wxPoint&                    rPos
+, const wxSize&                     rSize
+, const wxArrayString&              asChoices
+, long                              lStyle
+, const wxValidator&                rValidator
+, const wxString&                   rsName
+)
+{
+    wxCArrayString chs(asChoices);
+
+    return Create(pParent, vId, rPos, rSize, chs.GetCount(), chs.GetStrings(),
+                  lStyle, rValidator, rsName);
+}
+
 bool wxListBox::Create(
   wxWindow*                         pParent
 , wxWindowID                        vId
index b0d640ae17bd697d25a93df04a38397484b16344..94792b521704e73b29d220314c89f46940044e8d 100644 (file)
@@ -253,6 +253,25 @@ bool wxRadioBox::ContainsHWND(
     return FALSE;
 } // end of wxRadioBox::ContainsHWND
 
+bool wxRadioBox::Create(
+  wxWindow*                         pParent
+, wxWindowID                        vId
+, const wxString&                   rsTitle
+, const wxPoint&                    rPos
+, const wxSize&                     rSize
+, const wxArrayString&              asChoices
+, int                               nMajorDim
+, long                              lStyle
+, const wxValidator&                rVal
+, const wxString&                   rsName
+)
+{
+    wxCArrayString(asChoices);
+
+    return Create(pParent, vId, rsTitle, rPos, rSize, chs.GetCount(),
+                  chs.GetStrings(), nMajorDim, lStyle, rVal, rsName);
+}
+
 bool wxRadioBox::Create(
   wxWindow*                         pParent
 , wxWindowID                        vId
index 8f3981f8c41f85598ebad1edaea0dab436df6392..f527683e6129b2c44ac7cf337d18a3cf3e1aadf1 100644 (file)
@@ -55,6 +55,35 @@ void wxCheckListBox::Init()
 {
 }
 
+wxCheckListBox::wxCheckListBox(wxWindow *parent,
+                               wxWindowID id,
+                               const wxPoint &pos,
+                               const wxSize &size,
+                               const wxArrayString& choices,
+                               long style,
+                               const wxValidator& validator,
+                               const wxString &name)
+{
+    Init();
+
+    Create(parent, id, pos, size, choices, style, validator, name);
+}
+
+bool wxCheckListBox::Create(wxWindow *parent,
+                            wxWindowID id,
+                            const wxPoint &pos,
+                            const wxSize &size,
+                            const wxArrayString& choices,
+                            long style,
+                            const wxValidator& validator,
+                            const wxString &name)
+{
+    wxCArrayString chs(choices);
+
+    return Create(parent, id, pos, size, chs.GetCount(), chs.GetStrings(),
+                  style, validator, name);
+}
+
 bool wxCheckListBox::Create(wxWindow *parent,
                             wxWindowID id,
                             const wxPoint &pos,
index 81925542a1e7359efdb7f11dea25fb7f7a441ba3..426b2b41803d01b0371d02e5fdc9cbb4d78b9d45 100644 (file)
@@ -31,6 +31,7 @@
 
 #ifndef WX_PRECOMP
     #include "wx/choice.h"
+    #include "wx/arrstr.h"
 #endif
 
 IMPLEMENT_DYNAMIC_CLASS(wxChoice, wxControl)
@@ -39,6 +40,31 @@ BEGIN_EVENT_TABLE(wxChoice, wxComboBox)
     EVT_COMBOBOX(-1, wxChoice::OnComboBox)
 END_EVENT_TABLE()
 
+wxChoice::wxChoice(wxWindow *parent, wxWindowID id,
+                   const wxPoint& pos,
+                   const wxSize& size,
+                   const wxArrayString& choices,
+                   long style,
+                   const wxValidator& validator,
+                   const wxString& name)
+{
+    Create(parent, id, pos, size, choices, style, validator, name);
+}
+
+bool wxChoice::Create(wxWindow *parent, wxWindowID id,
+                      const wxPoint& pos,
+                      const wxSize& size,
+                      const wxArrayString& choices,
+                      long style,
+                      const wxValidator& validator,
+                      const wxString& name)
+{
+    wxCArrayString chs(choices);
+
+    return Create(parent, id, pos, size, chs.GetCount(), chs.GetStrings(),
+                  style, validator, name);
+}
+
 bool wxChoice::Create(wxWindow *parent, wxWindowID id,
                       const wxPoint& pos,
                       const wxSize& size,
index a61d580100093ee92c3012755ae185ffa50405ba..6c3be430e55b27f6f2a82ae27fda0adf7071e668 100644 (file)
@@ -657,6 +657,37 @@ void wxComboBox::Init()
     m_lbox = (wxListBox *)NULL;
 }
 
+wxComboBox::wxComboBox(wxWindow *parent,
+                       wxWindowID id,
+                       const wxString& value,
+                       const wxPoint& pos,
+                       const wxSize& size,
+                       const wxArrayString& choices,
+                       long style,
+                       const wxValidator& validator,
+                       const wxString& name)
+{
+    Init();
+
+    Create(parent, id, value, pos, size, choices, style, validator, name);
+}
+
+bool wxComboBox::Create(wxWindow *parent,
+                        wxWindowID id,
+                        const wxString& value,
+                        const wxPoint& pos,
+                        const wxSize& size,
+                        const wxArrayString& choices,
+                        long style,
+                        const wxValidator& validator,
+                        const wxString& name)
+{
+    wxCArrayString chs(choices);
+
+    return Create(parent, id, value, pos, size, chs.GetCount(),
+                  chs.GetStrings(), style, validator, name);
+}
+
 bool wxComboBox::Create(wxWindow *parent,
                         wxWindowID id,
                         const wxString& value,
index 099d70f8e396950cf28969f15a98450716356623..d05da69d53f92793babfe4d21e0fbadc8b506946 100644 (file)
@@ -80,6 +80,35 @@ void wxListBox::Init()
     m_showScrollbarY = FALSE;
 }
 
+wxListBox::wxListBox(wxWindow *parent,
+                     wxWindowID id,
+                     const wxPoint &pos,
+                     const wxSize &size,
+                     const wxArrayString& choices,
+                     long style,
+                     const wxValidator& validator,
+                     const wxString &name)
+{
+    Init();
+
+    Create(parent, id, pos, size, choices, style, validator, name);
+}
+
+bool wxListBox::Create(wxWindow *parent,
+                       wxWindowID id,
+                       const wxPoint &pos,
+                       const wxSize &size,
+                       const wxArrayString& choices,
+                       long style,
+                       const wxValidator& validator,
+                       const wxString &name)
+{
+    wxCArrayString chs(choices);
+
+    return Create(parent, id, pos, size, chs.GetCount(), chs.GetStrings(),
+                  style, validator, name);
+}
+
 bool wxListBox::Create(wxWindow *parent,
                        wxWindowID id,
                        const wxPoint &pos,
index c758abf74bae56eb5703cde99aa240051ed55315..621fde6d6fe02baef937b13ebb40f846fb5d858c 100644 (file)
@@ -34,6 +34,7 @@
     #include "wx/radiobox.h"
     #include "wx/radiobut.h"
     #include "wx/validate.h"
+    #include "wx/arrstr.h"
 #endif
 
 #include "wx/tooltip.h"
@@ -101,6 +102,37 @@ void wxRadioBox::Init()
     m_majorDim = 0;
 }
 
+wxRadioBox::wxRadioBox(wxWindow *parent, wxWindowID id, const wxString& title,
+                       const wxPoint& pos, const wxSize& size,
+                       const wxArrayString& choices,
+                       int majorDim, long style,
+                       const wxValidator& val, const wxString& name)
+{
+    wxCArrayString chs(choices);
+
+    Init();
+
+    (void)Create(parent, id, title, pos, size, chs.GetCount(), 
+                 chs.GetStrings(), majorDim, style, val, name);
+}
+
+bool wxRadioBox::Create(wxWindow *parent,
+                        wxWindowID id,
+                        const wxString& title,
+                        const wxPoint& pos,
+                        const wxSize& size,
+                        const wxArrayString& choices,
+                        int majorDim,
+                        long style,
+                        const wxValidator& val,
+                        const wxString& name)
+{
+    wxCArrayString chs(choices);
+
+    return Create(parent, id, title, pos, size, chs.GetCount(), 
+                  chs.GetStrings(), majorDim, style, val, name);
+}
+
 bool wxRadioBox::Create(wxWindow *parent,
                         wxWindowID id,
                         const wxString& title,