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:
@@ -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,
|
||||
|
@@ -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,
|
||||
|
@@ -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,
|
||||
|
@@ -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,
|
||||
|
@@ -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,
|
||||
|
@@ -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();
|
||||
|
@@ -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);
|
||||
}
|
||||
|
||||
|
@@ -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") );
|
||||
|
@@ -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[],
|
||||
|
@@ -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[],
|
||||
|
@@ -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[],
|
||||
|
@@ -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,
|
||||
|
@@ -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") );
|
||||
|
@@ -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[],
|
||||
|
@@ -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[],
|
||||
|
@@ -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[],
|
||||
|
@@ -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,
|
||||
|
@@ -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,
|
||||
|
@@ -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,
|
||||
|
@@ -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,
|
||||
|
@@ -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,
|
||||
|
@@ -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[],
|
||||
|
@@ -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,
|
||||
|
@@ -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,
|
||||
|
@@ -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,
|
||||
|
@@ -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,
|
||||
|
@@ -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[],
|
||||
|
@@ -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
|
||||
// -----------
|
||||
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -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();
|
||||
|
@@ -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() )
|
||||
|
@@ -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();
|
||||
|
@@ -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()
|
||||
{
|
||||
|
@@ -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
|
||||
// -----------------------
|
||||
|
||||
|
@@ -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();
|
||||
|
@@ -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) )
|
||||
|
@@ -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();
|
||||
|
@@ -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;
|
||||
|
@@ -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
|
||||
)
|
||||
|
@@ -23,6 +23,23 @@
|
||||
|
||||
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
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -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,
|
||||
|
@@ -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,
|
||||
|
@@ -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,
|
||||
|
@@ -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,
|
||||
|
@@ -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