2008-03-08 08:52:38 -05:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: editlbox.h
|
2008-03-10 11:24:38 -04:00
|
|
|
// Purpose: interface of wxEditableListBox
|
2008-03-08 08:52:38 -05:00
|
|
|
// Author: wxWidgets team
|
|
|
|
// RCS-ID: $Id$
|
|
|
|
// Licence: wxWindows license
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
/**
|
|
|
|
@class wxEditableListBox
|
|
|
|
@wxheader{editlbox.h}
|
2008-03-08 09:43:31 -05:00
|
|
|
|
2008-03-28 12:19:12 -04:00
|
|
|
An editable listbox is composite control that lets the user easily enter,
|
|
|
|
delete and reorder a list of strings.
|
2008-03-08 09:43:31 -05:00
|
|
|
|
2008-03-08 08:52:38 -05:00
|
|
|
@beginStyleTable
|
2008-04-06 10:43:04 -04:00
|
|
|
@style{wxEL_ALLOW_NEW}
|
2008-03-08 08:52:38 -05:00
|
|
|
Allows the user to enter new strings.
|
2008-04-06 10:43:04 -04:00
|
|
|
@style{wxEL_ALLOW_EDIT}
|
2008-03-08 08:52:38 -05:00
|
|
|
Allows the user to edit existing strings.
|
2008-04-06 10:43:04 -04:00
|
|
|
@style{wxEL_ALLOW_DELETE}
|
2008-03-08 08:52:38 -05:00
|
|
|
Allows the user to delete existing strings.
|
2008-04-06 10:43:04 -04:00
|
|
|
@style{wxEL_NO_REORDER}
|
2008-03-08 08:52:38 -05:00
|
|
|
Does not allow the user to reorder the strings.
|
2008-04-06 10:43:04 -04:00
|
|
|
@style{wxEL_DEFAULT_STYLE}
|
2008-03-28 12:19:12 -04:00
|
|
|
Default style: wxEL_ALLOW_NEW|wxEL_ALLOW_EDIT|wxEL_ALLOW_DELETE.
|
2008-03-08 08:52:38 -05:00
|
|
|
@endStyleTable
|
2008-03-08 09:43:31 -05:00
|
|
|
|
2008-03-08 08:52:38 -05:00
|
|
|
@library{wxadv}
|
2008-03-28 12:19:12 -04:00
|
|
|
@category{ctrl}
|
2008-03-08 09:43:31 -05:00
|
|
|
|
2008-03-10 11:24:38 -04:00
|
|
|
@see wxListBox
|
2008-03-08 08:52:38 -05:00
|
|
|
*/
|
|
|
|
class wxEditableListBox : public wxPanel
|
|
|
|
{
|
|
|
|
public:
|
2008-03-28 12:19:12 -04:00
|
|
|
/**
|
|
|
|
Default ctor.
|
|
|
|
*/
|
|
|
|
wxEditableListBox();
|
|
|
|
|
2008-03-08 08:52:38 -05:00
|
|
|
/**
|
|
|
|
Constructor, creating and showing a list box.
|
2008-03-20 09:45:17 -04:00
|
|
|
|
2008-03-08 09:43:31 -05:00
|
|
|
@param parent
|
2008-03-09 08:33:59 -04:00
|
|
|
Parent window. Must not be @NULL.
|
2008-03-08 09:43:31 -05:00
|
|
|
@param id
|
2008-03-09 08:33:59 -04:00
|
|
|
Window identifier. The value wxID_ANY indicates a default value.
|
2008-03-08 09:43:31 -05:00
|
|
|
@param label
|
2008-03-09 08:33:59 -04:00
|
|
|
The text shown just before the list control.
|
2008-03-08 09:43:31 -05:00
|
|
|
@param pos
|
2008-03-09 08:33:59 -04:00
|
|
|
Window position.
|
2008-03-08 09:43:31 -05:00
|
|
|
@param size
|
2008-03-28 12:19:12 -04:00
|
|
|
Window size. If wxDefaultSize is specified then the window is sized
|
2008-03-09 08:33:59 -04:00
|
|
|
appropriately.
|
2008-03-08 09:43:31 -05:00
|
|
|
@param style
|
2008-03-09 08:33:59 -04:00
|
|
|
Window style. See wxEditableListBox.
|
2008-03-08 09:43:31 -05:00
|
|
|
@param name
|
2008-03-09 08:33:59 -04:00
|
|
|
Window name.
|
2008-03-20 09:45:17 -04:00
|
|
|
|
2008-03-09 08:33:59 -04:00
|
|
|
@see Create()
|
2008-03-08 08:52:38 -05:00
|
|
|
*/
|
2008-03-08 09:43:31 -05:00
|
|
|
wxEditableListBox(wxWindow* parent, wxWindowID id,
|
|
|
|
const wxString& label,
|
|
|
|
const wxPoint& pos = wxDefaultPosition,
|
|
|
|
const wxSize& size = wxDefaultSize,
|
|
|
|
long style = wxEL_DEFAULT_STYLE,
|
|
|
|
const wxString& name = "editableListBox");
|
2008-03-08 08:52:38 -05:00
|
|
|
|
|
|
|
/**
|
|
|
|
Destructor, destroying the list box.
|
|
|
|
*/
|
|
|
|
~wxEditableListBox();
|
|
|
|
|
|
|
|
/**
|
2008-03-28 12:19:12 -04:00
|
|
|
Creates the editable listbox for two-step construction.
|
|
|
|
See wxEditableListBox() for further details.
|
2008-03-08 08:52:38 -05:00
|
|
|
*/
|
|
|
|
bool Create(wxWindow* parent, wxWindowID id,
|
|
|
|
const wxString& label,
|
|
|
|
const wxPoint& pos = wxDefaultPosition,
|
|
|
|
const wxSize& size = wxDefaultSize,
|
|
|
|
long style = wxEL_DEFAULT_STYLE,
|
|
|
|
const wxString& name = "editableListBox");
|
|
|
|
|
|
|
|
/**
|
|
|
|
Replaces current contents with given strings.
|
|
|
|
*/
|
|
|
|
void SetStrings(const wxArrayString& strings);
|
2008-03-28 12:19:12 -04:00
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
Returns in the given array the current contents of the control
|
|
|
|
(the array will be erased before control's contents are appended).
|
|
|
|
*/
|
|
|
|
void GetSelections(wxArrayString& strings) const;
|
2008-03-08 08:52:38 -05:00
|
|
|
};
|
2008-03-10 11:24:38 -04:00
|
|
|
|