Added some missing STL-like wxArray/wxArrayString constructors.
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
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user