1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: ListBox with editable items
4 // Author: Vaclav Slavik
6 // Copyright: (c) Vaclav Slavik
7 // Licence: wxWindows licence
8 /////////////////////////////////////////////////////////////////////////////
11 #ifndef __WX_EDITLBOX_H__
12 #define __WX_EDITLBOX_H__
15 #pragma interface "editlbox.h"
21 #define GIZMODLLEXPORT WXDLLEXPORT
23 #define GIZMODLLEXPORT
27 class WXDLLEXPORT wxBitmapButton
;
28 class WXDLLEXPORT wxListCtrl
;
29 class WXDLLEXPORT wxListEvent
;
31 #define wxEL_ALLOW_NEW 0x0100
32 #define wxEL_ALLOW_EDIT 0x0200
33 #define wxEL_ALLOW_DELETE 0x0400
35 // This class provides a composite control that lets the
36 // user easily enter list of strings
38 class GIZMODLLEXPORT wxEditableListBox
: public wxPanel
40 DECLARE_CLASS(wxEditableListBox
);
43 wxEditableListBox(wxWindow
*parent
, wxWindowID id
,
44 const wxString
& label
,
45 const wxPoint
& pos
= wxDefaultPosition
,
46 const wxSize
& size
= wxDefaultSize
,
47 long style
= wxEL_ALLOW_NEW
| wxEL_ALLOW_EDIT
| wxEL_ALLOW_DELETE
,
48 const wxString
& name
= wxT("editableListBox"));
50 void SetStrings(const wxArrayString
& strings
);
51 void GetStrings(wxArrayString
& strings
);
54 wxBitmapButton
*m_bDel
, *m_bNew
, *m_bUp
, *m_bDown
, *m_bEdit
;
55 wxListCtrl
*m_listCtrl
;
59 void OnItemSelected(wxListEvent
& event
);
60 void OnEndLabelEdit(wxListEvent
& event
);
61 void OnNewItem(wxCommandEvent
& event
);
62 void OnDelItem(wxCommandEvent
& event
);
63 void OnEditItem(wxCommandEvent
& event
);
64 void OnUpItem(wxCommandEvent
& event
);
65 void OnDownItem(wxCommandEvent
& event
);