]> git.saurik.com Git - wxWidgets.git/blame - interface/wx/editlbox.h
Consistently handle DST start time in wxDateTime::Set().
[wxWidgets.git] / interface / wx / editlbox.h
CommitLineData
23324ae1
FM
1/////////////////////////////////////////////////////////////////////////////
2// Name: editlbox.h
e54c96f1 3// Purpose: interface of wxEditableListBox
23324ae1 4// Author: wxWidgets team
526954c5 5// Licence: wxWindows licence
23324ae1
FM
6/////////////////////////////////////////////////////////////////////////////
7
d72927c1
RD
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)
13
23324ae1
FM
14/**
15 @class wxEditableListBox
7c913512 16
1f1d2182
FM
17 An editable listbox is composite control that lets the user easily enter,
18 delete and reorder a list of strings.
7c913512 19
23324ae1 20 @beginStyleTable
8c6791e4 21 @style{wxEL_ALLOW_NEW}
23324ae1 22 Allows the user to enter new strings.
8c6791e4 23 @style{wxEL_ALLOW_EDIT}
23324ae1 24 Allows the user to edit existing strings.
8c6791e4 25 @style{wxEL_ALLOW_DELETE}
23324ae1 26 Allows the user to delete existing strings.
8c6791e4 27 @style{wxEL_NO_REORDER}
23324ae1 28 Does not allow the user to reorder the strings.
8c6791e4 29 @style{wxEL_DEFAULT_STYLE}
1f1d2182 30 Default style: wxEL_ALLOW_NEW|wxEL_ALLOW_EDIT|wxEL_ALLOW_DELETE.
23324ae1 31 @endStyleTable
7c913512 32
32ace389
RR
33 The control uses a wxListCtrl internally and emit its events.
34
23324ae1 35 @library{wxadv}
1f1d2182 36 @category{ctrl}
7c913512 37
32ace389 38 @see wxListBox, wxListCtrl
23324ae1
FM
39*/
40class wxEditableListBox : public wxPanel
41{
42public:
1f1d2182
FM
43 /**
44 Default ctor.
45 */
46 wxEditableListBox();
47
23324ae1
FM
48 /**
49 Constructor, creating and showing a list box.
3c4f71cc 50
7c913512 51 @param parent
4cc4bfaf 52 Parent window. Must not be @NULL.
7c913512 53 @param id
4cc4bfaf 54 Window identifier. The value wxID_ANY indicates a default value.
7c913512 55 @param label
4cc4bfaf 56 The text shown just before the list control.
7c913512 57 @param pos
4cc4bfaf 58 Window position.
dc1b07fd 59 If ::wxDefaultPosition is specified then a default position is chosen.
7c913512 60 @param size
dc1b07fd
FM
61 Window size.
62 If ::wxDefaultSize is specified then the window is sized appropriately.
7c913512 63 @param style
4cc4bfaf 64 Window style. See wxEditableListBox.
7c913512 65 @param name
4cc4bfaf 66 Window name.
3c4f71cc 67
4cc4bfaf 68 @see Create()
23324ae1 69 */
7c913512
FM
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,
408776d0 75 const wxString& name = wxEditableListBoxNameStr);
23324ae1
FM
76
77 /**
78 Destructor, destroying the list box.
79 */
adaaa686 80 virtual ~wxEditableListBox();
23324ae1
FM
81
82 /**
1f1d2182
FM
83 Creates the editable listbox for two-step construction.
84 See wxEditableListBox() for further details.
23324ae1 85 */
43c48e1e 86 bool Create(wxWindow* parent, wxWindowID id, const wxString& label,
23324ae1
FM
87 const wxPoint& pos = wxDefaultPosition,
88 const wxSize& size = wxDefaultSize,
89 long style = wxEL_DEFAULT_STYLE,
43c48e1e 90 const wxString& name = wxEditableListBoxNameStr);
23324ae1
FM
91
92 /**
93 Replaces current contents with given strings.
94 */
95 void SetStrings(const wxArrayString& strings);
1f1d2182
FM
96
97
98 /**
99 Returns in the given array the current contents of the control
100 (the array will be erased before control's contents are appended).
101 */
f1d5aa12 102 void GetStrings(wxArrayString& strings) const;
23324ae1 103};
e54c96f1 104