]> git.saurik.com Git - wxWidgets.git/blob - include/wx/ribbon/control.h
set up for OpenVMS richtext & regex and add more samples in compile cascade
[wxWidgets.git] / include / wx / ribbon / control.h
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
22 class wxRibbonArtProvider;
23
24 class WXDLLIMPEXP_RIBBON wxRibbonControl : public wxControl
25 {
26 public:
27 wxRibbonControl() { m_art = NULL; }
28
29 wxRibbonControl(wxWindow *parent, wxWindowID id,
30 const wxPoint& pos = wxDefaultPosition,
31 const wxSize& size = wxDefaultSize, long style = 0,
32 const wxValidator& validator = wxDefaultValidator,
33 const wxString& name = wxControlNameStr);
34
35 virtual void SetArtProvider(wxRibbonArtProvider* art);
36 wxRibbonArtProvider* GetArtProvider() const {return m_art;}
37
38 virtual bool IsSizingContinuous() const {return true;}
39 wxSize GetNextSmallerSize(wxOrientation direction, wxSize relative_to) const;
40 wxSize GetNextLargerSize(wxOrientation direction, wxSize relative_to) const;
41 wxSize GetNextSmallerSize(wxOrientation direction) const;
42 wxSize GetNextLargerSize(wxOrientation direction) const;
43
44 virtual bool Realize();
45 bool Realise() {return Realize();}
46
47 protected:
48 wxRibbonArtProvider* m_art;
49
50 virtual wxSize DoGetNextSmallerSize(wxOrientation direction,
51 wxSize relative_to) const;
52 virtual wxSize DoGetNextLargerSize(wxOrientation direction,
53 wxSize relative_to) const;
54
55 #ifndef SWIG
56 DECLARE_CLASS(wxRibbonControl)
57 #endif
58 };
59
60 WX_DEFINE_USER_EXPORTED_ARRAY(wxRibbonControl*, wxArrayRibbonControl, class WXDLLIMPEXP_RIBBON);
61
62 #endif // wxUSE_RIBBON
63
64 #endif // _WX_RIBBON_CONTROL_H_