]> git.saurik.com Git - wxWidgets.git/blob - interface/editlbox.h
compilation fix after switch to using std::string in wxString internally when wxUSE_S...
[wxWidgets.git] / interface / 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 @wxheader{editlbox.h}
12
13 An editable listbox is composite control that lets the user easily enter,
14 delete and reorder a list of strings.
15
16 @beginStyleTable
17 @style{wxEL_ALLOW_NEW}
18 Allows the user to enter new strings.
19 @style{wxEL_ALLOW_EDIT}
20 Allows the user to edit existing strings.
21 @style{wxEL_ALLOW_DELETE}
22 Allows the user to delete existing strings.
23 @style{wxEL_NO_REORDER}
24 Does not allow the user to reorder the strings.
25 @style{wxEL_DEFAULT_STYLE}
26 Default style: wxEL_ALLOW_NEW|wxEL_ALLOW_EDIT|wxEL_ALLOW_DELETE.
27 @endStyleTable
28
29 @library{wxadv}
30 @category{ctrl}
31
32 @see wxListBox
33 */
34 class wxEditableListBox : public wxPanel
35 {
36 public:
37 /**
38 Default ctor.
39 */
40 wxEditableListBox();
41
42 /**
43 Constructor, creating and showing a list box.
44
45 @param parent
46 Parent window. Must not be @NULL.
47 @param id
48 Window identifier. The value wxID_ANY indicates a default value.
49 @param label
50 The text shown just before the list control.
51 @param pos
52 Window position.
53 @param size
54 Window size. If wxDefaultSize is specified then the window is sized
55 appropriately.
56 @param style
57 Window style. See wxEditableListBox.
58 @param name
59 Window name.
60
61 @see Create()
62 */
63 wxEditableListBox(wxWindow* parent, wxWindowID id,
64 const wxString& label,
65 const wxPoint& pos = wxDefaultPosition,
66 const wxSize& size = wxDefaultSize,
67 long style = wxEL_DEFAULT_STYLE,
68 const wxString& name = "editableListBox");
69
70 /**
71 Destructor, destroying the list box.
72 */
73 ~wxEditableListBox();
74
75 /**
76 Creates the editable listbox for two-step construction.
77 See wxEditableListBox() for further details.
78 */
79 bool Create(wxWindow* parent, wxWindowID id,
80 const wxString& label,
81 const wxPoint& pos = wxDefaultPosition,
82 const wxSize& size = wxDefaultSize,
83 long style = wxEL_DEFAULT_STYLE,
84 const wxString& name = "editableListBox");
85
86 /**
87 Replaces current contents with given strings.
88 */
89 void SetStrings(const wxArrayString& strings);
90
91
92 /**
93 Returns in the given array the current contents of the control
94 (the array will be erased before control's contents are appended).
95 */
96 void GetSelections(wxArrayString& strings) const;
97 };
98