1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: wx/ribbon/art.h
3 // Purpose: Art providers for ribbon-bar-style interface
4 // Author: Peter Cawley
8 // Copyright: (C) Peter Cawley
9 // Licence: wxWindows licence
10 ///////////////////////////////////////////////////////////////////////////////
12 #ifndef _WX_RIBBON_ART_H_
13 #define _WX_RIBBON_ART_H_
20 #include "wx/colour.h"
23 #include "wx/bitmap.h"
25 class WXDLLIMPEXP_FWD_CORE wxDC
;
26 class WXDLLIMPEXP_FWD_CORE wxWindow
;
28 enum wxRibbonArtSetting
30 wxRIBBON_ART_TAB_SEPARATION_SIZE
,
31 wxRIBBON_ART_PAGE_BORDER_LEFT_SIZE
,
32 wxRIBBON_ART_PAGE_BORDER_TOP_SIZE
,
33 wxRIBBON_ART_PAGE_BORDER_RIGHT_SIZE
,
34 wxRIBBON_ART_PAGE_BORDER_BOTTOM_SIZE
,
35 wxRIBBON_ART_PANEL_X_SEPARATION_SIZE
,
36 wxRIBBON_ART_PANEL_Y_SEPARATION_SIZE
,
37 wxRIBBON_ART_TOOL_GROUP_SEPARATION_SIZE
,
38 wxRIBBON_ART_GALLERY_BITMAP_PADDING_LEFT_SIZE
,
39 wxRIBBON_ART_GALLERY_BITMAP_PADDING_RIGHT_SIZE
,
40 wxRIBBON_ART_GALLERY_BITMAP_PADDING_TOP_SIZE
,
41 wxRIBBON_ART_GALLERY_BITMAP_PADDING_BOTTOM_SIZE
,
42 wxRIBBON_ART_PANEL_LABEL_FONT
,
43 wxRIBBON_ART_BUTTON_BAR_LABEL_FONT
,
44 wxRIBBON_ART_TAB_LABEL_FONT
,
45 wxRIBBON_ART_BUTTON_BAR_LABEL_COLOUR
,
46 wxRIBBON_ART_BUTTON_BAR_HOVER_BORDER_COLOUR
,
47 wxRIBBON_ART_BUTTON_BAR_HOVER_BACKGROUND_TOP_COLOUR
,
48 wxRIBBON_ART_BUTTON_BAR_HOVER_BACKGROUND_TOP_GRADIENT_COLOUR
,
49 wxRIBBON_ART_BUTTON_BAR_HOVER_BACKGROUND_COLOUR
,
50 wxRIBBON_ART_BUTTON_BAR_HOVER_BACKGROUND_GRADIENT_COLOUR
,
51 wxRIBBON_ART_BUTTON_BAR_ACTIVE_BORDER_COLOUR
,
52 wxRIBBON_ART_BUTTON_BAR_ACTIVE_BACKGROUND_TOP_COLOUR
,
53 wxRIBBON_ART_BUTTON_BAR_ACTIVE_BACKGROUND_TOP_GRADIENT_COLOUR
,
54 wxRIBBON_ART_BUTTON_BAR_ACTIVE_BACKGROUND_COLOUR
,
55 wxRIBBON_ART_BUTTON_BAR_ACTIVE_BACKGROUND_GRADIENT_COLOUR
,
56 wxRIBBON_ART_GALLERY_BORDER_COLOUR
,
57 wxRIBBON_ART_GALLERY_HOVER_BACKGROUND_COLOUR
,
58 wxRIBBON_ART_GALLERY_BUTTON_BACKGROUND_COLOUR
,
59 wxRIBBON_ART_GALLERY_BUTTON_BACKGROUND_GRADIENT_COLOUR
,
60 wxRIBBON_ART_GALLERY_BUTTON_BACKGROUND_TOP_COLOUR
,
61 wxRIBBON_ART_GALLERY_BUTTON_FACE_COLOUR
,
62 wxRIBBON_ART_GALLERY_BUTTON_HOVER_BACKGROUND_COLOUR
,
63 wxRIBBON_ART_GALLERY_BUTTON_HOVER_BACKGROUND_GRADIENT_COLOUR
,
64 wxRIBBON_ART_GALLERY_BUTTON_HOVER_BACKGROUND_TOP_COLOUR
,
65 wxRIBBON_ART_GALLERY_BUTTON_HOVER_FACE_COLOUR
,
66 wxRIBBON_ART_GALLERY_BUTTON_ACTIVE_BACKGROUND_COLOUR
,
67 wxRIBBON_ART_GALLERY_BUTTON_ACTIVE_BACKGROUND_GRADIENT_COLOUR
,
68 wxRIBBON_ART_GALLERY_BUTTON_ACTIVE_BACKGROUND_TOP_COLOUR
,
69 wxRIBBON_ART_GALLERY_BUTTON_ACTIVE_FACE_COLOUR
,
70 wxRIBBON_ART_GALLERY_BUTTON_DISABLED_BACKGROUND_COLOUR
,
71 wxRIBBON_ART_GALLERY_BUTTON_DISABLED_BACKGROUND_GRADIENT_COLOUR
,
72 wxRIBBON_ART_GALLERY_BUTTON_DISABLED_BACKGROUND_TOP_COLOUR
,
73 wxRIBBON_ART_GALLERY_BUTTON_DISABLED_FACE_COLOUR
,
74 wxRIBBON_ART_GALLERY_ITEM_BORDER_COLOUR
,
75 wxRIBBON_ART_TAB_LABEL_COLOUR
,
76 wxRIBBON_ART_TAB_SEPARATOR_COLOUR
,
77 wxRIBBON_ART_TAB_SEPARATOR_GRADIENT_COLOUR
,
78 wxRIBBON_ART_TAB_CTRL_BACKGROUND_COLOUR
,
79 wxRIBBON_ART_TAB_CTRL_BACKGROUND_GRADIENT_COLOUR
,
80 wxRIBBON_ART_TAB_HOVER_BACKGROUND_TOP_COLOUR
,
81 wxRIBBON_ART_TAB_HOVER_BACKGROUND_TOP_GRADIENT_COLOUR
,
82 wxRIBBON_ART_TAB_HOVER_BACKGROUND_COLOUR
,
83 wxRIBBON_ART_TAB_HOVER_BACKGROUND_GRADIENT_COLOUR
,
84 wxRIBBON_ART_TAB_ACTIVE_BACKGROUND_TOP_COLOUR
,
85 wxRIBBON_ART_TAB_ACTIVE_BACKGROUND_TOP_GRADIENT_COLOUR
,
86 wxRIBBON_ART_TAB_ACTIVE_BACKGROUND_COLOUR
,
87 wxRIBBON_ART_TAB_ACTIVE_BACKGROUND_GRADIENT_COLOUR
,
88 wxRIBBON_ART_TAB_BORDER_COLOUR
,
89 wxRIBBON_ART_PANEL_BORDER_COLOUR
,
90 wxRIBBON_ART_PANEL_BORDER_GRADIENT_COLOUR
,
91 wxRIBBON_ART_PANEL_MINIMISED_BORDER_COLOUR
,
92 wxRIBBON_ART_PANEL_MINIMISED_BORDER_GRADIENT_COLOUR
,
93 wxRIBBON_ART_PANEL_LABEL_BACKGROUND_COLOUR
,
94 wxRIBBON_ART_PANEL_LABEL_BACKGROUND_GRADIENT_COLOUR
,
95 wxRIBBON_ART_PANEL_LABEL_COLOUR
,
96 wxRIBBON_ART_PANEL_HOVER_LABEL_BACKGROUND_COLOUR
,
97 wxRIBBON_ART_PANEL_HOVER_LABEL_BACKGROUND_GRADIENT_COLOUR
,
98 wxRIBBON_ART_PANEL_HOVER_LABEL_COLOUR
,
99 wxRIBBON_ART_PANEL_MINIMISED_LABEL_COLOUR
,
100 wxRIBBON_ART_PANEL_ACTIVE_BACKGROUND_TOP_COLOUR
,
101 wxRIBBON_ART_PANEL_ACTIVE_BACKGROUND_TOP_GRADIENT_COLOUR
,
102 wxRIBBON_ART_PANEL_ACTIVE_BACKGROUND_COLOUR
,
103 wxRIBBON_ART_PANEL_ACTIVE_BACKGROUND_GRADIENT_COLOUR
,
104 wxRIBBON_ART_PANEL_BUTTON_FACE_COLOUR
,
105 wxRIBBON_ART_PANEL_BUTTON_HOVER_FACE_COLOUR
,
106 wxRIBBON_ART_PAGE_BORDER_COLOUR
,
107 wxRIBBON_ART_PAGE_BACKGROUND_TOP_COLOUR
,
108 wxRIBBON_ART_PAGE_BACKGROUND_TOP_GRADIENT_COLOUR
,
109 wxRIBBON_ART_PAGE_BACKGROUND_COLOUR
,
110 wxRIBBON_ART_PAGE_BACKGROUND_GRADIENT_COLOUR
,
111 wxRIBBON_ART_PAGE_HOVER_BACKGROUND_TOP_COLOUR
,
112 wxRIBBON_ART_PAGE_HOVER_BACKGROUND_TOP_GRADIENT_COLOUR
,
113 wxRIBBON_ART_PAGE_HOVER_BACKGROUND_COLOUR
,
114 wxRIBBON_ART_PAGE_HOVER_BACKGROUND_GRADIENT_COLOUR
,
115 wxRIBBON_ART_TOOLBAR_BORDER_COLOUR
,
116 wxRIBBON_ART_TOOLBAR_HOVER_BORDER_COLOUR
,
117 wxRIBBON_ART_TOOLBAR_FACE_COLOUR
,
118 wxRIBBON_ART_TOOL_BACKGROUND_TOP_COLOUR
,
119 wxRIBBON_ART_TOOL_BACKGROUND_TOP_GRADIENT_COLOUR
,
120 wxRIBBON_ART_TOOL_BACKGROUND_COLOUR
,
121 wxRIBBON_ART_TOOL_BACKGROUND_GRADIENT_COLOUR
,
122 wxRIBBON_ART_TOOL_HOVER_BACKGROUND_TOP_COLOUR
,
123 wxRIBBON_ART_TOOL_HOVER_BACKGROUND_TOP_GRADIENT_COLOUR
,
124 wxRIBBON_ART_TOOL_HOVER_BACKGROUND_COLOUR
,
125 wxRIBBON_ART_TOOL_HOVER_BACKGROUND_GRADIENT_COLOUR
,
126 wxRIBBON_ART_TOOL_ACTIVE_BACKGROUND_TOP_COLOUR
,
127 wxRIBBON_ART_TOOL_ACTIVE_BACKGROUND_TOP_GRADIENT_COLOUR
,
128 wxRIBBON_ART_TOOL_ACTIVE_BACKGROUND_COLOUR
,
129 wxRIBBON_ART_TOOL_ACTIVE_BACKGROUND_GRADIENT_COLOUR
132 enum wxRibbonScrollButtonStyle
134 wxRIBBON_SCROLL_BTN_LEFT
= 0,
135 wxRIBBON_SCROLL_BTN_RIGHT
= 1,
136 wxRIBBON_SCROLL_BTN_UP
= 2,
137 wxRIBBON_SCROLL_BTN_DOWN
= 3,
139 wxRIBBON_SCROLL_BTN_DIRECTION_MASK
= 3,
141 wxRIBBON_SCROLL_BTN_NORMAL
= 0,
142 wxRIBBON_SCROLL_BTN_HOVERED
= 4,
143 wxRIBBON_SCROLL_BTN_ACTIVE
= 8,
145 wxRIBBON_SCROLL_BTN_STATE_MASK
= 12,
147 wxRIBBON_SCROLL_BTN_FOR_OTHER
= 0,
148 wxRIBBON_SCROLL_BTN_FOR_TABS
= 16,
149 wxRIBBON_SCROLL_BTN_FOR_PAGE
= 32,
151 wxRIBBON_SCROLL_BTN_FOR_MASK
= 48
154 enum wxRibbonButtonKind
156 wxRIBBON_BUTTON_NORMAL
= 1 << 0,
157 wxRIBBON_BUTTON_DROPDOWN
= 1 << 1,
158 wxRIBBON_BUTTON_HYBRID
= wxRIBBON_BUTTON_NORMAL
| wxRIBBON_BUTTON_DROPDOWN
,
159 wxRIBBON_BUTTON_TOGGLE
= 1 << 2
162 enum wxRibbonButtonBarButtonState
164 wxRIBBON_BUTTONBAR_BUTTON_SMALL
= 0 << 0,
165 wxRIBBON_BUTTONBAR_BUTTON_MEDIUM
= 1 << 0,
166 wxRIBBON_BUTTONBAR_BUTTON_LARGE
= 2 << 0,
167 wxRIBBON_BUTTONBAR_BUTTON_SIZE_MASK
= 3 << 0,
169 wxRIBBON_BUTTONBAR_BUTTON_NORMAL_HOVERED
= 1 << 3,
170 wxRIBBON_BUTTONBAR_BUTTON_DROPDOWN_HOVERED
= 1 << 4,
171 wxRIBBON_BUTTONBAR_BUTTON_HOVER_MASK
= wxRIBBON_BUTTONBAR_BUTTON_NORMAL_HOVERED
| wxRIBBON_BUTTONBAR_BUTTON_DROPDOWN_HOVERED
,
172 wxRIBBON_BUTTONBAR_BUTTON_NORMAL_ACTIVE
= 1 << 5,
173 wxRIBBON_BUTTONBAR_BUTTON_DROPDOWN_ACTIVE
= 1 << 6,
174 wxRIBBON_BUTTONBAR_BUTTON_ACTIVE_MASK
= wxRIBBON_BUTTONBAR_BUTTON_NORMAL_ACTIVE
| wxRIBBON_BUTTONBAR_BUTTON_DROPDOWN_ACTIVE
,
175 wxRIBBON_BUTTONBAR_BUTTON_DISABLED
= 1 << 7,
176 wxRIBBON_BUTTONBAR_BUTTON_TOGGLED
= 1 << 8,
177 wxRIBBON_BUTTONBAR_BUTTON_STATE_MASK
= 0x1F8
180 enum wxRibbonGalleryButtonState
182 wxRIBBON_GALLERY_BUTTON_NORMAL
,
183 wxRIBBON_GALLERY_BUTTON_HOVERED
,
184 wxRIBBON_GALLERY_BUTTON_ACTIVE
,
185 wxRIBBON_GALLERY_BUTTON_DISABLED
190 class wxRibbonGallery
;
191 class wxRibbonGalleryItem
;
192 class wxRibbonPageTabInfo
;
193 class wxRibbonPageTabInfoArray
;
195 class WXDLLIMPEXP_RIBBON wxRibbonArtProvider
198 wxRibbonArtProvider();
199 virtual ~wxRibbonArtProvider();
201 virtual wxRibbonArtProvider
* Clone() const = 0;
202 virtual void SetFlags(long flags
) = 0;
203 virtual long GetFlags() const = 0;
205 virtual int GetMetric(int id
) const = 0;
206 virtual void SetMetric(int id
, int new_val
) = 0;
207 virtual void SetFont(int id
, const wxFont
& font
) = 0;
208 virtual wxFont
GetFont(int id
) const = 0;
209 virtual wxColour
GetColour(int id
) const = 0;
210 virtual void SetColour(int id
, const wxColor
& colour
) = 0;
211 wxColour
GetColor(int id
) const { return GetColour(id
); }
212 void SetColor(int id
, const wxColour
& color
) { SetColour(id
, color
); }
213 virtual void GetColourScheme(wxColour
* primary
,
215 wxColour
* tertiary
) const = 0;
216 virtual void SetColourScheme(const wxColour
& primary
,
217 const wxColour
& secondary
,
218 const wxColour
& tertiary
) = 0;
220 virtual void DrawTabCtrlBackground(
223 const wxRect
& rect
) = 0;
225 virtual void DrawTab(wxDC
& dc
,
227 const wxRibbonPageTabInfo
& tab
) = 0;
229 virtual void DrawTabSeparator(wxDC
& dc
,
232 double visibility
) = 0;
234 virtual void DrawPageBackground(
237 const wxRect
& rect
) = 0;
239 virtual void DrawScrollButton(
245 virtual void DrawPanelBackground(
248 const wxRect
& rect
) = 0;
250 virtual void DrawGalleryBackground(
252 wxRibbonGallery
* wnd
,
253 const wxRect
& rect
) = 0;
255 virtual void DrawGalleryItemBackground(
257 wxRibbonGallery
* wnd
,
259 wxRibbonGalleryItem
* item
) = 0;
261 virtual void DrawMinimisedPanel(
265 wxBitmap
& bitmap
) = 0;
267 virtual void DrawButtonBarBackground(
270 const wxRect
& rect
) = 0;
272 virtual void DrawButtonBarButton(
276 wxRibbonButtonKind kind
,
278 const wxString
& label
,
279 const wxBitmap
& bitmap_large
,
280 const wxBitmap
& bitmap_small
) = 0;
282 virtual void DrawToolBarBackground(
285 const wxRect
& rect
) = 0;
287 virtual void DrawToolGroupBackground(
290 const wxRect
& rect
) = 0;
292 virtual void DrawTool(
296 const wxBitmap
& bitmap
,
297 wxRibbonButtonKind kind
,
300 virtual void GetBarTabWidth(
303 const wxString
& label
,
304 const wxBitmap
& bitmap
,
306 int* small_begin_need_separator
,
307 int* small_must_have_separator
,
310 virtual int GetTabCtrlHeight(
313 const wxRibbonPageTabInfoArray
& pages
) = 0;
315 virtual wxSize
GetScrollButtonMinimumSize(
320 virtual wxSize
GetPanelSize(
322 const wxRibbonPanel
* wnd
,
324 wxPoint
* client_offset
) = 0;
326 virtual wxSize
GetPanelClientSize(
328 const wxRibbonPanel
* wnd
,
330 wxPoint
* client_offset
) = 0;
332 virtual wxRect
GetPanelExtButtonArea(
334 const wxRibbonPanel
* wnd
,
337 virtual wxSize
GetGallerySize(
339 const wxRibbonGallery
* wnd
,
340 wxSize client_size
) = 0;
342 virtual wxSize
GetGalleryClientSize(
344 const wxRibbonGallery
* wnd
,
346 wxPoint
* client_offset
,
347 wxRect
* scroll_up_button
,
348 wxRect
* scroll_down_button
,
349 wxRect
* extension_button
) = 0;
351 virtual wxRect
GetPageBackgroundRedrawArea(
353 const wxRibbonPage
* wnd
,
354 wxSize page_old_size
,
355 wxSize page_new_size
) = 0;
357 virtual bool GetButtonBarButtonSize(
360 wxRibbonButtonKind kind
,
361 wxRibbonButtonBarButtonState size
,
362 const wxString
& label
,
363 wxSize bitmap_size_large
,
364 wxSize bitmap_size_small
,
366 wxRect
* normal_region
,
367 wxRect
* dropdown_region
) = 0;
369 virtual wxSize
GetMinimisedPanelMinimumSize(
371 const wxRibbonPanel
* wnd
,
372 wxSize
* desired_bitmap_size
,
373 wxDirection
* expanded_panel_direction
) = 0;
375 virtual wxSize
GetToolSize(
379 wxRibbonButtonKind kind
,
382 wxRect
* dropdown_region
) = 0;
385 class WXDLLIMPEXP_RIBBON wxRibbonMSWArtProvider
: public wxRibbonArtProvider
388 wxRibbonMSWArtProvider(bool set_colour_scheme
= true);
389 virtual ~wxRibbonMSWArtProvider();
391 wxRibbonArtProvider
* Clone() const;
392 void SetFlags(long flags
);
393 long GetFlags() const;
395 int GetMetric(int id
) const;
396 void SetMetric(int id
, int new_val
);
397 void SetFont(int id
, const wxFont
& font
);
398 wxFont
GetFont(int id
) const;
399 wxColour
GetColour(int id
) const;
400 void SetColour(int id
, const wxColor
& colour
);
401 void GetColourScheme(wxColour
* primary
,
403 wxColour
* tertiary
) const;
404 void SetColourScheme(const wxColour
& primary
,
405 const wxColour
& secondary
,
406 const wxColour
& tertiary
);
408 int GetTabCtrlHeight(
411 const wxRibbonPageTabInfoArray
& pages
);
413 void DrawTabCtrlBackground(
418 void DrawTab(wxDC
& dc
,
420 const wxRibbonPageTabInfo
& tab
);
422 void DrawTabSeparator(
428 void DrawPageBackground(
433 void DrawScrollButton(
439 void DrawPanelBackground(
444 void DrawGalleryBackground(
446 wxRibbonGallery
* wnd
,
449 void DrawGalleryItemBackground(
451 wxRibbonGallery
* wnd
,
453 wxRibbonGalleryItem
* item
);
455 void DrawMinimisedPanel(
461 void DrawButtonBarBackground(
466 void DrawButtonBarButton(
470 wxRibbonButtonKind kind
,
472 const wxString
& label
,
473 const wxBitmap
& bitmap_large
,
474 const wxBitmap
& bitmap_small
);
476 void DrawToolBarBackground(
481 void DrawToolGroupBackground(
490 const wxBitmap
& bitmap
,
491 wxRibbonButtonKind kind
,
497 const wxString
& label
,
498 const wxBitmap
& bitmap
,
500 int* small_begin_need_separator
,
501 int* small_must_have_separator
,
504 wxSize
GetScrollButtonMinimumSize(
511 const wxRibbonPanel
* wnd
,
513 wxPoint
* client_offset
);
515 wxSize
GetPanelClientSize(
517 const wxRibbonPanel
* wnd
,
519 wxPoint
* client_offset
);
521 wxRect
GetPanelExtButtonArea(
523 const wxRibbonPanel
* wnd
,
526 wxSize
GetGallerySize(
528 const wxRibbonGallery
* wnd
,
531 wxSize
GetGalleryClientSize(
533 const wxRibbonGallery
* wnd
,
535 wxPoint
* client_offset
,
536 wxRect
* scroll_up_button
,
537 wxRect
* scroll_down_button
,
538 wxRect
* extension_button
);
540 wxRect
GetPageBackgroundRedrawArea(
542 const wxRibbonPage
* wnd
,
543 wxSize page_old_size
,
544 wxSize page_new_size
);
546 bool GetButtonBarButtonSize(
549 wxRibbonButtonKind kind
,
550 wxRibbonButtonBarButtonState size
,
551 const wxString
& label
,
552 wxSize bitmap_size_large
,
553 wxSize bitmap_size_small
,
555 wxRect
* normal_region
,
556 wxRect
* dropdown_region
);
558 wxSize
GetMinimisedPanelMinimumSize(
560 const wxRibbonPanel
* wnd
,
561 wxSize
* desired_bitmap_size
,
562 wxDirection
* expanded_panel_direction
);
568 wxRibbonButtonKind kind
,
571 wxRect
* dropdown_region
);
574 void ReallyDrawTabSeparator(wxWindow
* wnd
, const wxRect
& rect
, double visibility
);
575 void DrawPartialPageBackground(wxDC
& dc
, wxWindow
* wnd
, const wxRect
& rect
,
576 bool allow_hovered
= true);
577 void DrawPartialPageBackground(wxDC
& dc
, wxWindow
* wnd
, const wxRect
& rect
,
578 wxRibbonPage
* page
, wxPoint offset
, bool hovered
= false);
579 void DrawPanelBorder(wxDC
& dc
, const wxRect
& rect
, wxPen
& primary_colour
,
580 wxPen
& secondary_colour
);
581 void RemovePanelPadding(wxRect
* rect
);
582 void DrawDropdownArrow(wxDC
& dc
, int x
, int y
, const wxColour
& colour
);
583 void DrawGalleryBackgroundCommon(wxDC
& dc
, wxRibbonGallery
* wnd
,
585 virtual void DrawGalleryButton(wxDC
& dc
, wxRect rect
,
586 wxRibbonGalleryButtonState state
, wxBitmap
* bitmaps
);
587 void DrawButtonBarButtonForeground(
590 wxRibbonButtonKind kind
,
592 const wxString
& label
,
593 const wxBitmap
& bitmap_large
,
594 const wxBitmap
& bitmap_small
);
595 void DrawMinimisedPanelCommon(
599 wxRect
* preview_rect
);
600 void CloneTo(wxRibbonMSWArtProvider
* copy
) const;
602 wxBitmap m_cached_tab_separator
;
603 wxBitmap m_gallery_up_bitmap
[4];
604 wxBitmap m_gallery_down_bitmap
[4];
605 wxBitmap m_gallery_extension_bitmap
[4];
606 wxBitmap m_toolbar_drop_bitmap
;
607 wxBitmap m_panel_extension_bitmap
[2];
609 wxColour m_primary_scheme_colour
;
610 wxColour m_secondary_scheme_colour
;
611 wxColour m_tertiary_scheme_colour
;
613 wxColour m_button_bar_label_colour
;
614 wxColour m_tab_label_colour
;
615 wxColour m_tab_separator_colour
;
616 wxColour m_tab_separator_gradient_colour
;
617 wxColour m_tab_active_background_colour
;
618 wxColour m_tab_active_background_gradient_colour
;
619 wxColour m_tab_hover_background_colour
;
620 wxColour m_tab_hover_background_gradient_colour
;
621 wxColour m_tab_hover_background_top_colour
;
622 wxColour m_tab_hover_background_top_gradient_colour
;
623 wxColour m_panel_label_colour
;
624 wxColour m_panel_minimised_label_colour
;
625 wxColour m_panel_hover_label_colour
;
626 wxColour m_panel_active_background_colour
;
627 wxColour m_panel_active_background_gradient_colour
;
628 wxColour m_panel_active_background_top_colour
;
629 wxColour m_panel_active_background_top_gradient_colour
;
630 wxColour m_panel_button_face_colour
;
631 wxColour m_panel_button_hover_face_colour
;
632 wxColour m_page_background_colour
;
633 wxColour m_page_background_gradient_colour
;
634 wxColour m_page_background_top_colour
;
635 wxColour m_page_background_top_gradient_colour
;
636 wxColour m_page_hover_background_colour
;
637 wxColour m_page_hover_background_gradient_colour
;
638 wxColour m_page_hover_background_top_colour
;
639 wxColour m_page_hover_background_top_gradient_colour
;
640 wxColour m_button_bar_hover_background_colour
;
641 wxColour m_button_bar_hover_background_gradient_colour
;
642 wxColour m_button_bar_hover_background_top_colour
;
643 wxColour m_button_bar_hover_background_top_gradient_colour
;
644 wxColour m_button_bar_active_background_colour
;
645 wxColour m_button_bar_active_background_gradient_colour
;
646 wxColour m_button_bar_active_background_top_colour
;
647 wxColour m_button_bar_active_background_top_gradient_colour
;
648 wxColour m_gallery_button_background_colour
;
649 wxColour m_gallery_button_background_gradient_colour
;
650 wxColour m_gallery_button_hover_background_colour
;
651 wxColour m_gallery_button_hover_background_gradient_colour
;
652 wxColour m_gallery_button_active_background_colour
;
653 wxColour m_gallery_button_active_background_gradient_colour
;
654 wxColour m_gallery_button_disabled_background_colour
;
655 wxColour m_gallery_button_disabled_background_gradient_colour
;
656 wxColour m_gallery_button_face_colour
;
657 wxColour m_gallery_button_hover_face_colour
;
658 wxColour m_gallery_button_active_face_colour
;
659 wxColour m_gallery_button_disabled_face_colour
;
661 wxColour m_tool_face_colour
;
662 wxColour m_tool_background_top_colour
;
663 wxColour m_tool_background_top_gradient_colour
;
664 wxColour m_tool_background_colour
;
665 wxColour m_tool_background_gradient_colour
;
666 wxColour m_tool_hover_background_top_colour
;
667 wxColour m_tool_hover_background_top_gradient_colour
;
668 wxColour m_tool_hover_background_colour
;
669 wxColour m_tool_hover_background_gradient_colour
;
670 wxColour m_tool_active_background_top_colour
;
671 wxColour m_tool_active_background_top_gradient_colour
;
672 wxColour m_tool_active_background_colour
;
673 wxColour m_tool_active_background_gradient_colour
;
675 wxBrush m_tab_ctrl_background_brush
;
676 wxBrush m_panel_label_background_brush
;
677 wxBrush m_panel_hover_label_background_brush
;
678 wxBrush m_panel_hover_button_background_brush
;
679 wxBrush m_gallery_hover_background_brush
;
680 wxBrush m_gallery_button_background_top_brush
;
681 wxBrush m_gallery_button_hover_background_top_brush
;
682 wxBrush m_gallery_button_active_background_top_brush
;
683 wxBrush m_gallery_button_disabled_background_top_brush
;
685 wxFont m_tab_label_font
;
686 wxFont m_panel_label_font
;
687 wxFont m_button_bar_label_font
;
689 wxPen m_page_border_pen
;
690 wxPen m_panel_border_pen
;
691 wxPen m_panel_border_gradient_pen
;
692 wxPen m_panel_minimised_border_pen
;
693 wxPen m_panel_minimised_border_gradient_pen
;
694 wxPen m_panel_hover_button_border_pen
;
695 wxPen m_tab_border_pen
;
696 wxPen m_button_bar_hover_border_pen
;
697 wxPen m_button_bar_active_border_pen
;
698 wxPen m_gallery_border_pen
;
699 wxPen m_gallery_item_border_pen
;
700 wxPen m_toolbar_border_pen
;
702 double m_cached_tab_separator_visibility
;
705 int m_tab_separation_size
;
706 int m_page_border_left
;
707 int m_page_border_top
;
708 int m_page_border_right
;
709 int m_page_border_bottom
;
710 int m_panel_x_separation_size
;
711 int m_panel_y_separation_size
;
712 int m_tool_group_separation_size
;
713 int m_gallery_bitmap_padding_left_size
;
714 int m_gallery_bitmap_padding_right_size
;
715 int m_gallery_bitmap_padding_top_size
;
716 int m_gallery_bitmap_padding_bottom_size
;
719 class WXDLLIMPEXP_RIBBON wxRibbonAUIArtProvider
: public wxRibbonMSWArtProvider
722 wxRibbonAUIArtProvider();
723 virtual ~wxRibbonAUIArtProvider();
725 wxRibbonArtProvider
* Clone() const;
727 wxColour
GetColour(int id
) const;
728 void SetColour(int id
, const wxColor
& colour
);
729 void SetColourScheme(const wxColour
& primary
,
730 const wxColour
& secondary
,
731 const wxColour
& tertiary
);
732 void SetFont(int id
, const wxFont
& font
);
734 wxSize
GetScrollButtonMinimumSize(
739 void DrawScrollButton(
747 const wxRibbonPanel
* wnd
,
749 wxPoint
* client_offset
);
751 wxSize
GetPanelClientSize(
753 const wxRibbonPanel
* wnd
,
755 wxPoint
* client_offset
);
757 wxRect
GetPanelExtButtonArea(
759 const wxRibbonPanel
* wnd
,
762 void DrawTabCtrlBackground(
767 int GetTabCtrlHeight(
770 const wxRibbonPageTabInfoArray
& pages
);
775 const wxString
& label
,
776 const wxBitmap
& bitmap
,
778 int* small_begin_need_separator
,
779 int* small_must_have_separator
,
782 void DrawTab(wxDC
& dc
,
784 const wxRibbonPageTabInfo
& tab
);
786 void DrawTabSeparator(
792 void DrawPageBackground(
797 void DrawPanelBackground(
802 void DrawMinimisedPanel(
808 void DrawGalleryBackground(
810 wxRibbonGallery
* wnd
,
813 void DrawGalleryItemBackground(
815 wxRibbonGallery
* wnd
,
817 wxRibbonGalleryItem
* item
);
819 void DrawButtonBarBackground(
824 void DrawButtonBarButton(
828 wxRibbonButtonKind kind
,
830 const wxString
& label
,
831 const wxBitmap
& bitmap_large
,
832 const wxBitmap
& bitmap_small
);
834 void DrawToolBarBackground(
839 void DrawToolGroupBackground(
848 const wxBitmap
& bitmap
,
849 wxRibbonButtonKind kind
,
853 void DrawPartialPanelBackground(wxDC
& dc
, wxWindow
* wnd
,
855 void DrawGalleryButton(wxDC
& dc
, wxRect rect
,
856 wxRibbonGalleryButtonState state
, wxBitmap
* bitmaps
);
858 wxColour m_tab_ctrl_background_colour
;
859 wxColour m_tab_ctrl_background_gradient_colour
;
860 wxColour m_panel_label_background_colour
;
861 wxColour m_panel_label_background_gradient_colour
;
862 wxColour m_panel_hover_label_background_colour
;
863 wxColour m_panel_hover_label_background_gradient_colour
;
865 wxBrush m_background_brush
;
866 wxBrush m_tab_active_top_background_brush
;
867 wxBrush m_tab_hover_background_brush
;
868 wxBrush m_button_bar_hover_background_brush
;
869 wxBrush m_button_bar_active_background_brush
;
870 wxBrush m_gallery_button_active_background_brush
;
871 wxBrush m_gallery_button_hover_background_brush
;
872 wxBrush m_gallery_button_disabled_background_brush
;
873 wxBrush m_tool_hover_background_brush
;
874 wxBrush m_tool_active_background_brush
;
876 wxPen m_toolbar_hover_borden_pen
;
878 wxFont m_tab_active_label_font
;
881 #if defined(__WXMSW__)
882 typedef wxRibbonMSWArtProvider wxRibbonDefaultArtProvider
;
883 #elif defined(__WXOSX_CARBON__) || \
884 defined(__WXOSX_COCOA__) || \
885 defined(__WXOSX_IPHONE__) || \
887 // TODO: Once implemented, change typedef to OSX
888 // typedef wxRibbonOSXArtProvider wxRibbonDefaultArtProvider;
889 typedef wxRibbonAUIArtProvider wxRibbonDefaultArtProvider
;
891 // TODO: Once implemented, change typedef to AUI
892 typedef wxRibbonAUIArtProvider wxRibbonDefaultArtProvider
;
895 #endif // wxUSE_RIBBON
897 #endif // _WX_RIBBON_ART_H_