X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/27419164adafee9829f56d617f9f69954878586a..39348a963113e240ab67e8b3534104e3a04ff764:/src/mac/control.cpp diff --git a/src/mac/control.cpp b/src/mac/control.cpp index 8268b03c8b..f0714b067a 100644 --- a/src/mac/control.cpp +++ b/src/mac/control.cpp @@ -13,6 +13,8 @@ #pragma implementation "control.h" #endif +#include "wx/defs.h" + #include "wx/control.h" #include "wx/panel.h" #include "wx/app.h" @@ -136,6 +138,7 @@ void wxControl::SetLabel(const wxString& title) #endif ::SetControlTitle( m_macControl , maclabel ) ; } + Refresh() ; } wxSize wxControl::DoGetBestSize() const @@ -270,6 +273,7 @@ void wxControl::MacPostControlCreate() m_macControlIsShown = true ; MacAdjustControlRect() ; wxAssociateControlWithMacControl( m_macControl , this ) ; + UMAShowControl( m_macControl ) ; } void wxControl::MacAdjustControlRect() @@ -358,15 +362,15 @@ void wxControl::MacSuperChangedPosition() if ( mac_x != former_mac_x || mac_y != former_mac_y ) { - { - Rect inval = { former_mac_y , former_mac_x , former_mac_y + m_height , former_mac_x + m_width } ; - InvalWindowRect( rootwindow , &inval ) ; - } + { + Rect inval = { former_mac_y , former_mac_x , former_mac_y + m_height , former_mac_x + m_width } ; + InvalWindowRect( rootwindow , &inval ) ; + } UMAMoveControl( m_macControl , mac_x + m_macHorizontalBorder , mac_y + m_macVerticalBorder ) ; - { - Rect inval = { mac_y , mac_x , mac_y + m_height , mac_x + m_width } ; - InvalWindowRect( rootwindow , &inval ) ; - } + { + Rect inval = { mac_y , mac_x , mac_y + m_height , mac_x + m_width } ; + InvalWindowRect( rootwindow , &inval ) ; + } } if ( wxrootwindow->IsKindOf( CLASSINFO( wxDialog ) ) ) { @@ -494,15 +498,15 @@ void wxControl::DoSetSize(int x, int y, if ( mac_x != former_mac_x || mac_y != former_mac_y ) { - { - Rect inval = { former_mac_y , former_mac_x , former_mac_y + m_height , former_mac_x + m_width } ; - InvalWindowRect( macrootwindow, &inval ) ; - } + { + Rect inval = { former_mac_y , former_mac_x , former_mac_y + m_height , former_mac_x + m_width } ; + InvalWindowRect( macrootwindow, &inval ) ; + } UMAMoveControl( m_macControl , mac_x + m_macHorizontalBorder , mac_y + m_macVerticalBorder ) ; - { - Rect inval = { mac_y , mac_x , mac_y + m_height , mac_x + m_width } ; - InvalWindowRect(macrootwindow, &inval ) ; - } + { + Rect inval = { mac_y , mac_x , mac_y + m_height , mac_x + m_width } ; + InvalWindowRect(macrootwindow, &inval ) ; + } } if ( actualX != former_x || actualY != former_y ) @@ -512,9 +516,10 @@ void wxControl::DoSetSize(int x, int y, MacRepositionScrollBars() ; // To consider -> should the parameters be the effective or the virtual coordinates (AdjustForParent..) - wxMoveEvent event(wxPoint(m_x, m_y), m_windowId); - event.SetEventObject(this); - GetEventHandler()->ProcessEvent(event); + wxPoint point(m_x, m_y); + wxMoveEvent event(point, m_windowId); + event.SetEventObject(this); + GetEventHandler()->ProcessEvent(event); } if ( actualWidth != former_w || actualHeight != former_h ) { @@ -532,9 +537,10 @@ void wxControl::DoSetSize(int x, int y, } MacRepositionScrollBars() ; - wxSizeEvent event(wxSize(m_width, m_height), m_windowId); - event.SetEventObject(this); - GetEventHandler()->ProcessEvent(event); + wxSize size(m_width, m_height); + wxSizeEvent event(size, m_windowId); + event.SetEventObject(this); + GetEventHandler()->ProcessEvent(event); } if ( wxrootwindow->IsKindOf( CLASSINFO( wxDialog ) ) ) { @@ -579,21 +585,10 @@ bool wxControl::Enable(bool enable) if ( m_macControl ) { - - if ( UMAHasAppearance() ) - { - if ( enable ) - ::ActivateControl( m_macControl ) ; - else - ::DeactivateControl( m_macControl ) ; - } + if ( enable ) + UMAActivateControl( m_macControl ) ; else - { - if ( enable ) - ::HiliteControl( m_macControl , 0 ) ; - else - ::HiliteControl( m_macControl , 255 ) ; - } + UMADeactivateControl( m_macControl ) ; } return TRUE ; }