1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/os2/combobox.h
3 // Purpose: wxComboBox class
4 // Author: David Webster
7 // Copyright: (c) David Webster
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
11 #ifndef _WX_COMBOBOX_H_
12 #define _WX_COMBOBOX_H_
14 #include "wx/choice.h"
15 #include "wx/textentry.h"
20 class WXDLLIMPEXP_CORE wxComboBox
: public wxChoice
,
25 inline wxComboBox() {}
27 inline wxComboBox( wxWindow
* pParent
29 ,const wxString
& rsValue
= wxEmptyString
30 ,const wxPoint
& rPos
= wxDefaultPosition
31 ,const wxSize
& rSize
= wxDefaultSize
33 ,const wxString asChoices
[] = NULL
35 ,const wxValidator
& rValidator
= wxDefaultValidator
36 ,const wxString
& rsName
= wxComboBoxNameStr
52 inline wxComboBox( wxWindow
* pParent
54 ,const wxString
& rsValue
57 ,const wxArrayString
& asChoices
59 ,const wxValidator
& rValidator
= wxDefaultValidator
60 ,const wxString
& rsName
= wxComboBoxNameStr
75 bool Create( wxWindow
* pParent
77 ,const wxString
& rsValue
= wxEmptyString
78 ,const wxPoint
& rPos
= wxDefaultPosition
79 ,const wxSize
& rSize
= wxDefaultSize
81 ,const wxString asChoices
[] = NULL
83 ,const wxValidator
& rValidator
= wxDefaultValidator
84 ,const wxString
& rsName
= wxComboBoxNameStr
87 bool Create( wxWindow
* pParent
89 ,const wxString
& rsValue
92 ,const wxArrayString
& asChoices
94 ,const wxValidator
& rValidator
= wxDefaultValidator
95 ,const wxString
& rsName
= wxComboBoxNameStr
98 // See wxComboBoxBase discussion of IsEmpty().
99 bool IsListEmpty() const { return wxItemContainer::IsEmpty(); }
100 bool IsTextEmpty() const { return wxTextEntry::IsEmpty(); }
102 // resolve ambiguities among virtual functions inherited from both base
104 virtual void Clear();
105 virtual wxString
GetValue() const;
106 virtual void SetValue(const wxString
& value
);
107 virtual wxString
GetStringSelection() const
108 { return wxChoice::GetStringSelection(); }
110 inline virtual void SetSelection(int n
) { wxChoice::SetSelection(n
); }
111 virtual void SetSelection(long from
, long to
)
112 { wxTextEntry::SetSelection(from
, to
); }
113 virtual int GetSelection() const { return wxChoice::GetSelection(); }
114 virtual void GetSelection(long *from
, long *to
) const
115 { wxTextEntry::GetSelection(from
, to
); }
117 virtual bool IsEditable() const;
119 virtual bool OS2Command( WXUINT uParam
122 bool ProcessEditMsg( WXUINT uMsg
128 // implement wxTextEntry pure virtual methods
129 virtual wxWindow
*GetEditableWindow() { return this; }
130 virtual WXHWND
GetEditHWND() const { return m_hWnd
; }
132 DECLARE_DYNAMIC_CLASS(wxComboBox
)
133 }; // end of CLASS wxComboBox
135 #endif // wxUSE_COMBOBOX