]> git.saurik.com Git - wxWidgets.git/blame - contrib/include/wx/gizmos/editlbox.h
Changes needed to solve wxPython's OOR problem for the wxOGL shapes.
[wxWidgets.git] / contrib / include / wx / gizmos / editlbox.h
CommitLineData
f55d21eb
VS
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
086ab766
RD
20#ifdef GIZMOISDLL
21#define GIZMODLLEXPORT WXDLLEXPORT
22#else
23#define GIZMODLLEXPORT
24#endif
25
f55d21eb
VS
26
27class WXDLLEXPORT wxBitmapButton;
28class WXDLLEXPORT wxListCtrl;
29class WXDLLEXPORT wxListEvent;
086ab766 30
f55d21eb
VS
31// This class provides a composite control that lets the
32// user easily enter list of strings
33
086ab766 34class GIZMODLLEXPORT wxEditableListBox : public wxPanel
f55d21eb
VS
35{
36 DECLARE_CLASS(wxEditableListBox);
37
38public:
39 wxEditableListBox(wxWindow *parent, wxWindowID id,
40 const wxString& label,
41 const wxPoint& pos = wxDefaultPosition,
00b2a5df
VS
42 const wxSize& size = wxDefaultSize,
43 const wxString& name = wxT("editableListBox"));
f55d21eb
VS
44
45 void SetStrings(const wxArrayString& strings);
46 void GetStrings(wxArrayString& strings);
47
48protected:
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