]> git.saurik.com Git - wxWidgets.git/blame_incremental - src/gtk/bmpbuttn.cpp
adapting to init pattern
[wxWidgets.git] / src / gtk / bmpbuttn.cpp
... / ...
CommitLineData
1/////////////////////////////////////////////////////////////////////////////
2// Name: src/gtk/bmpbuttn.cpp
3// Purpose:
4// Author: Robert Roebling
5// Id: $Id$
6// Copyright: (c) 1998 Robert Roebling
7// Licence: wxWindows licence
8/////////////////////////////////////////////////////////////////////////////
9
10// For compilers that support precompilation, includes "wx.h".
11#include "wx/wxprec.h"
12
13#if wxUSE_BMPBUTTON
14
15#include "wx/bmpbuttn.h"
16
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{
26 if ( !wxBitmapButtonBase::Create(parent, id, pos, size, style,
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}
41#endif // wxUSE_BMPBUTTON