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