]> git.saurik.com Git - wxWidgets.git/blob - src/generic/commandlinkbuttong.cpp
Add a SetSize to wxSizeEvent
[wxWidgets.git] / src / generic / commandlinkbuttong.cpp
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: src/generic/commandlinkbuttong.cpp
3 // Purpose: wxGenericCommandLinkButton
4 // Author: Rickard Westerlund
5 // Created: 2010-06-23
6 // RCS-ID: $Id$
7 // Copyright: (c) 2010 wxWidgets team
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
10
11 // ----------------------------------------------------------------------------
12 // headers
13 // ----------------------------------------------------------------------------
14
15 // For compilers that support precompilation, includes "wx.h".
16 #include "wx/wxprec.h"
17
18 #ifdef __BORLANDC__
19 #pragma hdrstop
20 #endif
21
22 #if wxUSE_COMMANDLINKBUTTON
23
24 #include "wx/commandlinkbutton.h"
25 #include "wx/artprov.h"
26
27 #if wxUSE_EXTENDED_RTTI
28 wxIMPLEMENT_DYNAMIC_CLASS_XTI(wxCommandLinkButton, wxButton, "wx/commandlinkbutton.h")
29 #else
30 wxIMPLEMENT_DYNAMIC_CLASS(wxCommandLinkButton, wxButton)
31 #endif // wxUSE_EXTENDED_RTTI
32
33 // ----------------------------------------------------------------------------
34 // Generic command link button
35 // ----------------------------------------------------------------------------
36
37 bool wxGenericCommandLinkButton::Create(wxWindow *parent,
38 wxWindowID id,
39 const wxString& mainLabel,
40 const wxString& note,
41 const wxPoint& pos,
42 const wxSize& size,
43 long style,
44 const wxValidator& validator,
45 const wxString& name)
46 {
47 if ( !wxButton::Create(parent,
48 id,
49 mainLabel + '\n' + note,
50 pos,
51 size,
52 style,
53 validator,
54 name) )
55 return false;
56
57 if ( !HasNativeBitmap() )
58 SetDefaultBitmap();
59
60 return true;
61
62 }
63
64 void wxGenericCommandLinkButton::SetDefaultBitmap()
65 {
66 SetBitmap(wxArtProvider::GetBitmap(wxART_GO_FORWARD, wxART_BUTTON));
67 }
68
69 #endif // wxUSE_COMMANDLINKBUTTON