]> git.saurik.com Git - wxWidgets.git/blob - interface/wx/editlbox.h
added a note about XRCID() and EVT_*_RANGE macros (see bug #11431)
[wxWidgets.git] / interface / wx / editlbox.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: editlbox.h
3 // Purpose: interface of wxEditableListBox
4 // Author: wxWidgets team
5 // RCS-ID: $Id$
6 // Licence: wxWindows license
7 /////////////////////////////////////////////////////////////////////////////
8
9 /**
10 @class wxEditableListBox
11
12 An editable listbox is composite control that lets the user easily enter,
13 delete and reorder a list of strings.
14
15 @beginStyleTable
16 @style{wxEL_ALLOW_NEW}
17 Allows the user to enter new strings.
18 @style{wxEL_ALLOW_EDIT}
19 Allows the user to edit existing strings.
20 @style{wxEL_ALLOW_DELETE}
21 Allows the user to delete existing strings.
22 @style{wxEL_NO_REORDER}
23 Does not allow the user to reorder the strings.
24 @style{wxEL_DEFAULT_STYLE}
25 Default style: wxEL_ALLOW_NEW|wxEL_ALLOW_EDIT|wxEL_ALLOW_DELETE.
26 @endStyleTable
27
28 The control uses a wxListCtrl internally and emit its events.
29
30 @library{wxadv}
31 @category{ctrl}
32
33 @see wxListBox, wxListCtrl
34 */
35 class wxEditableListBox : public wxPanel
36 {
37 public:
38 /**
39 Default ctor.
40 */
41 wxEditableListBox();
42
43 /**
44 Constructor, creating and showing a list box.
45
46 @param parent
47 Parent window. Must not be @NULL.
48 @param id
49 Window identifier. The value wxID_ANY indicates a default value.
50 @param label
51 The text shown just before the list control.
52 @param pos
53 Window position.
54 If ::wxDefaultPosition is specified then a default position is chosen.
55 @param size
56 Window size.
57 If ::wxDefaultSize is specified then the window is sized appropriately.
58 @param style
59 Window style. See wxEditableListBox.
60 @param name
61 Window name.
62
63 @see Create()
64 */
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,
70 const wxString& name = wxEditableListBoxNameStr);
71
72 /**
73 Destructor, destroying the list box.
74 */
75 virtual ~wxEditableListBox();
76
77 /**
78 Creates the editable listbox for two-step construction.
79 See wxEditableListBox() for further details.
80 */
81 bool Create(wxWindow* parent, wxWindowID id, const wxString& label,
82 const wxPoint& pos = wxDefaultPosition,
83 const wxSize& size = wxDefaultSize,
84 long style = wxEL_DEFAULT_STYLE,
85 const wxString& name = wxEditableListBoxNameStr);
86
87 /**
88 Replaces current contents with given strings.
89 */
90 void SetStrings(const wxArrayString& strings);
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 */
97 void GetStrings(wxArrayString& strings) const;
98 };
99