]> git.saurik.com Git - wxWidgets.git/blob - contrib/include/wx/gizmos/editlbox.h
added encodings handling to XRC, so that it is possible to load resources that don...
[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 #ifdef GIZMOISDLL
21 #define GIZMODLLEXPORT WXDLLEXPORT
22 #else
23 #define GIZMODLLEXPORT
24 #endif
25
26
27 class WXDLLEXPORT wxBitmapButton;
28 class WXDLLEXPORT wxListCtrl;
29 class WXDLLEXPORT wxListEvent;
30
31 // This class provides a composite control that lets the
32 // user easily enter list of strings
33
34 class GIZMODLLEXPORT wxEditableListBox : public wxPanel
35 {
36 DECLARE_CLASS(wxEditableListBox);
37
38 public:
39 wxEditableListBox(wxWindow *parent, wxWindowID id,
40 const wxString& label,
41 const wxPoint& pos = wxDefaultPosition,
42 const wxSize& size = wxDefaultSize,
43 const wxString& name = wxT("editableListBox"));
44
45 void SetStrings(const wxArrayString& strings);
46 void GetStrings(wxArrayString& strings);
47
48 protected:
49 wxBitmapButton *m_bDel, *m_bNew, *m_bUp, *m_bDown, *m_bEdit;
50 wxListCtrl *m_listCtrl;
51 int m_selection;
52 bool m_edittingNew;
53
54 void OnItemSelected(wxListEvent& event);
55 void OnEndLabelEdit(wxListEvent& event);
56 void OnNewItem(wxCommandEvent& event);
57 void OnDelItem(wxCommandEvent& event);
58 void OnEditItem(wxCommandEvent& event);
59 void OnUpItem(wxCommandEvent& event);
60 void OnDownItem(wxCommandEvent& event);
61
62 DECLARE_EVENT_TABLE()
63 };
64
65 #endif