From 41c9a21f8cc72250ee4b0d5230c5f529c0ab0aab Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Wed, 19 Dec 2001 21:46:53 +0000 Subject: [PATCH] GetMacXXXX renamed MacGetXXXX git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@13108 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/mac/bmpbuttn.cpp | 2 +- src/mac/button.cpp | 2 +- src/mac/carbon/bmpbuttn.cpp | 2 +- src/mac/carbon/button.cpp | 2 +- src/mac/carbon/checkbox.cpp | 2 +- src/mac/carbon/choice.cpp | 2 +- src/mac/carbon/combobox.cpp | 2 +- src/mac/carbon/listbox.cpp | 6 +++--- src/mac/carbon/notebmac.cpp | 4 ++-- src/mac/carbon/radiobox.cpp | 2 +- src/mac/carbon/radiobut.cpp | 2 +- src/mac/carbon/scrolbar.cpp | 2 +- src/mac/carbon/slider.cpp | 4 ++-- src/mac/carbon/spinbutt.cpp | 2 +- src/mac/carbon/statbox.cpp | 2 +- src/mac/carbon/statlmac.cpp | 2 +- src/mac/carbon/tabctrl.cpp | 2 +- src/mac/carbon/textctrl.cpp | 26 +++++++++++++------------- src/mac/checkbox.cpp | 2 +- src/mac/choice.cpp | 2 +- src/mac/combobox.cpp | 2 +- src/mac/listbox.cpp | 6 +++--- src/mac/notebmac.cpp | 4 ++-- src/mac/radiobox.cpp | 2 +- src/mac/radiobut.cpp | 2 +- src/mac/scrolbar.cpp | 2 +- src/mac/slider.cpp | 4 ++-- src/mac/spinbutt.cpp | 2 +- src/mac/statbox.cpp | 2 +- src/mac/statlmac.cpp | 2 +- src/mac/tabctrl.cpp | 2 +- src/mac/textctrl.cpp | 26 +++++++++++++------------- 32 files changed, 64 insertions(+), 64 deletions(-) diff --git a/src/mac/bmpbuttn.cpp b/src/mac/bmpbuttn.cpp index c1a5949c9d..2a93999107 100644 --- a/src/mac/bmpbuttn.cpp +++ b/src/mac/bmpbuttn.cpp @@ -57,7 +57,7 @@ bool wxBitmapButton::Create(wxWindow *parent, wxWindowID id, const wxBitmap& bit MacPreControlCreate( parent , id , "" , pos , wxSize( width , height ) ,style, validator , name , &bounds , title ) ; - m_macControl = ::NewControl( parent->GetMacRootWindow() , &bounds , title , false , 0 , + m_macControl = ::NewControl( parent->MacGetRootWindow() , &bounds , title , false , 0 , kControlBehaviorOffsetContents + ( bmap->m_bitmapType == kMacBitmapTypeIcon ? kControlContentCIconHandle : kControlContentPictHandle ) , 0, (( style & wxBU_AUTODRAW ) ? kControlBevelButtonSmallBevelProc : kControlBevelButtonNormalBevelProc ), (long) this ) ; diff --git a/src/mac/button.cpp b/src/mac/button.cpp index 83cdba79e0..072ba01720 100644 --- a/src/mac/button.cpp +++ b/src/mac/button.cpp @@ -37,7 +37,7 @@ bool wxButton::Create(wxWindow *parent, wxWindowID id, const wxString& label, MacPreControlCreate( parent , id , label , pos , size ,style, validator , name , &bounds , title ) ; - m_macControl = ::NewControl( parent->GetMacRootWindow() , &bounds , title , false , 0 , 0 , 1, + m_macControl = ::NewControl( parent->MacGetRootWindow() , &bounds , title , false , 0 , 0 , 1, kControlPushButtonProc , (long) this ) ; wxASSERT_MSG( m_macControl != NULL , "No valid mac control" ) ; diff --git a/src/mac/carbon/bmpbuttn.cpp b/src/mac/carbon/bmpbuttn.cpp index c1a5949c9d..2a93999107 100644 --- a/src/mac/carbon/bmpbuttn.cpp +++ b/src/mac/carbon/bmpbuttn.cpp @@ -57,7 +57,7 @@ bool wxBitmapButton::Create(wxWindow *parent, wxWindowID id, const wxBitmap& bit MacPreControlCreate( parent , id , "" , pos , wxSize( width , height ) ,style, validator , name , &bounds , title ) ; - m_macControl = ::NewControl( parent->GetMacRootWindow() , &bounds , title , false , 0 , + m_macControl = ::NewControl( parent->MacGetRootWindow() , &bounds , title , false , 0 , kControlBehaviorOffsetContents + ( bmap->m_bitmapType == kMacBitmapTypeIcon ? kControlContentCIconHandle : kControlContentPictHandle ) , 0, (( style & wxBU_AUTODRAW ) ? kControlBevelButtonSmallBevelProc : kControlBevelButtonNormalBevelProc ), (long) this ) ; diff --git a/src/mac/carbon/button.cpp b/src/mac/carbon/button.cpp index 83cdba79e0..072ba01720 100644 --- a/src/mac/carbon/button.cpp +++ b/src/mac/carbon/button.cpp @@ -37,7 +37,7 @@ bool wxButton::Create(wxWindow *parent, wxWindowID id, const wxString& label, MacPreControlCreate( parent , id , label , pos , size ,style, validator , name , &bounds , title ) ; - m_macControl = ::NewControl( parent->GetMacRootWindow() , &bounds , title , false , 0 , 0 , 1, + m_macControl = ::NewControl( parent->MacGetRootWindow() , &bounds , title , false , 0 , 0 , 1, kControlPushButtonProc , (long) this ) ; wxASSERT_MSG( m_macControl != NULL , "No valid mac control" ) ; diff --git a/src/mac/carbon/checkbox.cpp b/src/mac/carbon/checkbox.cpp index d83a2fed05..e17deb180d 100644 --- a/src/mac/carbon/checkbox.cpp +++ b/src/mac/carbon/checkbox.cpp @@ -36,7 +36,7 @@ bool wxCheckBox::Create(wxWindow *parent, wxWindowID id, const wxString& label, MacPreControlCreate( parent , id , label , pos , size ,style, validator , name , &bounds , title ) ; - m_macControl = ::NewControl( parent->GetMacRootWindow() , &bounds , title , false , 0 , 0 , 1, + m_macControl = ::NewControl( parent->MacGetRootWindow() , &bounds , title , false , 0 , 0 , 1, kControlCheckBoxProc , (long) this ) ; MacPostControlCreate() ; diff --git a/src/mac/carbon/choice.cpp b/src/mac/carbon/choice.cpp index 9f05a58372..2ec18bc546 100644 --- a/src/mac/carbon/choice.cpp +++ b/src/mac/carbon/choice.cpp @@ -45,7 +45,7 @@ bool wxChoice::Create(wxWindow *parent, wxWindowID id, MacPreControlCreate( parent , id , "" , pos , size ,style, validator , name , &bounds , title ) ; - m_macControl = ::NewControl( parent->GetMacRootWindow() , &bounds , title , false , 0 , -12345 , 0 , + m_macControl = ::NewControl( parent->MacGetRootWindow() , &bounds , title , false , 0 , -12345 , 0 , kControlPopupButtonProc + kControlPopupFixedWidthVariant , (long) this ) ; m_macPopUpMenuHandle = NewUniqueMenu() ; diff --git a/src/mac/carbon/combobox.cpp b/src/mac/carbon/combobox.cpp index 5dabd2dd49..712a6dddbf 100644 --- a/src/mac/carbon/combobox.cpp +++ b/src/mac/carbon/combobox.cpp @@ -47,7 +47,7 @@ bool wxComboBox::Create(wxWindow *parent, wxWindowID id, MacPreControlCreate( parent , id , "" , pos , size ,style, validator , name , &bounds , title ) ; - m_macControl = ::NewControl( parent->GetMacRootWindow() , &bounds , title , false , 0 , -12345 , 0, + m_macControl = ::NewControl( parent->MacGetRootWindow() , &bounds , title , false , 0 , -12345 , 0, kControlPopupButtonProc , (long) this ) ; m_macPopUpMenuHandle = NewUniqueMenu() ; diff --git a/src/mac/carbon/listbox.cpp b/src/mac/carbon/listbox.cpp index ffbe8e7035..7cfcbc5bce 100644 --- a/src/mac/carbon/listbox.cpp +++ b/src/mac/carbon/listbox.cpp @@ -168,7 +168,7 @@ bool wxListBox::Create(wxWindow *parent, wxWindowID id, Size asize; - CreateListBoxControl( parent->GetMacRootWindow(), &bounds, false, 0, 1, false, true, + CreateListBoxControl( parent->MacGetRootWindow(), &bounds, false, 0, 1, false, true, 14, 14, false, &listDef, &m_macControl ); GetControlData(m_macControl, kControlNoPart, kControlListBoxListHandleTag, @@ -180,7 +180,7 @@ bool wxListBox::Create(wxWindow *parent, wxWindowID id, #else long result ; - m_macControl = ::NewControl( parent->GetMacRootWindow() , &bounds , title , false , + m_macControl = ::NewControl( parent->MacGetRootWindow() , &bounds , title , false , kwxMacListWithVerticalScrollbar , 0 , 0, kControlListBoxProc , (long) this ) ; ::GetControlData( m_macControl , kControlNoPart , kControlListBoxListHandleTag , @@ -588,7 +588,7 @@ void wxListBox::SetupColours() void wxListBox::Refresh(bool eraseBack, const wxRect *rect) { // Set up port - WindowRef rootwindow = GetMacRootWindow() ; + WindowRef rootwindow = MacGetRootWindow() ; wxWindow* wxrootwindow = wxFindWinFromMacWindow( rootwindow ) ; wxMacDrawingHelper focus( wxrootwindow ); diff --git a/src/mac/carbon/notebmac.cpp b/src/mac/carbon/notebmac.cpp index 88e098ac96..52f69eb69f 100644 --- a/src/mac/carbon/notebmac.cpp +++ b/src/mac/carbon/notebmac.cpp @@ -115,7 +115,7 @@ bool wxNotebook::Create(wxWindow *parent, MacPreControlCreate( parent , id , "" , pos , size ,style, wxDefaultValidator , name , &bounds , title ) ; - m_macControl = ::NewControl( parent->GetMacRootWindow() , &bounds , title , false , 0 , 0 , 1, + m_macControl = ::NewControl( parent->MacGetRootWindow() , &bounds , title , false , 0 , 0 , 1, kControlTabSmallProc , (long) this ) ; MacPostControlCreate() ; @@ -299,7 +299,7 @@ void wxNotebook::MacSetupTabs() } Rect bounds; GetControlBounds(m_macControl, &bounds); - InvalWindowRect(GetMacRootWindow(), &bounds); + InvalWindowRect(MacGetRootWindow(), &bounds); } // ---------------------------------------------------------------------------- diff --git a/src/mac/carbon/radiobox.cpp b/src/mac/carbon/radiobox.cpp index f4c7ca1509..e3d5abd2a6 100644 --- a/src/mac/carbon/radiobox.cpp +++ b/src/mac/carbon/radiobox.cpp @@ -117,7 +117,7 @@ bool wxRadioBox::Create(wxWindow *parent, wxWindowID id, const wxString& label, MacPreControlCreate( parent , id , label , pos , size ,style, val , name , &bounds , title ) ; - m_macControl = ::NewControl( parent->GetMacRootWindow() , &bounds , title , false , 0 , 0 , 1, + m_macControl = ::NewControl( parent->MacGetRootWindow() , &bounds , title , false , 0 , 0 , 1, kControlGroupBoxTextTitleProc , (long) this ) ; for (i = 0; i < n; i++) diff --git a/src/mac/carbon/radiobut.cpp b/src/mac/carbon/radiobut.cpp index 476cf9ef10..a0a8885b16 100644 --- a/src/mac/carbon/radiobut.cpp +++ b/src/mac/carbon/radiobut.cpp @@ -35,7 +35,7 @@ bool wxRadioButton::Create(wxWindow *parent, wxWindowID id, MacPreControlCreate( parent , id , label , pos , size ,style, validator , name , &bounds , title ) ; - m_macControl = ::NewControl( parent->GetMacRootWindow() , &bounds , title , false , 0 , 0 , 1, + m_macControl = ::NewControl( parent->MacGetRootWindow() , &bounds , title , false , 0 , 0 , 1, kControlRadioButtonProc , (long) this ) ; MacPostControlCreate() ; diff --git a/src/mac/carbon/scrolbar.cpp b/src/mac/carbon/scrolbar.cpp index c417484f02..51c01e4cef 100644 --- a/src/mac/carbon/scrolbar.cpp +++ b/src/mac/carbon/scrolbar.cpp @@ -43,7 +43,7 @@ bool wxScrollBar::Create(wxWindow *parent, wxWindowID id, MacPreControlCreate( parent , id , "" , pos , size ,style, validator , name , &bounds , title ) ; - m_macControl = ::NewControl( parent->GetMacRootWindow() , &bounds , title , true , 0 , 0 , 100, + m_macControl = ::NewControl( parent->MacGetRootWindow() , &bounds , title , true , 0 , 0 , 100, kControlScrollBarLiveProc , (long) this ) ; wxASSERT_MSG( m_macControl != NULL , "No valid mac control" ) ; diff --git a/src/mac/carbon/slider.cpp b/src/mac/carbon/slider.cpp index 459a15c76b..2f8854acc2 100644 --- a/src/mac/carbon/slider.cpp +++ b/src/mac/carbon/slider.cpp @@ -84,7 +84,7 @@ bool wxSlider::Create(wxWindow *parent, wxWindowID id, } - m_macControl = ::NewControl( parent->GetMacRootWindow(), &bounds, title, false, + m_macControl = ::NewControl( parent->MacGetRootWindow(), &bounds, title, false, value, minValue, maxValue, procID, (long) this); wxASSERT_MSG( m_macControl != NULL , "No valid mac control" ) ; @@ -408,7 +408,7 @@ void wxSlider::MacHandleControlClick( ControlHandle control , SInt16 controlpart // Update window at old and new positions SetRect(&newbounds, m_x, m_y, m_x + m_width, m_y + m_height); - WindowRef rootwindow = GetMacRootWindow(); + WindowRef rootwindow = MacGetRootWindow(); InvalWindowRect( rootwindow , &oldbounds ); InvalWindowRect( rootwindow , &newbounds ); diff --git a/src/mac/carbon/spinbutt.cpp b/src/mac/carbon/spinbutt.cpp index b396d675d0..87db4b041a 100644 --- a/src/mac/carbon/spinbutt.cpp +++ b/src/mac/carbon/spinbutt.cpp @@ -49,7 +49,7 @@ bool wxSpinButton::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, c MacPreControlCreate( parent , id , "" , pos , size ,style,*( (wxValidator*) NULL ) , name , &bounds , title ) ; - m_macControl = ::NewControl( parent->GetMacRootWindow() , &bounds , title , false , 0 , 0 , 100, + m_macControl = ::NewControl( parent->MacGetRootWindow() , &bounds , title , false , 0 , 0 , 100, kControlLittleArrowsProc , (long) this ) ; wxASSERT_MSG( m_macControl != NULL , "No valid mac control" ) ; diff --git a/src/mac/carbon/statbox.cpp b/src/mac/carbon/statbox.cpp index 400eb43169..1a562c12e6 100644 --- a/src/mac/carbon/statbox.cpp +++ b/src/mac/carbon/statbox.cpp @@ -43,7 +43,7 @@ bool wxStaticBox::Create(wxWindow *parent, wxWindowID id, MacPreControlCreate( parent , id , label , pos , size ,style, wxDefaultValidator , name , &bounds , title ) ; - m_macControl = ::NewControl( parent->GetMacRootWindow() , &bounds , title , false , 0 , 0 , 1, + m_macControl = ::NewControl( parent->MacGetRootWindow() , &bounds , title , false , 0 , 0 , 1, kControlGroupBoxTextTitleProc , (long) this ) ; MacPostControlCreate() ; diff --git a/src/mac/carbon/statlmac.cpp b/src/mac/carbon/statlmac.cpp index 175708d1fa..0272ed706e 100644 --- a/src/mac/carbon/statlmac.cpp +++ b/src/mac/carbon/statlmac.cpp @@ -54,7 +54,7 @@ bool wxStaticLine::Create( wxWindow *parent, MacPreControlCreate( parent , id , "" , pos , size ,style, wxDefaultValidator , name , &bounds , title ) ; - m_macControl = ::NewControl( parent->GetMacRootWindow() , &bounds , title , false , 0 , 0 , 1, + m_macControl = ::NewControl( parent->MacGetRootWindow() , &bounds , title , false , 0 , 0 , 1, kControlSeparatorLineProc , (long) this ) ; MacPostControlCreate() ; diff --git a/src/mac/carbon/tabctrl.cpp b/src/mac/carbon/tabctrl.cpp index 7bb7a464f2..9231ea3d41 100644 --- a/src/mac/carbon/tabctrl.cpp +++ b/src/mac/carbon/tabctrl.cpp @@ -41,7 +41,7 @@ bool wxTabCtrl::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, cons MacPreControlCreate( parent , id , "" , pos , size ,style, wxDefaultValidator , name , &bounds , title ) ; - m_macControl = ::NewControl( parent->GetMacRootWindow() , &bounds , title , false , 0 , 0 , 1, + m_macControl = ::NewControl( parent->MacGetRootWindow() , &bounds , title , false , 0 , 0 , 1, kControlTabSmallProc , (long) this ) ; MacPostControlCreate() ; diff --git a/src/mac/carbon/textctrl.cpp b/src/mac/carbon/textctrl.cpp index 4270eefb1c..08950c5c74 100644 --- a/src/mac/carbon/textctrl.cpp +++ b/src/mac/carbon/textctrl.cpp @@ -124,7 +124,7 @@ bool wxTextCtrl::Create(wxWindow *parent, wxWindowID id, } - m_macControl = ::NewControl( parent->GetMacRootWindow() , &bounds , "\p" , true , 0 , 0 , 1, + m_macControl = ::NewControl( parent->MacGetRootWindow() , &bounds , "\p" , true , 0 , 0 , 1, ( style & wxTE_PASSWORD ) ? kControlEditTextPasswordProc : kControlEditTextProc , (long) this ) ; MacPostControlCreate() ; @@ -179,7 +179,7 @@ void wxTextCtrl::SetValue(const wxString& st) else value = st ; ::SetControlData( m_macControl, 0, ( m_windowStyle & wxTE_PASSWORD ) ? kControlEditTextPasswordTag : kControlEditTextTextTag , value.Length() , (char*) ((const char*)value) ) ; - WindowRef window = GetMacRootWindow() ; + WindowRef window = MacGetRootWindow() ; if ( window ) { wxWindow* win = wxFindWinFromMacWindow( window ) ; @@ -193,9 +193,9 @@ void wxTextCtrl::SetValue(const wxString& st) wxWindow* parent = GetParent() ; while ( parent ) { - if( parent->MacGetWindowData() ) + if( parent->IsTopLevel() ) { - ::SetThemeWindowBackground( win->MacGetWindowData()->m_macWindow , kThemeBrushDialogBackgroundActive , false ) ; +// ::SetThemeWindowBackground( win->MacGetRootWindow() , kThemeBrushDialogBackgroundActive , false ) ; break ; } @@ -210,7 +210,7 @@ void wxTextCtrl::SetValue(const wxString& st) } UMADrawControl( m_macControl ) ; - ::SetThemeWindowBackground( win->MacGetWindowData()->m_macWindow , win->MacGetWindowData()->m_macWindowBackgroundTheme , false ) ; +// ::SetThemeWindowBackground( win->MacGetWindowData()->m_macWindow , win->MacGetWindowData()->m_macWindowBackgroundTheme , false ) ; } } } @@ -255,7 +255,7 @@ void wxTextCtrl::Paste() ::GetControlData( m_macControl , 0, kControlEditTextTEHandleTag , sizeof( TEHandle ) , (char*) &teH , &size ) ; TEFromScrap() ; TEPaste( teH ) ; - WindowRef window = GetMacRootWindow() ; + WindowRef window = MacGetRootWindow() ; if ( window ) { wxWindow* win = wxFindWinFromMacWindow( window ) ; @@ -269,9 +269,9 @@ void wxTextCtrl::Paste() wxWindow* parent = GetParent() ; while ( parent ) { - if( parent->MacGetWindowData() ) + if( parent->IsTopLevel() ) { - ::SetThemeWindowBackground( win->MacGetWindowData()->m_macWindow , kThemeBrushDialogBackgroundActive , false ) ; +// ::SetThemeWindowBackground( win->MacGetWindowData()->m_macWindow , kThemeBrushDialogBackgroundActive , false ) ; break ; } @@ -286,7 +286,7 @@ void wxTextCtrl::Paste() } UMADrawControl( m_macControl ) ; - ::SetThemeWindowBackground( win->MacGetWindowData()->m_macWindow , win->MacGetWindowData()->m_macWindowBackgroundTheme , false ) ; +// ::SetThemeWindowBackground( win->MacGetWindowData()->m_macWindow , win->MacGetWindowData()->m_macWindowBackgroundTheme , false ) ; } } } @@ -1772,12 +1772,12 @@ bool wxTextCtrl::Create(wxWindow *parent, wxWindowID id, if ( style & wxTE_PASSWORD ) { - m_macControl = ::NewControl( parent->GetMacRootWindow() , &bounds , "\p" , true , 0 , 0 , 1, + m_macControl = ::NewControl( parent->MacGetRootWindow() , &bounds , "\p" , true , 0 , 0 , 1, kControlEditTextPasswordProc , (long) this ) ; } else { - if ( mUPCreateControl(parent->GetMacRootWindow(), &bounds, &m_macControl) != noErr ) + if ( mUPCreateControl(parent->MacGetRootWindow(), &bounds, &m_macControl) != noErr ) return FALSE ; } MacPostControlCreate() ; @@ -1887,7 +1887,7 @@ void wxTextCtrl::SetValue(const wxString& st) TXNSetData( (**tpvars).fTXNRec, kTXNTextData, (const char*)value, value.Length(), kTXNStartOffset, kTXNEndOffset); } - WindowRef window = GetMacRootWindow() ; + WindowRef window = MacGetRootWindow() ; if ( window ) { wxWindow* win = wxFindWinFromMacWindow( window ) ; @@ -1979,7 +1979,7 @@ void wxTextCtrl::Paste() ::GetControlData( m_macControl , 0, kControlEditTextTEHandleTag , sizeof( TEHandle ) , (char*) &teH , &size ) ; TEFromScrap() ; TEPaste( teH ) ; - WindowRef window = GetMacRootWindow() ; + WindowRef window = MacGetRootWindow() ; if ( window ) { wxWindow* win = wxFindWinFromMacWindow( window ) ; diff --git a/src/mac/checkbox.cpp b/src/mac/checkbox.cpp index d83a2fed05..e17deb180d 100644 --- a/src/mac/checkbox.cpp +++ b/src/mac/checkbox.cpp @@ -36,7 +36,7 @@ bool wxCheckBox::Create(wxWindow *parent, wxWindowID id, const wxString& label, MacPreControlCreate( parent , id , label , pos , size ,style, validator , name , &bounds , title ) ; - m_macControl = ::NewControl( parent->GetMacRootWindow() , &bounds , title , false , 0 , 0 , 1, + m_macControl = ::NewControl( parent->MacGetRootWindow() , &bounds , title , false , 0 , 0 , 1, kControlCheckBoxProc , (long) this ) ; MacPostControlCreate() ; diff --git a/src/mac/choice.cpp b/src/mac/choice.cpp index 9f05a58372..2ec18bc546 100644 --- a/src/mac/choice.cpp +++ b/src/mac/choice.cpp @@ -45,7 +45,7 @@ bool wxChoice::Create(wxWindow *parent, wxWindowID id, MacPreControlCreate( parent , id , "" , pos , size ,style, validator , name , &bounds , title ) ; - m_macControl = ::NewControl( parent->GetMacRootWindow() , &bounds , title , false , 0 , -12345 , 0 , + m_macControl = ::NewControl( parent->MacGetRootWindow() , &bounds , title , false , 0 , -12345 , 0 , kControlPopupButtonProc + kControlPopupFixedWidthVariant , (long) this ) ; m_macPopUpMenuHandle = NewUniqueMenu() ; diff --git a/src/mac/combobox.cpp b/src/mac/combobox.cpp index 5dabd2dd49..712a6dddbf 100644 --- a/src/mac/combobox.cpp +++ b/src/mac/combobox.cpp @@ -47,7 +47,7 @@ bool wxComboBox::Create(wxWindow *parent, wxWindowID id, MacPreControlCreate( parent , id , "" , pos , size ,style, validator , name , &bounds , title ) ; - m_macControl = ::NewControl( parent->GetMacRootWindow() , &bounds , title , false , 0 , -12345 , 0, + m_macControl = ::NewControl( parent->MacGetRootWindow() , &bounds , title , false , 0 , -12345 , 0, kControlPopupButtonProc , (long) this ) ; m_macPopUpMenuHandle = NewUniqueMenu() ; diff --git a/src/mac/listbox.cpp b/src/mac/listbox.cpp index ffbe8e7035..7cfcbc5bce 100644 --- a/src/mac/listbox.cpp +++ b/src/mac/listbox.cpp @@ -168,7 +168,7 @@ bool wxListBox::Create(wxWindow *parent, wxWindowID id, Size asize; - CreateListBoxControl( parent->GetMacRootWindow(), &bounds, false, 0, 1, false, true, + CreateListBoxControl( parent->MacGetRootWindow(), &bounds, false, 0, 1, false, true, 14, 14, false, &listDef, &m_macControl ); GetControlData(m_macControl, kControlNoPart, kControlListBoxListHandleTag, @@ -180,7 +180,7 @@ bool wxListBox::Create(wxWindow *parent, wxWindowID id, #else long result ; - m_macControl = ::NewControl( parent->GetMacRootWindow() , &bounds , title , false , + m_macControl = ::NewControl( parent->MacGetRootWindow() , &bounds , title , false , kwxMacListWithVerticalScrollbar , 0 , 0, kControlListBoxProc , (long) this ) ; ::GetControlData( m_macControl , kControlNoPart , kControlListBoxListHandleTag , @@ -588,7 +588,7 @@ void wxListBox::SetupColours() void wxListBox::Refresh(bool eraseBack, const wxRect *rect) { // Set up port - WindowRef rootwindow = GetMacRootWindow() ; + WindowRef rootwindow = MacGetRootWindow() ; wxWindow* wxrootwindow = wxFindWinFromMacWindow( rootwindow ) ; wxMacDrawingHelper focus( wxrootwindow ); diff --git a/src/mac/notebmac.cpp b/src/mac/notebmac.cpp index 88e098ac96..52f69eb69f 100644 --- a/src/mac/notebmac.cpp +++ b/src/mac/notebmac.cpp @@ -115,7 +115,7 @@ bool wxNotebook::Create(wxWindow *parent, MacPreControlCreate( parent , id , "" , pos , size ,style, wxDefaultValidator , name , &bounds , title ) ; - m_macControl = ::NewControl( parent->GetMacRootWindow() , &bounds , title , false , 0 , 0 , 1, + m_macControl = ::NewControl( parent->MacGetRootWindow() , &bounds , title , false , 0 , 0 , 1, kControlTabSmallProc , (long) this ) ; MacPostControlCreate() ; @@ -299,7 +299,7 @@ void wxNotebook::MacSetupTabs() } Rect bounds; GetControlBounds(m_macControl, &bounds); - InvalWindowRect(GetMacRootWindow(), &bounds); + InvalWindowRect(MacGetRootWindow(), &bounds); } // ---------------------------------------------------------------------------- diff --git a/src/mac/radiobox.cpp b/src/mac/radiobox.cpp index f4c7ca1509..e3d5abd2a6 100644 --- a/src/mac/radiobox.cpp +++ b/src/mac/radiobox.cpp @@ -117,7 +117,7 @@ bool wxRadioBox::Create(wxWindow *parent, wxWindowID id, const wxString& label, MacPreControlCreate( parent , id , label , pos , size ,style, val , name , &bounds , title ) ; - m_macControl = ::NewControl( parent->GetMacRootWindow() , &bounds , title , false , 0 , 0 , 1, + m_macControl = ::NewControl( parent->MacGetRootWindow() , &bounds , title , false , 0 , 0 , 1, kControlGroupBoxTextTitleProc , (long) this ) ; for (i = 0; i < n; i++) diff --git a/src/mac/radiobut.cpp b/src/mac/radiobut.cpp index 476cf9ef10..a0a8885b16 100644 --- a/src/mac/radiobut.cpp +++ b/src/mac/radiobut.cpp @@ -35,7 +35,7 @@ bool wxRadioButton::Create(wxWindow *parent, wxWindowID id, MacPreControlCreate( parent , id , label , pos , size ,style, validator , name , &bounds , title ) ; - m_macControl = ::NewControl( parent->GetMacRootWindow() , &bounds , title , false , 0 , 0 , 1, + m_macControl = ::NewControl( parent->MacGetRootWindow() , &bounds , title , false , 0 , 0 , 1, kControlRadioButtonProc , (long) this ) ; MacPostControlCreate() ; diff --git a/src/mac/scrolbar.cpp b/src/mac/scrolbar.cpp index c417484f02..51c01e4cef 100644 --- a/src/mac/scrolbar.cpp +++ b/src/mac/scrolbar.cpp @@ -43,7 +43,7 @@ bool wxScrollBar::Create(wxWindow *parent, wxWindowID id, MacPreControlCreate( parent , id , "" , pos , size ,style, validator , name , &bounds , title ) ; - m_macControl = ::NewControl( parent->GetMacRootWindow() , &bounds , title , true , 0 , 0 , 100, + m_macControl = ::NewControl( parent->MacGetRootWindow() , &bounds , title , true , 0 , 0 , 100, kControlScrollBarLiveProc , (long) this ) ; wxASSERT_MSG( m_macControl != NULL , "No valid mac control" ) ; diff --git a/src/mac/slider.cpp b/src/mac/slider.cpp index 459a15c76b..2f8854acc2 100644 --- a/src/mac/slider.cpp +++ b/src/mac/slider.cpp @@ -84,7 +84,7 @@ bool wxSlider::Create(wxWindow *parent, wxWindowID id, } - m_macControl = ::NewControl( parent->GetMacRootWindow(), &bounds, title, false, + m_macControl = ::NewControl( parent->MacGetRootWindow(), &bounds, title, false, value, minValue, maxValue, procID, (long) this); wxASSERT_MSG( m_macControl != NULL , "No valid mac control" ) ; @@ -408,7 +408,7 @@ void wxSlider::MacHandleControlClick( ControlHandle control , SInt16 controlpart // Update window at old and new positions SetRect(&newbounds, m_x, m_y, m_x + m_width, m_y + m_height); - WindowRef rootwindow = GetMacRootWindow(); + WindowRef rootwindow = MacGetRootWindow(); InvalWindowRect( rootwindow , &oldbounds ); InvalWindowRect( rootwindow , &newbounds ); diff --git a/src/mac/spinbutt.cpp b/src/mac/spinbutt.cpp index b396d675d0..87db4b041a 100644 --- a/src/mac/spinbutt.cpp +++ b/src/mac/spinbutt.cpp @@ -49,7 +49,7 @@ bool wxSpinButton::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, c MacPreControlCreate( parent , id , "" , pos , size ,style,*( (wxValidator*) NULL ) , name , &bounds , title ) ; - m_macControl = ::NewControl( parent->GetMacRootWindow() , &bounds , title , false , 0 , 0 , 100, + m_macControl = ::NewControl( parent->MacGetRootWindow() , &bounds , title , false , 0 , 0 , 100, kControlLittleArrowsProc , (long) this ) ; wxASSERT_MSG( m_macControl != NULL , "No valid mac control" ) ; diff --git a/src/mac/statbox.cpp b/src/mac/statbox.cpp index 400eb43169..1a562c12e6 100644 --- a/src/mac/statbox.cpp +++ b/src/mac/statbox.cpp @@ -43,7 +43,7 @@ bool wxStaticBox::Create(wxWindow *parent, wxWindowID id, MacPreControlCreate( parent , id , label , pos , size ,style, wxDefaultValidator , name , &bounds , title ) ; - m_macControl = ::NewControl( parent->GetMacRootWindow() , &bounds , title , false , 0 , 0 , 1, + m_macControl = ::NewControl( parent->MacGetRootWindow() , &bounds , title , false , 0 , 0 , 1, kControlGroupBoxTextTitleProc , (long) this ) ; MacPostControlCreate() ; diff --git a/src/mac/statlmac.cpp b/src/mac/statlmac.cpp index 175708d1fa..0272ed706e 100644 --- a/src/mac/statlmac.cpp +++ b/src/mac/statlmac.cpp @@ -54,7 +54,7 @@ bool wxStaticLine::Create( wxWindow *parent, MacPreControlCreate( parent , id , "" , pos , size ,style, wxDefaultValidator , name , &bounds , title ) ; - m_macControl = ::NewControl( parent->GetMacRootWindow() , &bounds , title , false , 0 , 0 , 1, + m_macControl = ::NewControl( parent->MacGetRootWindow() , &bounds , title , false , 0 , 0 , 1, kControlSeparatorLineProc , (long) this ) ; MacPostControlCreate() ; diff --git a/src/mac/tabctrl.cpp b/src/mac/tabctrl.cpp index 7bb7a464f2..9231ea3d41 100644 --- a/src/mac/tabctrl.cpp +++ b/src/mac/tabctrl.cpp @@ -41,7 +41,7 @@ bool wxTabCtrl::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, cons MacPreControlCreate( parent , id , "" , pos , size ,style, wxDefaultValidator , name , &bounds , title ) ; - m_macControl = ::NewControl( parent->GetMacRootWindow() , &bounds , title , false , 0 , 0 , 1, + m_macControl = ::NewControl( parent->MacGetRootWindow() , &bounds , title , false , 0 , 0 , 1, kControlTabSmallProc , (long) this ) ; MacPostControlCreate() ; diff --git a/src/mac/textctrl.cpp b/src/mac/textctrl.cpp index 4270eefb1c..08950c5c74 100644 --- a/src/mac/textctrl.cpp +++ b/src/mac/textctrl.cpp @@ -124,7 +124,7 @@ bool wxTextCtrl::Create(wxWindow *parent, wxWindowID id, } - m_macControl = ::NewControl( parent->GetMacRootWindow() , &bounds , "\p" , true , 0 , 0 , 1, + m_macControl = ::NewControl( parent->MacGetRootWindow() , &bounds , "\p" , true , 0 , 0 , 1, ( style & wxTE_PASSWORD ) ? kControlEditTextPasswordProc : kControlEditTextProc , (long) this ) ; MacPostControlCreate() ; @@ -179,7 +179,7 @@ void wxTextCtrl::SetValue(const wxString& st) else value = st ; ::SetControlData( m_macControl, 0, ( m_windowStyle & wxTE_PASSWORD ) ? kControlEditTextPasswordTag : kControlEditTextTextTag , value.Length() , (char*) ((const char*)value) ) ; - WindowRef window = GetMacRootWindow() ; + WindowRef window = MacGetRootWindow() ; if ( window ) { wxWindow* win = wxFindWinFromMacWindow( window ) ; @@ -193,9 +193,9 @@ void wxTextCtrl::SetValue(const wxString& st) wxWindow* parent = GetParent() ; while ( parent ) { - if( parent->MacGetWindowData() ) + if( parent->IsTopLevel() ) { - ::SetThemeWindowBackground( win->MacGetWindowData()->m_macWindow , kThemeBrushDialogBackgroundActive , false ) ; +// ::SetThemeWindowBackground( win->MacGetRootWindow() , kThemeBrushDialogBackgroundActive , false ) ; break ; } @@ -210,7 +210,7 @@ void wxTextCtrl::SetValue(const wxString& st) } UMADrawControl( m_macControl ) ; - ::SetThemeWindowBackground( win->MacGetWindowData()->m_macWindow , win->MacGetWindowData()->m_macWindowBackgroundTheme , false ) ; +// ::SetThemeWindowBackground( win->MacGetWindowData()->m_macWindow , win->MacGetWindowData()->m_macWindowBackgroundTheme , false ) ; } } } @@ -255,7 +255,7 @@ void wxTextCtrl::Paste() ::GetControlData( m_macControl , 0, kControlEditTextTEHandleTag , sizeof( TEHandle ) , (char*) &teH , &size ) ; TEFromScrap() ; TEPaste( teH ) ; - WindowRef window = GetMacRootWindow() ; + WindowRef window = MacGetRootWindow() ; if ( window ) { wxWindow* win = wxFindWinFromMacWindow( window ) ; @@ -269,9 +269,9 @@ void wxTextCtrl::Paste() wxWindow* parent = GetParent() ; while ( parent ) { - if( parent->MacGetWindowData() ) + if( parent->IsTopLevel() ) { - ::SetThemeWindowBackground( win->MacGetWindowData()->m_macWindow , kThemeBrushDialogBackgroundActive , false ) ; +// ::SetThemeWindowBackground( win->MacGetWindowData()->m_macWindow , kThemeBrushDialogBackgroundActive , false ) ; break ; } @@ -286,7 +286,7 @@ void wxTextCtrl::Paste() } UMADrawControl( m_macControl ) ; - ::SetThemeWindowBackground( win->MacGetWindowData()->m_macWindow , win->MacGetWindowData()->m_macWindowBackgroundTheme , false ) ; +// ::SetThemeWindowBackground( win->MacGetWindowData()->m_macWindow , win->MacGetWindowData()->m_macWindowBackgroundTheme , false ) ; } } } @@ -1772,12 +1772,12 @@ bool wxTextCtrl::Create(wxWindow *parent, wxWindowID id, if ( style & wxTE_PASSWORD ) { - m_macControl = ::NewControl( parent->GetMacRootWindow() , &bounds , "\p" , true , 0 , 0 , 1, + m_macControl = ::NewControl( parent->MacGetRootWindow() , &bounds , "\p" , true , 0 , 0 , 1, kControlEditTextPasswordProc , (long) this ) ; } else { - if ( mUPCreateControl(parent->GetMacRootWindow(), &bounds, &m_macControl) != noErr ) + if ( mUPCreateControl(parent->MacGetRootWindow(), &bounds, &m_macControl) != noErr ) return FALSE ; } MacPostControlCreate() ; @@ -1887,7 +1887,7 @@ void wxTextCtrl::SetValue(const wxString& st) TXNSetData( (**tpvars).fTXNRec, kTXNTextData, (const char*)value, value.Length(), kTXNStartOffset, kTXNEndOffset); } - WindowRef window = GetMacRootWindow() ; + WindowRef window = MacGetRootWindow() ; if ( window ) { wxWindow* win = wxFindWinFromMacWindow( window ) ; @@ -1979,7 +1979,7 @@ void wxTextCtrl::Paste() ::GetControlData( m_macControl , 0, kControlEditTextTEHandleTag , sizeof( TEHandle ) , (char*) &teH , &size ) ; TEFromScrap() ; TEPaste( teH ) ; - WindowRef window = GetMacRootWindow() ; + WindowRef window = MacGetRootWindow() ; if ( window ) { wxWindow* win = wxFindWinFromMacWindow( window ) ; -- 2.45.2