]>
git.saurik.com Git - wxWidgets.git/blob - src/stubs/bmpbuttn.cpp
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxBitmapButton
8 // Copyright: (c) AUTHOR
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
13 #pragma implementation "bmpbuttn.h"
16 #include "wx/bmpbuttn.h"
18 #if !USE_SHARED_LIBRARY
19 IMPLEMENT_DYNAMIC_CLASS(wxBitmapButton
, wxButton
)
22 bool wxBitmapButton::Create(wxWindow
*parent
, wxWindowID id
, const wxBitmap
& bitmap
,
24 const wxSize
& size
, long style
,
25 const wxValidator
& validator
,
28 m_buttonBitmap
= bitmap
;
30 SetValidator(validator
);
31 parent
->AddChild(this);
33 m_backgroundColour
= parent
->GetBackgroundColour() ;
34 m_foregroundColour
= parent
->GetForegroundColour() ;
35 m_windowStyle
= style
;
45 m_windowId
= NewControlId();
49 if ( width
== -1 && bitmap
.Ok())
50 width
= bitmap
.GetWidth() + 2*m_marginX
;
52 if ( height
== -1 && bitmap
.Ok())
53 height
= bitmap
.GetHeight() + 2*m_marginY
;
55 /* TODO: create bitmap button
61 void wxBitmapButton::SetBitmapLabel(const wxBitmap
& bitmap
)
63 m_buttonBitmap
= bitmap
;