git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61221 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
46 lines
1.4 KiB
C++
46 lines
1.4 KiB
C++
/////////////////////////////////////////////////////////////////////////////
|
|
// Name: src/gtk/bmpbuttn.cpp
|
|
// Purpose:
|
|
// Author: Robert Roebling
|
|
// Id: $Id$
|
|
// Copyright: (c) 1998 Robert Roebling
|
|
// Licence: wxWindows licence
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// For compilers that support precompilation, includes "wx.h".
|
|
#include "wx/wxprec.h"
|
|
|
|
#if wxUSE_BMPBUTTON
|
|
|
|
#include "wx/bmpbuttn.h"
|
|
|
|
IMPLEMENT_DYNAMIC_CLASS(wxBitmapButton,wxButton)
|
|
|
|
bool wxBitmapButton::Create(wxWindow *parent,
|
|
wxWindowID id,
|
|
const wxBitmap& bitmap,
|
|
const wxPoint& pos,
|
|
const wxSize& size,
|
|
long style,
|
|
const wxValidator& validator,
|
|
const wxString& name)
|
|
{
|
|
if ( !wxBitmapButtonBase::Create(parent, id, "",
|
|
pos, size,
|
|
style | wxBU_NOTEXT,
|
|
validator, name) )
|
|
return false;
|
|
|
|
if ( bitmap.IsOk() )
|
|
{
|
|
SetBitmapLabel(bitmap);
|
|
|
|
// we need to adjust the size after setting the bitmap as it may be too
|
|
// big for the default button size
|
|
SetInitialSize(size);
|
|
}
|
|
|
|
return true;
|
|
}
|
|
#endif // wxUSE_BMPBUTTON
|