]>
git.saurik.com Git - wxWidgets.git/blob - src/gtk/bmpbuttn.cpp
a99810f993b845a6f2088c984c7346792f64a408
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: src/gtk/bmpbuttn.cpp
4 // Author: Robert Roebling
6 // Copyright: (c) 1998 Robert Roebling
7 // Licence: wxWindows licence
8 /////////////////////////////////////////////////////////////////////////////
10 // For compilers that support precompilation, includes "wx.h".
11 #include "wx/wxprec.h"
15 #include "wx/bmpbuttn.h"
17 IMPLEMENT_DYNAMIC_CLASS(wxBitmapButton
,wxButton
)
19 bool wxBitmapButton::Create(wxWindow
*parent
,
21 const wxBitmap
& bitmap
,
25 const wxValidator
& validator
,
28 // we use wxBU_NOTEXT to let the base class Create() know that we are not
29 // going to show the label -- this is a hack, but like this it can support
30 // bitmaps with all GTK+ versions, not just 2.6+ which support both labels
33 // and we also use wxBU_EXACTFIT to avoid being resized up to the standard
34 // button size as this doesn't make sense for bitmap buttons which are not
36 if ( !wxBitmapButtonBase::Create(parent
, id
, pos
, size
, style
,
42 SetBitmapLabel(bitmap
);
44 // we need to adjust the size after setting the bitmap as it may be too
45 // big for the default button size
51 #endif // wxUSE_BMPBUTTON