]>
git.saurik.com Git - wxWidgets.git/blob - interface/wx/editlbox.h
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: interface of wxEditableListBox
4 // Author: wxWidgets team
6 // Licence: wxWindows licence
7 /////////////////////////////////////////////////////////////////////////////
9 #define wxEL_ALLOW_NEW 0x0100
10 #define wxEL_ALLOW_EDIT 0x0200
11 #define wxEL_ALLOW_DELETE 0x0400
12 #define wxEL_NO_REORDER 0x0800
13 #define wxEL_DEFAULT_STYLE (wxEL_ALLOW_NEW | wxEL_ALLOW_EDIT | wxEL_ALLOW_DELETE)
16 @class wxEditableListBox
18 An editable listbox is composite control that lets the user easily enter,
19 delete and reorder a list of strings.
22 @style{wxEL_ALLOW_NEW}
23 Allows the user to enter new strings.
24 @style{wxEL_ALLOW_EDIT}
25 Allows the user to edit existing strings.
26 @style{wxEL_ALLOW_DELETE}
27 Allows the user to delete existing strings.
28 @style{wxEL_NO_REORDER}
29 Does not allow the user to reorder the strings.
30 @style{wxEL_DEFAULT_STYLE}
31 Default style: wxEL_ALLOW_NEW|wxEL_ALLOW_EDIT|wxEL_ALLOW_DELETE.
34 The control uses a wxListCtrl internally and emit its events.
39 @see wxListBox, wxListCtrl
41 class wxEditableListBox
: public wxPanel
50 Constructor, creating and showing a list box.
53 Parent window. Must not be @NULL.
55 Window identifier. The value wxID_ANY indicates a default value.
57 The text shown just before the list control.
60 If ::wxDefaultPosition is specified then a default position is chosen.
63 If ::wxDefaultSize is specified then the window is sized appropriately.
65 Window style. See wxEditableListBox.
71 wxEditableListBox(wxWindow
* parent
, wxWindowID id
,
72 const wxString
& label
,
73 const wxPoint
& pos
= wxDefaultPosition
,
74 const wxSize
& size
= wxDefaultSize
,
75 long style
= wxEL_DEFAULT_STYLE
,
76 const wxString
& name
= wxEditableListBoxNameStr
);
79 Destructor, destroying the list box.
81 virtual ~wxEditableListBox();
84 Creates the editable listbox for two-step construction.
85 See wxEditableListBox() for further details.
87 bool Create(wxWindow
* parent
, wxWindowID id
, const wxString
& label
,
88 const wxPoint
& pos
= wxDefaultPosition
,
89 const wxSize
& size
= wxDefaultSize
,
90 long style
= wxEL_DEFAULT_STYLE
,
91 const wxString
& name
= wxEditableListBoxNameStr
);
94 Replaces current contents with given strings.
96 void SetStrings(const wxArrayString
& strings
);
100 Returns in the given array the current contents of the control
101 (the array will be erased before control's contents are appended).
103 void GetStrings(wxArrayString
& strings
) const;