]> git.saurik.com Git - wxWidgets.git/blame - include/wx/ribbon/control.h
Compilation fix for wxPreferencesPage.
[wxWidgets.git] / include / wx / ribbon / control.h
CommitLineData
3c3ead1d
PC
1///////////////////////////////////////////////////////////////////////////////
2// Name: wx/ribbon/control.h
3// Purpose: Extension of wxControl with common ribbon methods
4// Author: Peter Cawley
5// Modified by:
6// Created: 2009-06-05
7// RCS-ID: $Id$
8// Copyright: (C) Peter Cawley
9// Licence: wxWindows licence
10///////////////////////////////////////////////////////////////////////////////
11
12#ifndef _WX_RIBBON_CONTROL_H_
13#define _WX_RIBBON_CONTROL_H_
14
15#include "wx/defs.h"
16
17#if wxUSE_RIBBON
18
19#include "wx/control.h"
20#include "wx/dynarray.h"
21
07c72264 22class wxRibbonBar;
3c3ead1d
PC
23class wxRibbonArtProvider;
24
25class WXDLLIMPEXP_RIBBON wxRibbonControl : public wxControl
26{
27public:
fd6e1597 28 wxRibbonControl() { Init(); }
3c3ead1d
PC
29
30 wxRibbonControl(wxWindow *parent, wxWindowID id,
31 const wxPoint& pos = wxDefaultPosition,
32 const wxSize& size = wxDefaultSize, long style = 0,
33 const wxValidator& validator = wxDefaultValidator,
fd6e1597
VZ
34 const wxString& name = wxControlNameStr)
35 {
36 Init();
37
38 Create(parent, id, pos, size, style, validator, name);
39 }
40
41 bool Create(wxWindow *parent, wxWindowID id,
42 const wxPoint& pos = wxDefaultPosition,
43 const wxSize& size = wxDefaultSize, long style = 0,
44 const wxValidator& validator = wxDefaultValidator,
45 const wxString& name = wxControlNameStr);
3c3ead1d
PC
46
47 virtual void SetArtProvider(wxRibbonArtProvider* art);
48 wxRibbonArtProvider* GetArtProvider() const {return m_art;}
49
50 virtual bool IsSizingContinuous() const {return true;}
51 wxSize GetNextSmallerSize(wxOrientation direction, wxSize relative_to) const;
52 wxSize GetNextLargerSize(wxOrientation direction, wxSize relative_to) const;
53 wxSize GetNextSmallerSize(wxOrientation direction) const;
54 wxSize GetNextLargerSize(wxOrientation direction) const;
55
56 virtual bool Realize();
57 bool Realise() {return Realize();}
58
07c72264
VZ
59 virtual wxRibbonBar* GetAncestorRibbonBar()const;
60
98742322
JS
61 // Finds the best width and height given the parent's width and height
62 virtual wxSize GetBestSizeForParentSize(const wxSize& WXUNUSED(parentSize)) const { return GetBestSize(); }
63
3c3ead1d
PC
64protected:
65 wxRibbonArtProvider* m_art;
66
67 virtual wxSize DoGetNextSmallerSize(wxOrientation direction,
68 wxSize relative_to) const;
69 virtual wxSize DoGetNextLargerSize(wxOrientation direction,
70 wxSize relative_to) const;
71
fd6e1597
VZ
72private:
73 void Init() { m_art = NULL; }
74
3c3ead1d
PC
75#ifndef SWIG
76 DECLARE_CLASS(wxRibbonControl)
77#endif
78};
79
c155b9b5 80WX_DEFINE_USER_EXPORTED_ARRAY_PTR(wxRibbonControl*, wxArrayRibbonControl, class WXDLLIMPEXP_RIBBON);
3c3ead1d
PC
81
82#endif // wxUSE_RIBBON
83
84#endif // _WX_RIBBON_CONTROL_H_