1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/msw/commandlinkbutton.h
3 // Purpose: wxCommandLinkButton class
4 // Author: Rickard Westerlund
7 // Copyright: (c) 2010 wxWidgets team
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
11 #ifndef _WX_MSW_COMMANDLINKBUTTON_H_
12 #define _WX_MSW_COMMANDLINKBUTTON_H_
14 // ----------------------------------------------------------------------------
15 // Command link button for wxMSW
16 // ----------------------------------------------------------------------------
18 // Derive from the generic version to be able to fall back to it during
19 // run-time if the command link buttons are not supported by the system we're
22 class WXDLLIMPEXP_ADV wxCommandLinkButton
: public wxGenericCommandLinkButton
25 wxCommandLinkButton () : wxGenericCommandLinkButton() { }
27 wxCommandLinkButton(wxWindow
*parent
,
29 const wxString
& mainLabel
= wxEmptyString
,
30 const wxString
& note
= wxEmptyString
,
31 const wxPoint
& pos
= wxDefaultPosition
,
32 const wxSize
& size
= wxDefaultSize
,
34 const wxValidator
& validator
= wxDefaultValidator
,
35 const wxString
& name
= wxButtonNameStr
)
36 : wxGenericCommandLinkButton()
38 Create(parent
, id
, mainLabel
, note
, pos
, size
, style
, validator
, name
);
41 bool Create(wxWindow
*parent
,
43 const wxString
& mainLabel
= wxEmptyString
,
44 const wxString
& note
= wxEmptyString
,
45 const wxPoint
& pos
= wxDefaultPosition
,
46 const wxSize
& size
= wxDefaultSize
,
48 const wxValidator
& validator
= wxDefaultValidator
,
49 const wxString
& name
= wxButtonNameStr
);
51 // overridden base class methods
52 // -----------------------------
54 // do the same thing as in the generic case here
55 virtual void SetLabel(const wxString
& label
)
57 SetMainLabelAndNote(label
.BeforeFirst('\n'), label
.AfterFirst('\n'));
60 virtual void SetMainLabelAndNote(const wxString
& mainLabel
,
61 const wxString
& note
);
63 virtual WXDWORD
MSWGetStyle(long style
, WXDWORD
*exstyle
) const;
66 virtual wxSize
DoGetBestSize() const;
68 virtual bool HasNativeBitmap() const;
71 wxDECLARE_DYNAMIC_CLASS_NO_COPY(wxCommandLinkButton
);
74 #endif // _WX_MSW_COMMANDLINKBUTTON_H_