Replace wxControlContainer-related macros with wxNavigationEnabled<>.

Simply inherit classes which need to provide TAB navigation among their
children from wxNavigationEnabled<> and remove the now unnecessary
WX_DECLARE_CONTROL_CONTAINER() macros.

Also remove WX_INIT_CONTROL_CONTAINER(), WX_DELEGATE_TO_CONTROL_CONTAINER()
and WX_EVENT_TABLE_CONTROL_CONTAINER() which are not needed neither any more.

And remove the event tables which became empty after removing the last macro.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68366 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2011-07-24 22:19:33 +00:00
parent 7e0a200b08
commit 9023040798
17 changed files with 31 additions and 122 deletions

View File

@@ -25,7 +25,13 @@ class wxComboBoxChoice;
class wxComboWidgetImpl;
// Combobox item
class WXDLLIMPEXP_CORE wxComboBox : public wxControl, public wxComboBoxBase
class WXDLLIMPEXP_CORE wxComboBox :
#if wxOSX_USE_CARBON
public wxNavigationEnabled<wxControl>,
#else
public wxControl,
#endif
public wxComboBoxBase
{
DECLARE_DYNAMIC_CLASS(wxComboBox)
@@ -42,7 +48,7 @@ class WXDLLIMPEXP_CORE wxComboBox : public wxControl, public wxComboBoxBase
virtual void DelegateTextChanged( const wxString& value );
virtual void DelegateChoice( const wxString& value );
wxComboBox() { Init(); }
wxComboBox() { }
wxComboBox(wxWindow *parent, wxWindowID id,
const wxString& value = wxEmptyString,
@@ -53,7 +59,6 @@ class WXDLLIMPEXP_CORE wxComboBox : public wxControl, public wxComboBoxBase
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxComboBoxNameStr)
{
Init();
Create(parent, id, value, pos, size, n, choices, style, validator, name);
}
@@ -66,7 +71,6 @@ class WXDLLIMPEXP_CORE wxComboBox : public wxControl, public wxComboBoxBase
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxComboBoxNameStr)
{
Init();
Create(parent, id, value, pos, size, choices, style, validator, name);
}
@@ -142,17 +146,12 @@ class WXDLLIMPEXP_CORE wxComboBox : public wxControl, public wxComboBoxBase
#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();
@@ -187,10 +186,6 @@ protected:
wxComboBoxChoice* m_choice;
wxComboBoxDataArray m_datas;
#if wxOSX_USE_CARBON
DECLARE_EVENT_TABLE()
#endif
};
#endif // _WX_COMBOBOX_H_