1 /////////////////////////////////////////////////////////////////////////////
2 // Name: src/osx/iphone/anybutton.mm
3 // Purpose: wxAnyButton
4 // Author: Stefan Csomor
5 // Created: 1998-01-01 (extracted from button.mm)
6 // RCS-ID: $Id: anybutton.mm 67232 2011-03-18 15:10:15Z DS $
7 // Copyright: (c) Stefan Csomor
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
11 #include "wx/wxprec.h"
13 #include "wx/anybutton.h"
17 #include "wx/toplevel.h"
18 #include "wx/dcclient.h"
21 #include "wx/stockitem.h"
23 #include "wx/osx/private.h"
25 wxSize wxAnyButton::DoGetBestSize() const
27 if ( GetId() == wxID_HELP )
28 return wxSize( 18 , 18 ) ;
30 wxSize sz = GetDefaultSize() ;
34 GetPeer()->GetBestRect(&r);
36 if ( r.GetWidth() == 0 && r.GetHeight() == 0 )
44 if ((wBtn > sz.x) || ( GetWindowStyle() & wxBU_EXACTFIT))
50 wxSize wxAnyButton::GetDefaultSize()
55 return wxSize(wBtn, hBtn);