]> git.saurik.com Git - wxWidgets.git/blame - include/wx/msw/commandlinkbutton.h
Revert HasModifiers() change in behaviour, add HasAnyModifiers().
[wxWidgets.git] / include / wx / msw / commandlinkbutton.h
CommitLineData
3571e1ad
VZ
1/////////////////////////////////////////////////////////////////////////////
2// Name: wx/msw/commandlinkbutton.h
3// Purpose: wxCommandLinkButton class
4// Author: Rickard Westerlund
5// Created: 2010-06-11
6// RCS-ID: $Id$
7// Copyright: (c) 2010 wxWidgets team
8// Licence: wxWindows licence
9/////////////////////////////////////////////////////////////////////////////
10
11#ifndef _WX_MSW_COMMANDLINKBUTTON_H_
12#define _WX_MSW_COMMANDLINKBUTTON_H_
13
14// ----------------------------------------------------------------------------
15// Command link button for wxMSW
16// ----------------------------------------------------------------------------
17
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
20// running under.
21
22class WXDLLIMPEXP_ADV wxCommandLinkButton : public wxGenericCommandLinkButton
23{
24public:
25 wxCommandLinkButton () : wxGenericCommandLinkButton() { }
26
27 wxCommandLinkButton(wxWindow *parent,
28 wxWindowID id,
29 const wxString& mainLabel = wxEmptyString,
30 const wxString& note = wxEmptyString,
31 const wxPoint& pos = wxDefaultPosition,
32 const wxSize& size = wxDefaultSize,
33 long style = 0,
34 const wxValidator& validator = wxDefaultValidator,
35 const wxString& name = wxButtonNameStr)
36 : wxGenericCommandLinkButton()
37 {
38 Create(parent, id, mainLabel, note, pos, size, style, validator, name);
39 }
40
41 bool Create(wxWindow *parent,
42 wxWindowID id,
43 const wxString& mainLabel = wxEmptyString,
44 const wxString& note = wxEmptyString,
45 const wxPoint& pos = wxDefaultPosition,
46 const wxSize& size = wxDefaultSize,
47 long style = 0,
48 const wxValidator& validator = wxDefaultValidator,
49 const wxString& name = wxButtonNameStr);
50
51 // overridden base class methods
52 // -----------------------------
53
54 // do the same thing as in the generic case here
55 virtual void SetLabel(const wxString& label)
56 {
57 SetMainLabelAndNote(label.BeforeFirst('\n'), label.AfterFirst('\n'));
58 }
59
60 virtual void SetMainLabelAndNote(const wxString& mainLabel,
61 const wxString& note);
62
63 virtual WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const;
64
65protected:
66 virtual wxSize DoGetBestSize() const;
67
68 virtual bool HasNativeBitmap() const;
69
70private:
71 wxDECLARE_DYNAMIC_CLASS_NO_COPY(wxCommandLinkButton);
72};
73
74#endif // _WX_MSW_COMMANDLINKBUTTON_H_