]>
Commit | Line | Data |
---|---|---|
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 | ||
42b4e99e | 17 | IMPLEMENT_DYNAMIC_CLASS(wxBitmapButton,wxButton) |
151ccd11 | 18 | |
79e38eaf VZ |
19 | bool wxBitmapButton::Create(wxWindow *parent, |
20 | wxWindowID id, | |
21 | const wxBitmap& bitmap, | |
22 | const wxPoint& pos, | |
23 | const wxSize& size, | |
24 | long style, | |
25 | const wxValidator& validator, | |
26 | const wxString& name) | |
27 | { | |
8e4c2912 | 28 | if ( !wxBitmapButtonBase::Create(parent, id, pos, size, style, |
79e38eaf VZ |
29 | validator, name) ) |
30 | return false; | |
31 | ||
32 | if ( bitmap.IsOk() ) | |
33 | { | |
34 | SetBitmapLabel(bitmap); | |
35 | ||
36 | // we need to adjust the size after setting the bitmap as it may be too | |
37 | // big for the default button size | |
38 | SetInitialSize(size); | |
39 | } | |
40 | ||
41 | return true; | |
42 | } | |
f6bcfd97 | 43 | #endif // wxUSE_BMPBUTTON |