1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/os2/combobox.h
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"
16 #include "wx/textentry.h"
21 class WXDLLIMPEXP_CORE wxComboBox
: public wxChoice
,
26 inline wxComboBox() {}
28 inline wxComboBox( wxWindow
* pParent
30 ,const wxString
& rsValue
= wxEmptyString
31 ,const wxPoint
& rPos
= wxDefaultPosition
32 ,const wxSize
& rSize
= wxDefaultSize
34 ,const wxString asChoices
[] = NULL
36 ,const wxValidator
& rValidator
= wxDefaultValidator
37 ,const wxString
& rsName
= wxComboBoxNameStr
53 inline wxComboBox( wxWindow
* pParent
55 ,const wxString
& rsValue
58 ,const wxArrayString
& asChoices
60 ,const wxValidator
& rValidator
= wxDefaultValidator
61 ,const wxString
& rsName
= wxComboBoxNameStr
76 bool Create( wxWindow
* pParent
78 ,const wxString
& rsValue
= wxEmptyString
79 ,const wxPoint
& rPos
= wxDefaultPosition
80 ,const wxSize
& rSize
= wxDefaultSize
82 ,const wxString asChoices
[] = NULL
84 ,const wxValidator
& rValidator
= wxDefaultValidator
85 ,const wxString
& rsName
= wxComboBoxNameStr
88 bool Create( wxWindow
* pParent
90 ,const wxString
& rsValue
93 ,const wxArrayString
& asChoices
95 ,const wxValidator
& rValidator
= wxDefaultValidator
96 ,const wxString
& rsName
= wxComboBoxNameStr
99 // See wxComboBoxBase discussion of IsEmpty().
100 bool IsListEmpty() const { return wxItemContainer::IsEmpty(); }
101 bool IsTextEmpty() const { return wxTextEntry::IsEmpty(); }
103 // resolve ambiguities among virtual functions inherited from both base
105 virtual void Clear();
106 virtual wxString
GetValue() const;
107 virtual void SetValue(const wxString
& value
);
108 virtual wxString
GetStringSelection() const
109 { return wxChoice::GetStringSelection(); }
111 inline virtual void SetSelection(int n
) { wxChoice::SetSelection(n
); }
112 virtual void SetSelection(long from
, long to
)
113 { wxTextEntry::SetSelection(from
, to
); }
114 virtual int GetSelection() const { return wxChoice::GetSelection(); }
115 virtual void GetSelection(long *from
, long *to
) const
116 { wxTextEntry::GetSelection(from
, to
); }
118 virtual bool IsEditable() const;
120 virtual bool OS2Command( WXUINT uParam
123 bool ProcessEditMsg( WXUINT uMsg
129 // implement wxTextEntry pure virtual methods
130 virtual wxWindow
*GetEditableWindow() { return this; }
131 virtual WXHWND
GetEditHWND() const { return m_hWnd
; }
133 DECLARE_DYNAMIC_CLASS(wxComboBox
)
134 }; // end of CLASS wxComboBox
136 #endif // wxUSE_COMBOBOX