From 336a6aba60f239bfc33650ffe97702494940a4f6 Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Tue, 13 Apr 2004 05:28:25 +0000 Subject: [PATCH] switching to native focus and control hit handling git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26733 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/mac/carbon/button.h | 2 +- include/wx/mac/carbon/checkbox.h | 2 +- include/wx/mac/carbon/choice.h | 2 +- include/wx/mac/carbon/combobox.h | 2 +- include/wx/mac/carbon/listbox.h | 2 -- include/wx/mac/carbon/notebook.h | 3 +-- include/wx/mac/carbon/radiobut.h | 2 +- include/wx/mac/carbon/scrolbar.h | 4 ++-- include/wx/mac/carbon/slider.h | 1 + include/wx/mac/carbon/spinbutt.h | 2 +- include/wx/mac/carbon/tglbtn.h | 2 +- include/wx/mac/carbon/toolbar.h | 1 - include/wx/mac/carbon/window.h | 1 + 13 files changed, 12 insertions(+), 14 deletions(-) diff --git a/include/wx/mac/carbon/button.h b/include/wx/mac/carbon/button.h index 23e9044f00..713b93da96 100644 --- a/include/wx/mac/carbon/button.h +++ b/include/wx/mac/carbon/button.h @@ -42,7 +42,7 @@ class WXDLLEXPORT wxButton: public wxButtonBase const wxValidator& validator = wxDefaultValidator, const wxString& name = wxButtonNameStr); - virtual void MacHandleControlClick( WXWidget control , wxInt16 controlpart , bool mouseStillDown ) ; + virtual wxInt32 MacControlHit( WXEVENTHANDLERREF handler , WXEVENTREF event ) ; static wxSize GetDefaultSize(); virtual void SetDefault(); diff --git a/include/wx/mac/carbon/checkbox.h b/include/wx/mac/carbon/checkbox.h index a426cb734b..7dcfeb8f9b 100644 --- a/include/wx/mac/carbon/checkbox.h +++ b/include/wx/mac/carbon/checkbox.h @@ -41,7 +41,7 @@ public: void DoSet3StateValue(wxCheckBoxState val); virtual wxCheckBoxState DoGet3StateValue() const; - virtual void MacHandleControlClick( WXWidget control , wxInt16 controlpart , bool mouseStillDown ); + virtual wxInt32 MacControlHit( WXEVENTHANDLERREF handler , WXEVENTREF event ) ; virtual void Command(wxCommandEvent& event); DECLARE_DYNAMIC_CLASS(wxCheckBox) diff --git a/include/wx/mac/carbon/choice.h b/include/wx/mac/carbon/choice.h index 4c10bab315..7e9b5abcc0 100644 --- a/include/wx/mac/carbon/choice.h +++ b/include/wx/mac/carbon/choice.h @@ -86,7 +86,7 @@ public: virtual int FindString(const wxString& s) const; virtual wxString GetString(int n) const ; virtual void SetString( int , const wxString& s ) ; - void MacHandleControlClick( WXWidget control , wxInt16 controlpart , bool mouseStillDown ) ; + virtual wxInt32 MacControlHit( WXEVENTHANDLERREF handler , WXEVENTREF event ) ; protected: virtual wxSize DoGetBestSize() const ; diff --git a/include/wx/mac/carbon/combobox.h b/include/wx/mac/carbon/combobox.h index 68b3b02820..8acef5176c 100644 --- a/include/wx/mac/carbon/combobox.h +++ b/include/wx/mac/carbon/combobox.h @@ -112,7 +112,7 @@ class WXDLLEXPORT wxComboBox : public wxControl, public wxComboBoxBase virtual void SetSelection(long from, long to); virtual void SetEditable(bool editable); virtual int GetCount() const { return m_choice->GetCount() ; } - void MacHandleControlClick( WXWidget control , wxInt16 controlpart , bool mouseStillDown ) ; + wxInt32 MacControlHit( WXEVENTHANDLERREF handler , WXEVENTREF event ) ; wxCONTROL_ITEMCONTAINER_CLIENTDATAOBJECT_RECAST diff --git a/include/wx/mac/carbon/listbox.h b/include/wx/mac/carbon/listbox.h index a121ab7825..ecb867cdd3 100644 --- a/include/wx/mac/carbon/listbox.h +++ b/include/wx/mac/carbon/listbox.h @@ -127,8 +127,6 @@ public: // Windows callbacks - virtual void MacHandleControlClick( WXWidget control , wxInt16 controlpart , bool mouseStillDown ) ; - virtual bool MacCanFocus() const { return true ; } void OnChar(wxKeyEvent& event); void* m_macList ; diff --git a/include/wx/mac/carbon/notebook.h b/include/wx/mac/carbon/notebook.h index 7f3724805c..63356daf75 100644 --- a/include/wx/mac/carbon/notebook.h +++ b/include/wx/mac/carbon/notebook.h @@ -119,7 +119,6 @@ public: void OnSelChange(wxNotebookEvent& event); void OnSetFocus(wxFocusEvent& event); void OnNavigationKey(wxNavigationKeyEvent& event); - void OnMouse(wxMouseEvent &event); // implementation // -------------- @@ -136,7 +135,7 @@ public: protected: virtual wxSize DoGetBestSize() const ; virtual wxNotebookPage *DoRemovePage(size_t page) ; - virtual void MacHandleControlClick( WXWidget control , wxInt16 controlpart , bool mouseStillDown ) ; + virtual wxInt32 MacControlHit( WXEVENTHANDLERREF handler , WXEVENTREF event ) ; // common part of all ctors void Init(); diff --git a/include/wx/mac/carbon/radiobut.h b/include/wx/mac/carbon/radiobut.h index 22fe9c1bda..c0732eb32f 100644 --- a/include/wx/mac/carbon/radiobut.h +++ b/include/wx/mac/carbon/radiobut.h @@ -44,7 +44,7 @@ public: // implementation - virtual void MacHandleControlClick( WXWidget control , wxInt16 controlpart , bool mouseStillDown ); + virtual wxInt32 MacControlHit( WXEVENTHANDLERREF handler , WXEVENTREF event ) ; void Command(wxCommandEvent& event); wxRadioButton *AddInCycle(wxRadioButton *cycle); inline wxRadioButton *NextInCycle() {return m_cycle;} diff --git a/include/wx/mac/carbon/scrolbar.h b/include/wx/mac/carbon/scrolbar.h index 633b615ced..728049089a 100644 --- a/include/wx/mac/carbon/scrolbar.h +++ b/include/wx/mac/carbon/scrolbar.h @@ -57,8 +57,8 @@ public: bool refresh = TRUE); void Command(wxCommandEvent& event); - virtual void MacHandleControlClick( WXWidget control , wxInt16 controlpart , bool mouseStillDown ) ; - + virtual void MacHandleControlClick( WXWidget control , wxInt16 controlpart , bool mouseStillDown ) ; + virtual wxInt32 MacControlHit( WXEVENTHANDLERREF handler , WXEVENTREF mevent ) ; protected: int m_pageSize; int m_viewSize; diff --git a/include/wx/mac/carbon/slider.h b/include/wx/mac/carbon/slider.h index ec96420817..b0f65bd36b 100644 --- a/include/wx/mac/carbon/slider.h +++ b/include/wx/mac/carbon/slider.h @@ -90,6 +90,7 @@ public: virtual void DoMoveWindow(int x, int y, int w, int h); void Command(wxCommandEvent& event); + virtual wxInt32 MacControlHit( WXEVENTHANDLERREF handler , WXEVENTREF event ) ; void MacHandleControlClick( WXWidget control , wxInt16 controlpart , bool mouseStillDown ) ; wxStaticText* m_macMinimumStatic ; diff --git a/include/wx/mac/carbon/spinbutt.h b/include/wx/mac/carbon/spinbutt.h index 3b33a8d5ad..8c9295a5d2 100644 --- a/include/wx/mac/carbon/spinbutt.h +++ b/include/wx/mac/carbon/spinbutt.h @@ -64,7 +64,7 @@ public: // implementation - virtual void MacHandleControlClick( WXWidget control , wxInt16 controlpart , bool mouseStillDown ) ; + virtual wxInt32 MacControlHit( WXEVENTHANDLERREF handler , WXEVENTREF event ) ; protected: void MacHandleValueChanged( int inc ) ; diff --git a/include/wx/mac/carbon/tglbtn.h b/include/wx/mac/carbon/tglbtn.h index 5ab29aa84c..9b2a592e77 100644 --- a/include/wx/mac/carbon/tglbtn.h +++ b/include/wx/mac/carbon/tglbtn.h @@ -44,7 +44,7 @@ public: virtual void SetValue(bool value); virtual bool GetValue() const ; - virtual void MacHandleControlClick( WXWidget control , wxInt16 controlpart , bool mouseStillDown ) ; + virtual wxInt32 MacControlHit( WXEVENTHANDLERREF handler , WXEVENTREF event ) ; virtual void Command(wxCommandEvent& event); diff --git a/include/wx/mac/carbon/toolbar.h b/include/wx/mac/carbon/toolbar.h index 1849125750..1aab6d801d 100644 --- a/include/wx/mac/carbon/toolbar.h +++ b/include/wx/mac/carbon/toolbar.h @@ -60,7 +60,6 @@ class WXDLLEXPORT wxToolBar: public wxToolBarBase // Add all the buttons - virtual void MacHandleControlClick( WXWidget control , wxInt16 controlpart , bool mouseStillDown ) ; virtual wxString MacGetToolTipString( wxPoint &where ) ; void OnPaint(wxPaintEvent& event) ; void OnMouse(wxMouseEvent& event) ; diff --git a/include/wx/mac/carbon/window.h b/include/wx/mac/carbon/window.h index 2d2258c7e2..1b3dda5503 100644 --- a/include/wx/mac/carbon/window.h +++ b/include/wx/mac/carbon/window.h @@ -185,6 +185,7 @@ public: virtual void MacVisibilityChanged() ; virtual void MacEnabledStateChanged() ; virtual void MacHiliteChanged() ; + virtual wxInt32 MacControlHit( WXEVENTHANDLERREF handler , WXEVENTREF event ) ; bool MacIsReallyShown() ; bool MacIsReallyEnabled() ; -- 2.45.2