X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/0f85d5e799ce87db7a5a5291bb258ee22e4ff256..60b0c3b4c64a768bedb48b00477b7f6290d9fe23:/src/mac/carbon/scrolbar.cpp diff --git a/src/mac/carbon/scrolbar.cpp b/src/mac/carbon/scrolbar.cpp index f6f9bc4cfc..e26fa27eef 100644 --- a/src/mac/carbon/scrolbar.cpp +++ b/src/mac/carbon/scrolbar.cpp @@ -11,12 +11,14 @@ #include "wx/wxprec.h" +#include "wx/scrolbar.h" + #ifndef WX_PRECOMP #include "wx/intl.h" #include "wx/log.h" + #include "wx/settings.h" #endif -#include "wx/scrolbar.h" #include "wx/mac/uma.h" IMPLEMENT_DYNAMIC_CLASS(wxScrollBar, wxControl) @@ -67,7 +69,11 @@ int wxScrollBar::GetThumbPosition() const return m_peer->GetValue(); } -void wxScrollBar::SetScrollbar( int position, int thumbSize, int range, int pageSize, bool refresh ) +void wxScrollBar::SetScrollbar( int position, + int thumbSize, + int range, + int pageSize, + bool WXUNUSED(refresh) ) { m_pageSize = pageSize; m_viewSize = thumbSize; @@ -87,7 +93,7 @@ void wxScrollBar::Command( wxCommandEvent& event ) ProcessCommand( event ); } -void wxScrollBar::MacHandleControlClick( WXWidget control, wxInt16 controlpart, bool mouseStillDown ) +void wxScrollBar::MacHandleControlClick( WXWidget WXUNUSED(control), wxInt16 controlpart, bool mouseStillDown ) { int position = m_peer->GetValue(); int minPos = m_peer->GetMinimum(); @@ -162,7 +168,7 @@ void wxScrollBar::MacHandleControlClick( WXWidget control, wxInt16 controlpart, GetEventHandler()->ProcessEvent( event ); } -wxInt32 wxScrollBar::MacControlHit( WXEVENTHANDLERREF handler, WXEVENTREF mevent ) +wxInt32 wxScrollBar::MacControlHit( WXEVENTHANDLERREF WXUNUSED(handler), WXEVENTREF mevent ) { int position = m_peer->GetValue(); int minPos = m_peer->GetMinimum(); @@ -219,3 +225,23 @@ wxInt32 wxScrollBar::MacControlHit( WXEVENTHANDLERREF handler, WXEVENTREF mevent return noErr; } + + +wxSize wxScrollBar::DoGetBestSize() const +{ + int w = 100; + int h = 100; + + if ( IsVertical() ) + { + w = wxSystemSettings::GetMetric(wxSYS_VSCROLL_X); + } + else + { + h = wxSystemSettings::GetMetric(wxSYS_HSCROLL_Y); + } + + wxSize best(w, h); + CacheBestSize(best); + return best; +}