#include "wx/choice.h"
#include "wx/textctrl.h"
-WXDLLIMPEXP_DATA_CORE(extern const char) wxComboBoxNameStr[];
-
WX_DEFINE_ARRAY( char * , wxComboBoxDataArray ) ;
// forward declaration of private implementation classes
class wxComboWidgetImpl;
// Combobox item
-class WXDLLIMPEXP_CORE wxComboBox : public wxControl, public wxComboBoxBase
+class WXDLLIMPEXP_CORE wxComboBox :
+ public wxWindowWithItems<
+#if wxOSX_USE_CARBON
+ wxNavigationEnabled<wxControl>,
+#else
+ wxControl,
+#endif
+ wxComboBoxBase>
{
DECLARE_DYNAMIC_CLASS(wxComboBox)
virtual void DelegateTextChanged( const wxString& value );
virtual void DelegateChoice( const wxString& value );
- wxComboBox() { Init(); }
+ wxComboBox() { }
wxComboBox(wxWindow *parent, wxWindowID id,
const wxString& value = wxEmptyString,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxComboBoxNameStr)
{
- Init();
Create(parent, id, value, pos, size, n, choices, style, validator, name);
}
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxComboBoxNameStr)
{
- Init();
Create(parent, id, value, pos, size, choices, style, validator, name);
}
virtual void SetString(unsigned int n, const wxString& s);
virtual unsigned int GetCount() const;
-
+
+ virtual void SetValue(const wxString& value);
// these methods are provided by wxTextEntry for the native impl.
#if wxOSX_USE_CARBON
// Text field functions
- virtual void SetValue(const wxString& value);
virtual wxString GetValue() const;
virtual void WriteText(const wxString& text);
virtual wxTextWidgetImpl* GetTextPeer() const;
#endif // wxOSX_USE_CARBON
+#if wxOSX_USE_COCOA
+ virtual void Popup();
+ virtual void Dismiss();
+#endif // wxOSX_USE_COCOA
// osx specific event handling common for all osx-ports
virtual bool OSXHandleClicked( double timestampsec );
-#if wxOSX_USE_CARBON
- wxCONTROL_ITEMCONTAINER_CLIENTDATAOBJECT_RECAST
-
- WX_DECLARE_CONTROL_CONTAINER();
-#endif
-
#if wxOSX_USE_COCOA
wxComboWidgetImpl* GetComboPeer() const;
#endif
protected:
- // common part of all ctors
- void Init();
-
// List functions
virtual void DoDeleteOneItem(unsigned int n);
virtual void DoClear();
wxComboBoxChoice* m_choice;
wxComboBoxDataArray m_datas;
-
-#if wxOSX_USE_CARBON
- DECLARE_EVENT_TABLE()
-#endif
};
#endif // _WX_COMBOBOX_H_