]> git.saurik.com Git - wxWidgets.git/blame - src/gtk/bmpbuttn.cpp
Ensure we don't modify a shared object in wxOSX wxRegion::DoOffset().
[wxWidgets.git] / src / gtk / bmpbuttn.cpp
CommitLineData
151ccd11 1/////////////////////////////////////////////////////////////////////////////
93763ad5 2// Name: src/gtk/bmpbuttn.cpp
151ccd11
RR
3// Purpose:
4// Author: Robert Roebling
f96aa4d9 5// Id: $Id$
01111366 6// Copyright: (c) 1998 Robert Roebling
65571936 7// Licence: wxWindows licence
151ccd11
RR
8/////////////////////////////////////////////////////////////////////////////
9
14f355c2
VS
10// For compilers that support precompilation, includes "wx.h".
11#include "wx/wxprec.h"
12
dcf924a3
RR
13#if wxUSE_BMPBUTTON
14
1e6feb95
VZ
15#include "wx/bmpbuttn.h"
16
79e38eaf
VZ
17bool wxBitmapButton::Create(wxWindow *parent,
18 wxWindowID id,
19 const wxBitmap& bitmap,
20 const wxPoint& pos,
21 const wxSize& size,
22 long style,
23 const wxValidator& validator,
24 const wxString& name)
25{
8e4c2912 26 if ( !wxBitmapButtonBase::Create(parent, id, pos, size, style,
79e38eaf
VZ
27 validator, name) )
28 return false;
29
30 if ( bitmap.IsOk() )
31 {
32 SetBitmapLabel(bitmap);
33
34 // we need to adjust the size after setting the bitmap as it may be too
35 // big for the default button size
36 SetInitialSize(size);
37 }
38
39 return true;
40}
f6bcfd97 41#endif // wxUSE_BMPBUTTON