]>
git.saurik.com Git - wxWidgets.git/blob - src/qt/bmpbuttn.cpp
1 /////////////////////////////////////////////////////////////////////////////
4 // Author: Robert Roebling
7 // Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
12 #pragma implementation "bmpbuttn.h"
15 #include "wx/bmpbuttn.h"
17 //-----------------------------------------------------------------------------
19 //-----------------------------------------------------------------------------
23 //-----------------------------------------------------------------------------
25 //-----------------------------------------------------------------------------
27 IMPLEMENT_DYNAMIC_CLASS(wxBitmapButton
,wxControl
)
29 wxBitmapButton::wxBitmapButton(void)
33 wxBitmapButton::wxBitmapButton( wxWindow
*parent
, wxWindowID id
, const wxBitmap
&bitmap
,
34 const wxPoint
&pos
, const wxSize
&size
,
35 long style
, const wxString
&name
)
37 Create( parent
, id
, bitmap
, pos
, size
, style
, name
);
40 bool wxBitmapButton::Create( wxWindow
*parent
, wxWindowID id
, const wxBitmap
&bitmap
,
41 const wxPoint
&pos
, const wxSize
&size
,
42 long style
, const wxString
&name
)
46 wxSize newSize
= size
;
48 PreCreation( parent
, id
, pos
, newSize
, style
, name
);
54 if (newSize
.x
== -1) newSize
.x
= m_bitmap
.GetHeight()+10;
55 if (newSize
.y
== -1) newSize
.y
= m_bitmap
.GetWidth()+10;
56 SetSize( newSize
.x
, newSize
.y
);
66 void wxBitmapButton::SetDefault(void)
70 void wxBitmapButton::SetLabel( const wxString
&label
)
72 wxControl::SetLabel( label
);
75 wxString
wxBitmapButton::GetLabel(void) const
77 return wxControl::GetLabel();