00b2a5df95
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@10026 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
60 lines
1.6 KiB
C++
60 lines
1.6 KiB
C++
/////////////////////////////////////////////////////////////////////////////
|
|
// Name: editlbox.h
|
|
// Purpose: ListBox with editable items
|
|
// Author: Vaclav Slavik
|
|
// RCS-ID: $Id$
|
|
// Copyright: (c) Vaclav Slavik
|
|
// Licence: wxWindows licence
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
#ifndef __WX_EDITLBOX_H__
|
|
#define __WX_EDITLBOX_H__
|
|
|
|
#ifdef __GNUG__
|
|
#pragma interface "editlbox.h"
|
|
#endif
|
|
|
|
#include "wx/panel.h"
|
|
|
|
|
|
class WXDLLEXPORT wxBitmapButton;
|
|
class WXDLLEXPORT wxListCtrl;
|
|
class WXDLLEXPORT wxListEvent;
|
|
|
|
// This class provides a composite control that lets the
|
|
// user easily enter list of strings
|
|
|
|
class WXDLLEXPORT wxEditableListBox : public wxPanel
|
|
{
|
|
DECLARE_CLASS(wxEditableListBox);
|
|
|
|
public:
|
|
wxEditableListBox(wxWindow *parent, wxWindowID id,
|
|
const wxString& label,
|
|
const wxPoint& pos = wxDefaultPosition,
|
|
const wxSize& size = wxDefaultSize,
|
|
const wxString& name = wxT("editableListBox"));
|
|
|
|
void SetStrings(const wxArrayString& strings);
|
|
void GetStrings(wxArrayString& strings);
|
|
|
|
protected:
|
|
wxBitmapButton *m_bDel, *m_bNew, *m_bUp, *m_bDown, *m_bEdit;
|
|
wxListCtrl *m_listCtrl;
|
|
int m_selection;
|
|
bool m_edittingNew;
|
|
|
|
void OnItemSelected(wxListEvent& event);
|
|
void OnEndLabelEdit(wxListEvent& event);
|
|
void OnNewItem(wxCommandEvent& event);
|
|
void OnDelItem(wxCommandEvent& event);
|
|
void OnEditItem(wxCommandEvent& event);
|
|
void OnUpItem(wxCommandEvent& event);
|
|
void OnDownItem(wxCommandEvent& event);
|
|
|
|
DECLARE_EVENT_TABLE()
|
|
};
|
|
|
|
#endif
|