]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/os2/combobox.h
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxComboBox class
4 // Author: David Webster
8 // Copyright: (c) David Webster
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 #ifndef _WX_COMBOBOX_H_
13 #define _WX_COMBOBOX_H_
15 #include "wx/choice.h"
19 WXDLLEXPORT_DATA(extern const char*) wxComboBoxNameStr
;
20 WXDLLEXPORT_DATA(extern const char*) wxEmptyString
;
23 class WXDLLEXPORT wxComboBox
: public wxChoice
25 DECLARE_DYNAMIC_CLASS(wxComboBox
)
28 inline wxComboBox() {}
30 inline wxComboBox(wxWindow
*parent
, wxWindowID id
,
31 const wxString
& value
= wxEmptyString
,
32 const wxPoint
& pos
= wxDefaultPosition
,
33 const wxSize
& size
= wxDefaultSize
,
34 int n
= 0, const wxString choices
[] = NULL
,
37 const wxValidator
& validator
= wxDefaultValidator
,
39 const wxString
& name
= wxComboBoxNameStr
)
41 Create(parent
, id
, value
, pos
, size
, n
, choices
, style
, validator
, name
);
44 bool Create(wxWindow
*parent
, wxWindowID id
,
45 const wxString
& value
= wxEmptyString
,
46 const wxPoint
& pos
= wxDefaultPosition
,
47 const wxSize
& size
= wxDefaultSize
,
48 int n
= 0, const wxString choices
[] = NULL
,
51 const wxValidator
& validator
= wxDefaultValidator
,
53 const wxString
& name
= wxComboBoxNameStr
);
55 // List functions: see wxChoice
57 wxString
GetValue() const { return GetLabel(); }
58 virtual void SetValue(const wxString
& value
);
60 // Clipboard operations
64 virtual void SetInsertionPoint(long pos
);
65 virtual void SetInsertionPointEnd();
66 virtual long GetInsertionPoint() const;
67 virtual long GetLastPosition() const;
68 virtual void Replace(long from
, long to
, const wxString
& value
);
69 virtual void Remove(long from
, long to
);
70 virtual void SetSelection(int n
) { wxChoice::SetSelection(n
); }
71 virtual void SetSelection(long from
, long to
);
72 virtual void SetEditable(bool editable
);
74 virtual bool OS2Command(WXUINT param
, WXWORD id
);
77 virtual void DoSetSize(int x
, int y
,
78 int width
, int height
,
79 int sizeFlags
= wxSIZE_AUTO
);
82 #endif // wxUSE_COMBOBOX