]> git.saurik.com Git - wxWidgets.git/blob - contrib/include/wx/gizmos/editlbox.h
changed version number
[wxWidgets.git] / contrib / include / wx / gizmos / editlbox.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: editlbox.h
3 // Purpose: ListBox with editable items
4 // Author: Vaclav Slavik
5 // RCS-ID: $Id$
6 // Copyright: (c) Vaclav Slavik
7 // Licence: wxWindows licence
8 /////////////////////////////////////////////////////////////////////////////
9
10
11 #ifndef __WX_EDITLBOX_H__
12 #define __WX_EDITLBOX_H__
13
14 #ifdef __GNUG__
15 #pragma interface "editlbox.h"
16 #endif
17
18 #include "wx/panel.h"
19
20
21 class WXDLLEXPORT wxBitmapButton;
22 class WXDLLEXPORT wxListCtrl;
23 class WXDLLEXPORT wxListEvent;
24
25 // This class provides a composite control that lets the
26 // user easily enter list of strings
27
28 class WXDLLEXPORT wxEditableListBox : public wxPanel
29 {
30 DECLARE_CLASS(wxEditableListBox);
31
32 public:
33 wxEditableListBox(wxWindow *parent, wxWindowID id,
34 const wxString& label,
35 const wxPoint& pos = wxDefaultPosition,
36 const wxSize& size = wxDefaultSize,
37 const wxString& name = wxT("editableListBox"));
38
39 void SetStrings(const wxArrayString& strings);
40 void GetStrings(wxArrayString& strings);
41
42 protected:
43 wxBitmapButton *m_bDel, *m_bNew, *m_bUp, *m_bDown, *m_bEdit;
44 wxListCtrl *m_listCtrl;
45 int m_selection;
46 bool m_edittingNew;
47
48 void OnItemSelected(wxListEvent& event);
49 void OnEndLabelEdit(wxListEvent& event);
50 void OnNewItem(wxCommandEvent& event);
51 void OnDelItem(wxCommandEvent& event);
52 void OnEditItem(wxCommandEvent& event);
53 void OnUpItem(wxCommandEvent& event);
54 void OnDownItem(wxCommandEvent& event);
55
56 DECLARE_EVENT_TABLE()
57 };
58
59 #endif