Add DoGetBestSize
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38188 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -55,6 +55,9 @@ public:
|
|||||||
void Command(wxCommandEvent& event);
|
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 ) ;
|
virtual wxInt32 MacControlHit( WXEVENTHANDLERREF handler , WXEVENTREF mevent ) ;
|
||||||
|
|
||||||
|
wxSize DoGetBestSize() const;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
int m_pageSize;
|
int m_pageSize;
|
||||||
int m_viewSize;
|
int m_viewSize;
|
||||||
|
@@ -219,3 +219,23 @@ wxInt32 wxScrollBar::MacControlHit( WXEVENTHANDLERREF handler, WXEVENTREF mevent
|
|||||||
|
|
||||||
return noErr;
|
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;
|
||||||
|
}
|
||||||
|
Reference in New Issue
Block a user