%{
#include <wx/checklst.h>
- DECLARE_DEF_STRING(ListBoxNameStr);
%}
+MAKE_CONST_WXSTRING(ListBoxNameStr);
+
+
//---------------------------------------------------------------------------
%newgroup
class wxListBox : public wxControlWithItems
{
public:
- %addtofunc wxListBox "self._setOORInfo(self)"
- %addtofunc wxListBox() ""
+ %pythonAppend wxListBox "self._setOORInfo(self)"
+ %pythonAppend wxListBox() ""
wxListBox(wxWindow* parent, wxWindowID id,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
- int choices=0, wxString* choices_array = NULL,
+ //int choices=0, wxString* choices_array = NULL,
+ const wxArrayString& choices = wxPyEmptyStringArray,
long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxPyListBoxNameStr);
%name(PreListBox)wxListBox();
bool Create(wxWindow* parent, wxWindowID id,
- const wxPoint& pos = wxDefaultPosition,
- const wxSize& size = wxDefaultSize,
- int choices=0, wxString* choices_array = NULL,
- long style = 0,
- const wxValidator& validator = wxDefaultValidator,
- const wxString& name = wxPyListBoxNameStr);
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ //int choices=0, wxString* choices_array = NULL,
+ const wxArrayString& choices = wxPyEmptyStringArray,
+ long style = 0,
+ const wxValidator& validator = wxDefaultValidator,
+ const wxString& name = wxPyListBoxNameStr);
// all generic methods are in wxControlWithItems...
// multiple selection logic
virtual bool IsSelected(int n) const;
- virtual void SetSelection(int n, bool select = TRUE);
+ virtual void SetSelection(int n, bool select = True);
virtual void Select(int n);
void Deselect(int n);
void DeselectAll(int itemToLeaveSelected = -1);
- virtual bool SetStringSelection(const wxString& s, bool select = TRUE);
+ virtual bool SetStringSelection(const wxString& s, bool select = True);
// works for single as well as multiple selection listboxes (unlike
// GetSelection which only works for listboxes with single selection)
// listbox and ensures that it is visible i.e. not scrolled out of view
void AppendAndEnsureVisible(const wxString& s);
- // return TRUE if this listbox is sorted
+ // return True if this listbox is sorted
bool IsSorted() const;
};
class wxCheckListBox : public wxListBox
{
public:
- %addtofunc wxListBox "self._setOORInfo(self)"
- %addtofunc wxListBox() ""
+ %pythonAppend wxCheckListBox "self._setOORInfo(self)"
+ %pythonAppend wxCheckListBox() ""
wxCheckListBox(wxWindow *parent, wxWindowID id,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
- int choices = 0, wxString* choices_array = NULL,
+ //int choices = 0, wxString* choices_array = NULL,
+ const wxArrayString& choices = wxPyEmptyStringArray,
long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxPyListBoxNameStr);
%name(PreCheckListBox)wxCheckListBox();
bool Create(wxWindow *parent, wxWindowID id,
- const wxPoint& pos = wxDefaultPosition,
- const wxSize& size = wxDefaultSize,
- int choices = 0, wxString* choices_array = NULL,
- long style = 0,
- const wxValidator& validator = wxDefaultValidator,
- const wxString& name = wxPyListBoxNameStr);
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ //int choices = 0, wxString* choices_array = NULL,
+ const wxArrayString& choices = wxPyEmptyStringArray,
+ long style = 0,
+ const wxValidator& validator = wxDefaultValidator,
+ const wxString& name = wxPyListBoxNameStr);
bool IsChecked(int index);
- void Check(int index, int check = TRUE);
+ void Check(int index, int check = True);
-#ifndef __WXMAC__
+#if defined(__WXMSW__) || defined(__WXGTK__)
int GetItemHeight();
#endif