]> git.saurik.com Git - wxWidgets.git/blame - interface/wx/editlbox.h
use wxFrameNameStr where possible instead of 'frame' string (for coherence with all...
[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$
6// Licence: wxWindows license
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.
7c913512 54 @param size
1f1d2182 55 Window size. If wxDefaultSize is specified then the window is sized
4cc4bfaf 56 appropriately.
7c913512 57 @param style
4cc4bfaf 58 Window style. See wxEditableListBox.
7c913512 59 @param name
4cc4bfaf 60 Window name.
3c4f71cc 61
4cc4bfaf 62 @see Create()
23324ae1 63 */
7c913512
FM
64 wxEditableListBox(wxWindow* parent, wxWindowID id,
65 const wxString& label,
66 const wxPoint& pos = wxDefaultPosition,
67 const wxSize& size = wxDefaultSize,
68 long style = wxEL_DEFAULT_STYLE,
69 const wxString& name = "editableListBox");
23324ae1
FM
70
71 /**
72 Destructor, destroying the list box.
73 */
adaaa686 74 virtual ~wxEditableListBox();
23324ae1
FM
75
76 /**
1f1d2182
FM
77 Creates the editable listbox for two-step construction.
78 See wxEditableListBox() for further details.
23324ae1 79 */
43c48e1e 80 bool Create(wxWindow* parent, wxWindowID id, const wxString& label,
23324ae1
FM
81 const wxPoint& pos = wxDefaultPosition,
82 const wxSize& size = wxDefaultSize,
83 long style = wxEL_DEFAULT_STYLE,
43c48e1e 84 const wxString& name = wxEditableListBoxNameStr);
23324ae1
FM
85
86 /**
87 Replaces current contents with given strings.
88 */
89 void SetStrings(const wxArrayString& strings);
1f1d2182
FM
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 */
f1d5aa12 96 void GetStrings(wxArrayString& strings) const;
23324ae1 97};
e54c96f1 98