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