]> git.saurik.com Git - wxWidgets.git/blob - interface/wx/editlbox.h
document "clear" parameter of ctor/Create() properly (part of #9639)
[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 @library{wxadv}
29 @category{ctrl}
30
31 @see wxListBox
32 */
33 class wxEditableListBox : public wxPanel
34 {
35 public:
36 /**
37 Default ctor.
38 */
39 wxEditableListBox();
40
41 /**
42 Constructor, creating and showing a list box.
43
44 @param parent
45 Parent window. Must not be @NULL.
46 @param id
47 Window identifier. The value wxID_ANY indicates a default value.
48 @param label
49 The text shown just before the list control.
50 @param pos
51 Window position.
52 @param size
53 Window size. If wxDefaultSize is specified then the window is sized
54 appropriately.
55 @param style
56 Window style. See wxEditableListBox.
57 @param name
58 Window name.
59
60 @see Create()
61 */
62 wxEditableListBox(wxWindow* parent, wxWindowID id,
63 const wxString& label,
64 const wxPoint& pos = wxDefaultPosition,
65 const wxSize& size = wxDefaultSize,
66 long style = wxEL_DEFAULT_STYLE,
67 const wxString& name = "editableListBox");
68
69 /**
70 Destructor, destroying the list box.
71 */
72 ~wxEditableListBox();
73
74 /**
75 Creates the editable listbox for two-step construction.
76 See wxEditableListBox() for further details.
77 */
78 bool Create(wxWindow* parent, wxWindowID id,
79 const wxString& label,
80 const wxPoint& pos = wxDefaultPosition,
81 const wxSize& size = wxDefaultSize,
82 long style = wxEL_DEFAULT_STYLE,
83 const wxString& name = "editableListBox");
84
85 /**
86 Replaces current contents with given strings.
87 */
88 void SetStrings(const wxArrayString& strings);
89
90
91 /**
92 Returns in the given array the current contents of the control
93 (the array will be erased before control's contents are appended).
94 */
95 void GetSelections(wxArrayString& strings) const;
96 };
97