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 // resolve ambiguities among virtual functions inherited from both base
101 virtual void Clear();
102 virtual wxString
GetValue() const;
103 virtual void SetValue(const wxString
& value
);
104 virtual wxString
GetStringSelection() const
105 { return wxChoice::GetStringSelection(); }
107 inline virtual void SetSelection(int n
) { wxChoice::SetSelection(n
); }
108 virtual void SetSelection(long from
, long to
)
109 { wxTextEntry::SetSelection(from
, to
); }
110 virtual int GetSelection() const { return wxChoice::GetSelection(); }
111 virtual void GetSelection(long *from
, long *to
) const
112 { wxTextEntry::GetSelection(from
, to
); }
114 virtual bool IsEditable() const;
116 virtual bool OS2Command( WXUINT uParam
119 bool ProcessEditMsg( WXUINT uMsg
125 // implement wxTextEntry pure virtual methods
126 virtual wxWindow
*GetEditableWindow() { return this; }
127 virtual WXHWND
GetEditHWND() const { return m_hWnd
; }
129 DECLARE_DYNAMIC_CLASS(wxComboBox
)
130 }; // end of CLASS wxComboBox
132 #endif // wxUSE_COMBOBOX