]> git.saurik.com Git - wxWidgets.git/blame - interface/wx/editlbox.h
Resolve ambiguity between GetClientXXX() methods in wxOSX wxComboBox.
[wxWidgets.git] / interface / wx / editlbox.h
CommitLineData
23324ae1
FM
1/////////////////////////////////////////////////////////////////////////////
2// Name: editlbox.h
e54c96f1 3// Purpose: interface of wxEditableListBox
23324ae1
FM
4// Author: wxWidgets team
5// RCS-ID: $Id$
526954c5 6// Licence: wxWindows licence
23324ae1
FM
7/////////////////////////////////////////////////////////////////////////////
8
9/**
10 @class wxEditableListBox
7c913512 11
1f1d2182
FM
12 An editable listbox is composite control that lets the user easily enter,
13 delete and reorder a list of strings.
7c913512 14
23324ae1 15 @beginStyleTable
8c6791e4 16 @style{wxEL_ALLOW_NEW}
23324ae1 17 Allows the user to enter new strings.
8c6791e4 18 @style{wxEL_ALLOW_EDIT}
23324ae1 19 Allows the user to edit existing strings.
8c6791e4 20 @style{wxEL_ALLOW_DELETE}
23324ae1 21 Allows the user to delete existing strings.
8c6791e4 22 @style{wxEL_NO_REORDER}
23324ae1 23 Does not allow the user to reorder the strings.
8c6791e4 24 @style{wxEL_DEFAULT_STYLE}
1f1d2182 25 Default style: wxEL_ALLOW_NEW|wxEL_ALLOW_EDIT|wxEL_ALLOW_DELETE.
23324ae1 26 @endStyleTable
7c913512 27
32ace389
RR
28 The control uses a wxListCtrl internally and emit its events.
29
23324ae1 30 @library{wxadv}
1f1d2182 31 @category{ctrl}
7c913512 32
32ace389 33 @see wxListBox, wxListCtrl
23324ae1
FM
34*/
35class wxEditableListBox : public wxPanel
36{
37public:
1f1d2182
FM
38 /**
39 Default ctor.
40 */
41 wxEditableListBox();
42
23324ae1
FM
43 /**
44 Constructor, creating and showing a list box.
3c4f71cc 45
7c913512 46 @param parent
4cc4bfaf 47 Parent window. Must not be @NULL.
7c913512 48 @param id
4cc4bfaf 49 Window identifier. The value wxID_ANY indicates a default value.
7c913512 50 @param label
4cc4bfaf 51 The text shown just before the list control.
7c913512 52 @param pos
4cc4bfaf 53 Window position.
dc1b07fd 54 If ::wxDefaultPosition is specified then a default position is chosen.
7c913512 55 @param size
dc1b07fd
FM
56 Window size.
57 If ::wxDefaultSize is specified then the window is sized appropriately.
7c913512 58 @param style
4cc4bfaf 59 Window style. See wxEditableListBox.
7c913512 60 @param name
4cc4bfaf 61 Window name.
3c4f71cc 62
4cc4bfaf 63 @see Create()
23324ae1 64 */
7c913512
FM
65 wxEditableListBox(wxWindow* parent, wxWindowID id,
66 const wxString& label,
67 const wxPoint& pos = wxDefaultPosition,
68 const wxSize& size = wxDefaultSize,
69 long style = wxEL_DEFAULT_STYLE,
408776d0 70 const wxString& name = wxEditableListBoxNameStr);
23324ae1
FM
71
72 /**
73 Destructor, destroying the list box.
74 */
adaaa686 75 virtual ~wxEditableListBox();
23324ae1
FM
76
77 /**
1f1d2182
FM
78 Creates the editable listbox for two-step construction.
79 See wxEditableListBox() for further details.
23324ae1 80 */
43c48e1e 81 bool Create(wxWindow* parent, wxWindowID id, const wxString& label,
23324ae1
FM
82 const wxPoint& pos = wxDefaultPosition,
83 const wxSize& size = wxDefaultSize,
84 long style = wxEL_DEFAULT_STYLE,
43c48e1e 85 const wxString& name = wxEditableListBoxNameStr);
23324ae1
FM
86
87 /**
88 Replaces current contents with given strings.
89 */
90 void SetStrings(const wxArrayString& strings);
1f1d2182
FM
91
92
93 /**
94 Returns in the given array the current contents of the control
95 (the array will be erased before control's contents are appended).
96 */
f1d5aa12 97 void GetStrings(wxArrayString& strings) const;
23324ae1 98};
e54c96f1 99