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