]>
Commit | Line | Data |
---|---|---|
3571e1ad VZ |
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 | ||
28953245 | 27 | wxIMPLEMENT_DYNAMIC_CLASS_XTI(wxCommandLinkButton, wxButton, "wx/commandlinkbutton.h") |
3571e1ad VZ |
28 | |
29 | // ---------------------------------------------------------------------------- | |
30 | // Generic command link button | |
31 | // ---------------------------------------------------------------------------- | |
32 | ||
33 | bool wxGenericCommandLinkButton::Create(wxWindow *parent, | |
34 | wxWindowID id, | |
35 | const wxString& mainLabel, | |
36 | const wxString& note, | |
37 | const wxPoint& pos, | |
38 | const wxSize& size, | |
39 | long style, | |
40 | const wxValidator& validator, | |
41 | const wxString& name) | |
42 | { | |
43 | if ( !wxButton::Create(parent, | |
44 | id, | |
45 | mainLabel + '\n' + note, | |
46 | pos, | |
47 | size, | |
48 | style, | |
49 | validator, | |
50 | name) ) | |
51 | return false; | |
52 | ||
53 | if ( !HasNativeBitmap() ) | |
54 | SetDefaultBitmap(); | |
55 | ||
56 | return true; | |
57 | ||
58 | } | |
59 | ||
60 | void wxGenericCommandLinkButton::SetDefaultBitmap() | |
61 | { | |
62 | SetBitmap(wxArtProvider::GetBitmap(wxART_GO_FORWARD, wxART_BUTTON)); | |
63 | } | |
64 | ||
65 | #endif // wxUSE_COMMANDLINKBUTTON |