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
// Copyright: (c) Stefan Csomor
7
// Licence: wxWindows licence
8
/////////////////////////////////////////////////////////////////////////////
10
#include "wx/wxprec.h"
12
#include "wx/anybutton.h"
16
#include "wx/toplevel.h"
17
#include "wx/dcclient.h"
20
#include "wx/stockitem.h"
22
#include "wx/osx/private.h"
24
wxSize wxAnyButton::DoGetBestSize() const
26
if ( GetId() == wxID_HELP )
27
return wxSize( 18 , 18 ) ;
29
wxSize sz = GetDefaultSize() ;
33
GetPeer()->GetBestRect(&r);
35
if ( r.GetWidth() == 0 && r.GetHeight() == 0 )
43
if ((wBtn > sz.x) || ( GetWindowStyle() & wxBU_EXACTFIT))
49
wxSize wxAnyButton::GetDefaultSize()
54
return wxSize(wBtn, hBtn);