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_PAGE_BORDER_COLOUR
,
105 wxRIBBON_ART_PAGE_BACKGROUND_TOP_COLOUR
,
106 wxRIBBON_ART_PAGE_BACKGROUND_TOP_GRADIENT_COLOUR
,
107 wxRIBBON_ART_PAGE_BACKGROUND_COLOUR
,
108 wxRIBBON_ART_PAGE_BACKGROUND_GRADIENT_COLOUR
,
109 wxRIBBON_ART_PAGE_HOVER_BACKGROUND_TOP_COLOUR
,
110 wxRIBBON_ART_PAGE_HOVER_BACKGROUND_TOP_GRADIENT_COLOUR
,
111 wxRIBBON_ART_PAGE_HOVER_BACKGROUND_COLOUR
,
112 wxRIBBON_ART_PAGE_HOVER_BACKGROUND_GRADIENT_COLOUR
,
113 wxRIBBON_ART_TOOLBAR_BORDER_COLOUR
,
114 wxRIBBON_ART_TOOLBAR_HOVER_BORDER_COLOUR
,
115 wxRIBBON_ART_TOOLBAR_FACE_COLOUR
,
116 wxRIBBON_ART_TOOL_BACKGROUND_TOP_COLOUR
,
117 wxRIBBON_ART_TOOL_BACKGROUND_TOP_GRADIENT_COLOUR
,
118 wxRIBBON_ART_TOOL_BACKGROUND_COLOUR
,
119 wxRIBBON_ART_TOOL_BACKGROUND_GRADIENT_COLOUR
,
120 wxRIBBON_ART_TOOL_HOVER_BACKGROUND_TOP_COLOUR
,
121 wxRIBBON_ART_TOOL_HOVER_BACKGROUND_TOP_GRADIENT_COLOUR
,
122 wxRIBBON_ART_TOOL_HOVER_BACKGROUND_COLOUR
,
123 wxRIBBON_ART_TOOL_HOVER_BACKGROUND_GRADIENT_COLOUR
,
124 wxRIBBON_ART_TOOL_ACTIVE_BACKGROUND_TOP_COLOUR
,
125 wxRIBBON_ART_TOOL_ACTIVE_BACKGROUND_TOP_GRADIENT_COLOUR
,
126 wxRIBBON_ART_TOOL_ACTIVE_BACKGROUND_COLOUR
,
127 wxRIBBON_ART_TOOL_ACTIVE_BACKGROUND_GRADIENT_COLOUR
,
130 enum wxRibbonScrollButtonStyle
132 wxRIBBON_SCROLL_BTN_LEFT
= 0,
133 wxRIBBON_SCROLL_BTN_RIGHT
= 1,
134 wxRIBBON_SCROLL_BTN_UP
= 2,
135 wxRIBBON_SCROLL_BTN_DOWN
= 3,
137 wxRIBBON_SCROLL_BTN_DIRECTION_MASK
= 3,
139 wxRIBBON_SCROLL_BTN_NORMAL
= 0,
140 wxRIBBON_SCROLL_BTN_HOVERED
= 4,
141 wxRIBBON_SCROLL_BTN_ACTIVE
= 8,
143 wxRIBBON_SCROLL_BTN_STATE_MASK
= 12,
145 wxRIBBON_SCROLL_BTN_FOR_OTHER
= 0,
146 wxRIBBON_SCROLL_BTN_FOR_TABS
= 16,
147 wxRIBBON_SCROLL_BTN_FOR_PAGE
= 32,
149 wxRIBBON_SCROLL_BTN_FOR_MASK
= 48,
152 enum wxRibbonButtonKind
154 wxRIBBON_BUTTON_NORMAL
= 1 << 0,
155 wxRIBBON_BUTTON_DROPDOWN
= 1 << 1,
156 wxRIBBON_BUTTON_HYBRID
= wxRIBBON_BUTTON_NORMAL
| wxRIBBON_BUTTON_DROPDOWN
,
159 enum wxRibbonButtonBarButtonState
161 wxRIBBON_BUTTONBAR_BUTTON_SMALL
= 0 << 0,
162 wxRIBBON_BUTTONBAR_BUTTON_MEDIUM
= 1 << 0,
163 wxRIBBON_BUTTONBAR_BUTTON_LARGE
= 2 << 0,
164 wxRIBBON_BUTTONBAR_BUTTON_SIZE_MASK
= 3 << 0,
166 wxRIBBON_BUTTONBAR_BUTTON_NORMAL_HOVERED
= 1 << 3,
167 wxRIBBON_BUTTONBAR_BUTTON_DROPDOWN_HOVERED
= 1 << 4,
168 wxRIBBON_BUTTONBAR_BUTTON_HOVER_MASK
= wxRIBBON_BUTTONBAR_BUTTON_NORMAL_HOVERED
| wxRIBBON_BUTTONBAR_BUTTON_DROPDOWN_HOVERED
,
169 wxRIBBON_BUTTONBAR_BUTTON_NORMAL_ACTIVE
= 1 << 5,
170 wxRIBBON_BUTTONBAR_BUTTON_DROPDOWN_ACTIVE
= 1 << 6,
171 wxRIBBON_BUTTONBAR_BUTTON_ACTIVE_MASK
= wxRIBBON_BUTTONBAR_BUTTON_NORMAL_ACTIVE
| wxRIBBON_BUTTONBAR_BUTTON_DROPDOWN_ACTIVE
,
172 wxRIBBON_BUTTONBAR_BUTTON_DISABLED
= 1 << 7,
173 wxRIBBON_BUTTONBAR_BUTTON_STATE_MASK
= 0xF8,
176 enum wxRibbonGalleryButtonState
178 wxRIBBON_GALLERY_BUTTON_NORMAL
,
179 wxRIBBON_GALLERY_BUTTON_HOVERED
,
180 wxRIBBON_GALLERY_BUTTON_ACTIVE
,
181 wxRIBBON_GALLERY_BUTTON_DISABLED
,
186 class wxRibbonGallery
;
187 class wxRibbonGalleryItem
;
188 class wxRibbonPageTabInfo
;
189 class wxRibbonPageTabInfoArray
;
191 class WXDLLIMPEXP_RIBBON wxRibbonArtProvider
194 wxRibbonArtProvider();
195 virtual ~wxRibbonArtProvider();
197 virtual wxRibbonArtProvider
* Clone() const = 0;
198 virtual void SetFlags(long flags
) = 0;
199 virtual long GetFlags() const = 0;
201 virtual int GetMetric(int id
) const = 0;
202 virtual void SetMetric(int id
, int new_val
) = 0;
203 virtual void SetFont(int id
, const wxFont
& font
) = 0;
204 virtual wxFont
GetFont(int id
) const = 0;
205 virtual wxColour
GetColour(int id
) const = 0;
206 virtual void SetColour(int id
, const wxColor
& colour
) = 0;
207 wxColour
GetColor(int id
) const { return GetColour(id
); }
208 void SetColor(int id
, const wxColour
& color
) { SetColour(id
, color
); }
209 virtual void GetColourScheme(wxColour
* primary
,
211 wxColour
* tertiary
) const = 0;
212 virtual void SetColourScheme(const wxColour
& primary
,
213 const wxColour
& secondary
,
214 const wxColour
& tertiary
) = 0;
216 virtual void DrawTabCtrlBackground(
219 const wxRect
& rect
) = 0;
221 virtual void DrawTab(wxDC
& dc
,
223 const wxRibbonPageTabInfo
& tab
) = 0;
225 virtual void DrawTabSeparator(wxDC
& dc
,
228 double visibility
) = 0;
230 virtual void DrawPageBackground(
233 const wxRect
& rect
) = 0;
235 virtual void DrawScrollButton(
241 virtual void DrawPanelBackground(
244 const wxRect
& rect
) = 0;
246 virtual void DrawGalleryBackground(
248 wxRibbonGallery
* wnd
,
249 const wxRect
& rect
) = 0;
251 virtual void DrawGalleryItemBackground(
253 wxRibbonGallery
* wnd
,
255 wxRibbonGalleryItem
* item
) = 0;
257 virtual void DrawMinimisedPanel(
261 wxBitmap
& bitmap
) = 0;
263 virtual void DrawButtonBarBackground(
266 const wxRect
& rect
) = 0;
268 virtual void DrawButtonBarButton(
272 wxRibbonButtonKind kind
,
274 const wxString
& label
,
275 const wxBitmap
& bitmap_large
,
276 const wxBitmap
& bitmap_small
) = 0;
278 virtual void DrawToolBarBackground(
281 const wxRect
& rect
) = 0;
283 virtual void DrawToolGroupBackground(
286 const wxRect
& rect
) = 0;
288 virtual void DrawTool(
292 const wxBitmap
& bitmap
,
293 wxRibbonButtonKind kind
,
296 virtual void GetBarTabWidth(
299 const wxString
& label
,
300 const wxBitmap
& bitmap
,
302 int* small_begin_need_separator
,
303 int* small_must_have_separator
,
306 virtual int GetTabCtrlHeight(
309 const wxRibbonPageTabInfoArray
& pages
) = 0;
311 virtual wxSize
GetScrollButtonMinimumSize(
316 virtual wxSize
GetPanelSize(
318 const wxRibbonPanel
* wnd
,
320 wxPoint
* client_offset
) = 0;
322 virtual wxSize
GetPanelClientSize(
324 const wxRibbonPanel
* wnd
,
326 wxPoint
* client_offset
) = 0;
328 virtual wxSize
GetGallerySize(
330 const wxRibbonGallery
* wnd
,
331 wxSize client_size
) = 0;
333 virtual wxSize
GetGalleryClientSize(
335 const wxRibbonGallery
* wnd
,
337 wxPoint
* client_offset
,
338 wxRect
* scroll_up_button
,
339 wxRect
* scroll_down_button
,
340 wxRect
* extension_button
) = 0;
342 virtual wxRect
GetPageBackgroundRedrawArea(
344 const wxRibbonPage
* wnd
,
345 wxSize page_old_size
,
346 wxSize page_new_size
) = 0;
348 virtual bool GetButtonBarButtonSize(
351 wxRibbonButtonKind kind
,
352 wxRibbonButtonBarButtonState size
,
353 const wxString
& label
,
354 wxSize bitmap_size_large
,
355 wxSize bitmap_size_small
,
357 wxRect
* normal_region
,
358 wxRect
* dropdown_region
) = 0;
360 virtual wxSize
GetMinimisedPanelMinimumSize(
362 const wxRibbonPanel
* wnd
,
363 wxSize
* desired_bitmap_size
,
364 wxDirection
* expanded_panel_direction
) = 0;
366 virtual wxSize
GetToolSize(
370 wxRibbonButtonKind kind
,
373 wxRect
* dropdown_region
) = 0;
376 class WXDLLIMPEXP_RIBBON wxRibbonMSWArtProvider
: public wxRibbonArtProvider
379 wxRibbonMSWArtProvider(bool set_colour_scheme
= true);
380 virtual ~wxRibbonMSWArtProvider();
382 wxRibbonArtProvider
* Clone() const;
383 void SetFlags(long flags
);
384 long GetFlags() const;
386 int GetMetric(int id
) const;
387 void SetMetric(int id
, int new_val
);
388 void SetFont(int id
, const wxFont
& font
);
389 wxFont
GetFont(int id
) const;
390 wxColour
GetColour(int id
) const;
391 void SetColour(int id
, const wxColor
& colour
);
392 void GetColourScheme(wxColour
* primary
,
394 wxColour
* tertiary
) const;
395 void SetColourScheme(const wxColour
& primary
,
396 const wxColour
& secondary
,
397 const wxColour
& tertiary
);
399 int GetTabCtrlHeight(
402 const wxRibbonPageTabInfoArray
& pages
);
404 void DrawTabCtrlBackground(
409 void DrawTab(wxDC
& dc
,
411 const wxRibbonPageTabInfo
& tab
);
413 void DrawTabSeparator(
419 void DrawPageBackground(
424 void DrawScrollButton(
430 void DrawPanelBackground(
435 void DrawGalleryBackground(
437 wxRibbonGallery
* wnd
,
440 void DrawGalleryItemBackground(
442 wxRibbonGallery
* wnd
,
444 wxRibbonGalleryItem
* item
);
446 void DrawMinimisedPanel(
452 void DrawButtonBarBackground(
457 void DrawButtonBarButton(
461 wxRibbonButtonKind kind
,
463 const wxString
& label
,
464 const wxBitmap
& bitmap_large
,
465 const wxBitmap
& bitmap_small
);
467 void DrawToolBarBackground(
472 void DrawToolGroupBackground(
481 const wxBitmap
& bitmap
,
482 wxRibbonButtonKind kind
,
488 const wxString
& label
,
489 const wxBitmap
& bitmap
,
491 int* small_begin_need_separator
,
492 int* small_must_have_separator
,
495 wxSize
GetScrollButtonMinimumSize(
502 const wxRibbonPanel
* wnd
,
504 wxPoint
* client_offset
);
506 wxSize
GetPanelClientSize(
508 const wxRibbonPanel
* wnd
,
510 wxPoint
* client_offset
);
512 wxSize
GetGallerySize(
514 const wxRibbonGallery
* wnd
,
517 wxSize
GetGalleryClientSize(
519 const wxRibbonGallery
* wnd
,
521 wxPoint
* client_offset
,
522 wxRect
* scroll_up_button
,
523 wxRect
* scroll_down_button
,
524 wxRect
* extension_button
);
526 wxRect
GetPageBackgroundRedrawArea(
528 const wxRibbonPage
* wnd
,
529 wxSize page_old_size
,
530 wxSize page_new_size
);
532 bool GetButtonBarButtonSize(
535 wxRibbonButtonKind kind
,
536 wxRibbonButtonBarButtonState size
,
537 const wxString
& label
,
538 wxSize bitmap_size_large
,
539 wxSize bitmap_size_small
,
541 wxRect
* normal_region
,
542 wxRect
* dropdown_region
);
544 wxSize
GetMinimisedPanelMinimumSize(
546 const wxRibbonPanel
* wnd
,
547 wxSize
* desired_bitmap_size
,
548 wxDirection
* expanded_panel_direction
);
554 wxRibbonButtonKind kind
,
557 wxRect
* dropdown_region
);
560 void ReallyDrawTabSeparator(wxWindow
* wnd
, const wxRect
& rect
, double visibility
);
561 void DrawPartialPageBackground(wxDC
& dc
, wxWindow
* wnd
, const wxRect
& rect
,
562 bool allow_hovered
= true);
563 void DrawPartialPageBackground(wxDC
& dc
, wxWindow
* wnd
, const wxRect
& rect
,
564 wxRibbonPage
* page
, wxPoint offset
, bool hovered
= false);
565 void DrawPanelBorder(wxDC
& dc
, const wxRect
& rect
, wxPen
& primary_colour
,
566 wxPen
& secondary_colour
);
567 void RemovePanelPadding(wxRect
* rect
);
568 void DrawDropdownArrow(wxDC
& dc
, int x
, int y
, const wxColour
& colour
);
569 void DrawGalleryBackgroundCommon(wxDC
& dc
, wxRibbonGallery
* wnd
,
571 virtual void DrawGalleryButton(wxDC
& dc
, wxRect rect
,
572 wxRibbonGalleryButtonState state
, wxBitmap
* bitmaps
);
573 void DrawButtonBarButtonForeground(
576 wxRibbonButtonKind kind
,
578 const wxString
& label
,
579 const wxBitmap
& bitmap_large
,
580 const wxBitmap
& bitmap_small
);
581 void DrawMinimisedPanelCommon(
585 wxRect
* preview_rect
);
586 void CloneTo(wxRibbonMSWArtProvider
* copy
) const;
588 wxBitmap m_cached_tab_separator
;
589 wxBitmap m_gallery_up_bitmap
[4];
590 wxBitmap m_gallery_down_bitmap
[4];
591 wxBitmap m_gallery_extension_bitmap
[4];
592 wxBitmap m_toolbar_drop_bitmap
;
594 wxColour m_primary_scheme_colour
;
595 wxColour m_secondary_scheme_colour
;
596 wxColour m_tertiary_scheme_colour
;
598 wxColour m_button_bar_label_colour
;
599 wxColour m_tab_label_colour
;
600 wxColour m_tab_separator_colour
;
601 wxColour m_tab_separator_gradient_colour
;
602 wxColour m_tab_active_background_colour
;
603 wxColour m_tab_active_background_gradient_colour
;
604 wxColour m_tab_hover_background_colour
;
605 wxColour m_tab_hover_background_gradient_colour
;
606 wxColour m_tab_hover_background_top_colour
;
607 wxColour m_tab_hover_background_top_gradient_colour
;
608 wxColour m_panel_label_colour
;
609 wxColour m_panel_minimised_label_colour
;
610 wxColour m_panel_hover_label_colour
;
611 wxColour m_panel_active_background_colour
;
612 wxColour m_panel_active_background_gradient_colour
;
613 wxColour m_panel_active_background_top_colour
;
614 wxColour m_panel_active_background_top_gradient_colour
;
615 wxColour m_page_background_colour
;
616 wxColour m_page_background_gradient_colour
;
617 wxColour m_page_background_top_colour
;
618 wxColour m_page_background_top_gradient_colour
;
619 wxColour m_page_hover_background_colour
;
620 wxColour m_page_hover_background_gradient_colour
;
621 wxColour m_page_hover_background_top_colour
;
622 wxColour m_page_hover_background_top_gradient_colour
;
623 wxColour m_button_bar_hover_background_colour
;
624 wxColour m_button_bar_hover_background_gradient_colour
;
625 wxColour m_button_bar_hover_background_top_colour
;
626 wxColour m_button_bar_hover_background_top_gradient_colour
;
627 wxColour m_button_bar_active_background_colour
;
628 wxColour m_button_bar_active_background_gradient_colour
;
629 wxColour m_button_bar_active_background_top_colour
;
630 wxColour m_button_bar_active_background_top_gradient_colour
;
631 wxColour m_gallery_button_background_colour
;
632 wxColour m_gallery_button_background_gradient_colour
;
633 wxColour m_gallery_button_hover_background_colour
;
634 wxColour m_gallery_button_hover_background_gradient_colour
;
635 wxColour m_gallery_button_active_background_colour
;
636 wxColour m_gallery_button_active_background_gradient_colour
;
637 wxColour m_gallery_button_disabled_background_colour
;
638 wxColour m_gallery_button_disabled_background_gradient_colour
;
639 wxColour m_gallery_button_face_colour
;
640 wxColour m_gallery_button_hover_face_colour
;
641 wxColour m_gallery_button_active_face_colour
;
642 wxColour m_gallery_button_disabled_face_colour
;
644 wxColour m_tool_face_colour
;
645 wxColour m_tool_background_top_colour
;
646 wxColour m_tool_background_top_gradient_colour
;
647 wxColour m_tool_background_colour
;
648 wxColour m_tool_background_gradient_colour
;
649 wxColour m_tool_hover_background_top_colour
;
650 wxColour m_tool_hover_background_top_gradient_colour
;
651 wxColour m_tool_hover_background_colour
;
652 wxColour m_tool_hover_background_gradient_colour
;
653 wxColour m_tool_active_background_top_colour
;
654 wxColour m_tool_active_background_top_gradient_colour
;
655 wxColour m_tool_active_background_colour
;
656 wxColour m_tool_active_background_gradient_colour
;
658 wxBrush m_tab_ctrl_background_brush
;
659 wxBrush m_panel_label_background_brush
;
660 wxBrush m_panel_hover_label_background_brush
;
661 wxBrush m_gallery_hover_background_brush
;
662 wxBrush m_gallery_button_background_top_brush
;
663 wxBrush m_gallery_button_hover_background_top_brush
;
664 wxBrush m_gallery_button_active_background_top_brush
;
665 wxBrush m_gallery_button_disabled_background_top_brush
;
667 wxFont m_tab_label_font
;
668 wxFont m_panel_label_font
;
669 wxFont m_button_bar_label_font
;
671 wxPen m_page_border_pen
;
672 wxPen m_panel_border_pen
;
673 wxPen m_panel_border_gradient_pen
;
674 wxPen m_panel_minimised_border_pen
;
675 wxPen m_panel_minimised_border_gradient_pen
;
676 wxPen m_tab_border_pen
;
677 wxPen m_button_bar_hover_border_pen
;
678 wxPen m_button_bar_active_border_pen
;
679 wxPen m_gallery_border_pen
;
680 wxPen m_gallery_item_border_pen
;
681 wxPen m_toolbar_border_pen
;
683 double m_cached_tab_separator_visibility
;
686 int m_tab_separation_size
;
687 int m_page_border_left
;
688 int m_page_border_top
;
689 int m_page_border_right
;
690 int m_page_border_bottom
;
691 int m_panel_x_separation_size
;
692 int m_panel_y_separation_size
;
693 int m_tool_group_separation_size
;
694 int m_gallery_bitmap_padding_left_size
;
695 int m_gallery_bitmap_padding_right_size
;
696 int m_gallery_bitmap_padding_top_size
;
697 int m_gallery_bitmap_padding_bottom_size
;
700 class WXDLLIMPEXP_RIBBON wxRibbonAUIArtProvider
: public wxRibbonMSWArtProvider
703 wxRibbonAUIArtProvider();
704 virtual ~wxRibbonAUIArtProvider();
706 wxRibbonArtProvider
* Clone() const;
708 wxColour
GetColour(int id
) const;
709 void SetColour(int id
, const wxColor
& colour
);
710 void SetColourScheme(const wxColour
& primary
,
711 const wxColour
& secondary
,
712 const wxColour
& tertiary
);
713 void SetFont(int id
, const wxFont
& font
);
715 wxSize
GetScrollButtonMinimumSize(
720 void DrawScrollButton(
728 const wxRibbonPanel
* wnd
,
730 wxPoint
* client_offset
);
732 wxSize
GetPanelClientSize(
734 const wxRibbonPanel
* wnd
,
736 wxPoint
* client_offset
);
738 void DrawTabCtrlBackground(
743 int GetTabCtrlHeight(
746 const wxRibbonPageTabInfoArray
& pages
);
751 const wxString
& label
,
752 const wxBitmap
& bitmap
,
754 int* small_begin_need_separator
,
755 int* small_must_have_separator
,
758 void DrawTab(wxDC
& dc
,
760 const wxRibbonPageTabInfo
& tab
);
762 void DrawTabSeparator(
768 void DrawPageBackground(
773 void DrawPanelBackground(
778 void DrawMinimisedPanel(
784 void DrawGalleryBackground(
786 wxRibbonGallery
* wnd
,
789 void DrawGalleryItemBackground(
791 wxRibbonGallery
* wnd
,
793 wxRibbonGalleryItem
* item
);
795 void DrawButtonBarBackground(
800 void DrawButtonBarButton(
804 wxRibbonButtonKind kind
,
806 const wxString
& label
,
807 const wxBitmap
& bitmap_large
,
808 const wxBitmap
& bitmap_small
);
810 void DrawToolBarBackground(
815 void DrawToolGroupBackground(
824 const wxBitmap
& bitmap
,
825 wxRibbonButtonKind kind
,
829 void DrawPartialPanelBackground(wxDC
& dc
, wxWindow
* wnd
,
831 void DrawGalleryButton(wxDC
& dc
, wxRect rect
,
832 wxRibbonGalleryButtonState state
, wxBitmap
* bitmaps
);
834 wxColour m_tab_ctrl_background_colour
;
835 wxColour m_tab_ctrl_background_gradient_colour
;
836 wxColour m_panel_label_background_colour
;
837 wxColour m_panel_label_background_gradient_colour
;
838 wxColour m_panel_hover_label_background_colour
;
839 wxColour m_panel_hover_label_background_gradient_colour
;
841 wxBrush m_background_brush
;
842 wxBrush m_tab_active_top_background_brush
;
843 wxBrush m_tab_hover_background_brush
;
844 wxBrush m_button_bar_hover_background_brush
;
845 wxBrush m_button_bar_active_background_brush
;
846 wxBrush m_gallery_button_active_background_brush
;
847 wxBrush m_gallery_button_hover_background_brush
;
848 wxBrush m_gallery_button_disabled_background_brush
;
849 wxBrush m_tool_hover_background_brush
;
850 wxBrush m_tool_active_background_brush
;
852 wxPen m_toolbar_hover_borden_pen
;
854 wxFont m_tab_active_label_font
;
857 #if defined(__WXMSW__)
858 typedef wxRibbonMSWArtProvider wxRibbonDefaultArtProvider
;
859 #elif defined(__WXOSX_CARBON__) || \
860 defined(__WXOSX_COCOA__) || \
861 defined(__WXOSX_IPHONE__) || \
863 // TODO: Once implemented, change typedef to OSX
864 // typedef wxRibbonOSXArtProvider wxRibbonDefaultArtProvider;
865 typedef wxRibbonAUIArtProvider wxRibbonDefaultArtProvider
;
867 // TODO: Once implemented, change typedef to AUI
868 typedef wxRibbonAUIArtProvider wxRibbonDefaultArtProvider
;
871 #endif // wxUSE_RIBBON
873 #endif // _WX_RIBBON_ART_H_