]>
git.saurik.com Git - wxWidgets.git/blob - interface/wx/editlbox.h
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: interface of wxEditableListBox
4 // Author: wxWidgets team
5 // Licence: wxWindows licence
6 /////////////////////////////////////////////////////////////////////////////
8 #define wxEL_ALLOW_NEW 0x0100
9 #define wxEL_ALLOW_EDIT 0x0200
10 #define wxEL_ALLOW_DELETE 0x0400
11 #define wxEL_NO_REORDER 0x0800
12 #define wxEL_DEFAULT_STYLE (wxEL_ALLOW_NEW | wxEL_ALLOW_EDIT | wxEL_ALLOW_DELETE)
15 @class wxEditableListBox
17 An editable listbox is composite control that lets the user easily enter,
18 delete and reorder a list of strings.
21 @style{wxEL_ALLOW_NEW}
22 Allows the user to enter new strings.
23 @style{wxEL_ALLOW_EDIT}
24 Allows the user to edit existing strings.
25 @style{wxEL_ALLOW_DELETE}
26 Allows the user to delete existing strings.
27 @style{wxEL_NO_REORDER}
28 Does not allow the user to reorder the strings.
29 @style{wxEL_DEFAULT_STYLE}
30 Default style: wxEL_ALLOW_NEW|wxEL_ALLOW_EDIT|wxEL_ALLOW_DELETE.
33 The control uses a wxListCtrl internally and emit its events.
38 @see wxListBox, wxListCtrl
40 class wxEditableListBox
: public wxPanel
49 Constructor, creating and showing a list box.
52 Parent window. Must not be @NULL.
54 Window identifier. The value wxID_ANY indicates a default value.
56 The text shown just before the list control.
59 If ::wxDefaultPosition is specified then a default position is chosen.
62 If ::wxDefaultSize is specified then the window is sized appropriately.
64 Window style. See wxEditableListBox.
70 wxEditableListBox(wxWindow
* parent
, wxWindowID id
,
71 const wxString
& label
,
72 const wxPoint
& pos
= wxDefaultPosition
,
73 const wxSize
& size
= wxDefaultSize
,
74 long style
= wxEL_DEFAULT_STYLE
,
75 const wxString
& name
= wxEditableListBoxNameStr
);
78 Destructor, destroying the list box.
80 virtual ~wxEditableListBox();
83 Creates the editable listbox for two-step construction.
84 See wxEditableListBox() for further details.
86 bool Create(wxWindow
* parent
, wxWindowID id
, const wxString
& label
,
87 const wxPoint
& pos
= wxDefaultPosition
,
88 const wxSize
& size
= wxDefaultSize
,
89 long style
= wxEL_DEFAULT_STYLE
,
90 const wxString
& name
= wxEditableListBoxNameStr
);
93 Replaces current contents with given strings.
95 void SetStrings(const wxArrayString
& strings
);
99 Returns in the given array the current contents of the control
100 (the array will be erased before control's contents are appended).
102 void GetStrings(wxArrayString
& strings
) const;