1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/msw/commandlinkbutton.h
3 // Purpose: wxCommandLinkButton class
4 // Author: Rickard Westerlund
6 // Copyright: (c) 2010 wxWidgets team
7 // Licence: wxWindows licence
8 /////////////////////////////////////////////////////////////////////////////
10 #ifndef _WX_MSW_COMMANDLINKBUTTON_H_
11 #define _WX_MSW_COMMANDLINKBUTTON_H_
13 // ----------------------------------------------------------------------------
14 // Command link button for wxMSW
15 // ----------------------------------------------------------------------------
17 // Derive from the generic version to be able to fall back to it during
18 // run-time if the command link buttons are not supported by the system we're
21 class WXDLLIMPEXP_ADV wxCommandLinkButton
: public wxGenericCommandLinkButton
24 wxCommandLinkButton () : wxGenericCommandLinkButton() { }
26 wxCommandLinkButton(wxWindow
*parent
,
28 const wxString
& mainLabel
= wxEmptyString
,
29 const wxString
& note
= wxEmptyString
,
30 const wxPoint
& pos
= wxDefaultPosition
,
31 const wxSize
& size
= wxDefaultSize
,
33 const wxValidator
& validator
= wxDefaultValidator
,
34 const wxString
& name
= wxButtonNameStr
)
35 : wxGenericCommandLinkButton()
37 Create(parent
, id
, mainLabel
, note
, pos
, size
, style
, validator
, name
);
40 bool Create(wxWindow
*parent
,
42 const wxString
& mainLabel
= wxEmptyString
,
43 const wxString
& note
= wxEmptyString
,
44 const wxPoint
& pos
= wxDefaultPosition
,
45 const wxSize
& size
= wxDefaultSize
,
47 const wxValidator
& validator
= wxDefaultValidator
,
48 const wxString
& name
= wxButtonNameStr
);
50 // overridden base class methods
51 // -----------------------------
53 // do the same thing as in the generic case here
54 virtual void SetLabel(const wxString
& label
)
56 SetMainLabelAndNote(label
.BeforeFirst('\n'), label
.AfterFirst('\n'));
59 virtual void SetMainLabelAndNote(const wxString
& mainLabel
,
60 const wxString
& note
);
62 virtual WXDWORD
MSWGetStyle(long style
, WXDWORD
*exstyle
) const;
65 virtual wxSize
DoGetBestSize() const;
67 virtual bool HasNativeBitmap() const;
70 wxDECLARE_DYNAMIC_CLASS_NO_COPY(wxCommandLinkButton
);
73 #endif // _WX_MSW_COMMANDLINKBUTTON_H_