From: Stefan Csomor Date: Thu, 9 Feb 2006 15:45:46 +0000 (+0000) Subject: full keyboard access support X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/7f10ed6e65f6281b8d587a6382f198c8a394db97 full keyboard access support git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@37424 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/mac/carbon/combobox.cpp b/src/mac/carbon/combobox.cpp index 71a386b3da..a1fbf3c01f 100644 --- a/src/mac/carbon/combobox.cpp +++ b/src/mac/carbon/combobox.cpp @@ -16,10 +16,17 @@ #include "wx/combobox.h" #include "wx/button.h" #include "wx/menu.h" +#include "wx/containr.h" #include "wx/mac/uma.h" IMPLEMENT_DYNAMIC_CLASS(wxComboBox, wxControl) +WX_DELEGATE_TO_CONTROL_CONTAINER(wxComboBox) + +BEGIN_EVENT_TABLE(wxComboBox, wxControl) + WX_EVENT_TABLE_CONTROL_CONTAINER(wxComboBox) +END_EVENT_TABLE() + static int nextPopUpMenuId = 1000 ; @@ -219,6 +226,11 @@ BEGIN_EVENT_TABLE(wxComboBoxChoice, wxChoice) EVT_CHOICE(-1, wxComboBoxChoice::OnChoice) END_EVENT_TABLE() +wxComboBox::wxComboBox() +{ + m_container.SetContainerWindow(this); +} + wxComboBox::~wxComboBox() { // delete client objects @@ -313,12 +325,6 @@ bool wxComboBox::Show(bool show) return true; } -void wxComboBox::SetFocus() -{ - if ( m_text != NULL) - m_text->SetFocus(); -} - void wxComboBox::DelegateTextChanged( const wxString& value ) { SetStringSelection( value ); diff --git a/src/mac/carbon/spinctrl.cpp b/src/mac/carbon/spinctrl.cpp index 14d61671ca..908ad7a0b5 100644 --- a/src/mac/carbon/spinctrl.cpp +++ b/src/mac/carbon/spinctrl.cpp @@ -15,7 +15,7 @@ #include "wx/spinbutt.h" #include "wx/spinctrl.h" #include "wx/textctrl.h" - +#include "wx/containr.h" // ---------------------------------------------------------------------------- // constants @@ -138,6 +138,13 @@ END_EVENT_TABLE() IMPLEMENT_DYNAMIC_CLASS(wxSpinCtrl, wxControl) +BEGIN_EVENT_TABLE(wxSpinCtrl, wxControl) + WX_EVENT_TABLE_CONTROL_CONTAINER(wxSpinCtrl) +END_EVENT_TABLE() + +WX_DELEGATE_TO_CONTROL_CONTAINER(wxSpinCtrl) + + // ============================================================================ // implementation // ============================================================================ @@ -150,6 +157,7 @@ void wxSpinCtrl::Init() { m_text = NULL; m_btn = NULL; + m_container.SetContainerWindow(this); } bool wxSpinCtrl::Create(wxWindow *parent, @@ -273,13 +281,6 @@ bool wxSpinCtrl::Show(bool show) return TRUE; } -void wxSpinCtrl::SetFocus() -{ - if ( m_text != NULL) { - m_text->SetFocus(); - } -} - // ---------------------------------------------------------------------------- // value and range access // ----------------------------------------------------------------------------