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
,
157 wxRIBBON_BUTTON_TOGGLE
= 1 << 2
160 enum wxRibbonButtonBarButtonState
162 wxRIBBON_BUTTONBAR_BUTTON_SMALL
= 0 << 0,
163 wxRIBBON_BUTTONBAR_BUTTON_MEDIUM
= 1 << 0,
164 wxRIBBON_BUTTONBAR_BUTTON_LARGE
= 2 << 0,
165 wxRIBBON_BUTTONBAR_BUTTON_SIZE_MASK
= 3 << 0,
167 wxRIBBON_BUTTONBAR_BUTTON_NORMAL_HOVERED
= 1 << 3,
168 wxRIBBON_BUTTONBAR_BUTTON_DROPDOWN_HOVERED
= 1 << 4,
169 wxRIBBON_BUTTONBAR_BUTTON_HOVER_MASK
= wxRIBBON_BUTTONBAR_BUTTON_NORMAL_HOVERED
| wxRIBBON_BUTTONBAR_BUTTON_DROPDOWN_HOVERED
,
170 wxRIBBON_BUTTONBAR_BUTTON_NORMAL_ACTIVE
= 1 << 5,
171 wxRIBBON_BUTTONBAR_BUTTON_DROPDOWN_ACTIVE
= 1 << 6,
172 wxRIBBON_BUTTONBAR_BUTTON_ACTIVE_MASK
= wxRIBBON_BUTTONBAR_BUTTON_NORMAL_ACTIVE
| wxRIBBON_BUTTONBAR_BUTTON_DROPDOWN_ACTIVE
,
173 wxRIBBON_BUTTONBAR_BUTTON_DISABLED
= 1 << 7,
174 wxRIBBON_BUTTONBAR_BUTTON_TOGGLED
= 1 << 8,
175 wxRIBBON_BUTTONBAR_BUTTON_STATE_MASK
= 0x1F8,
178 enum wxRibbonGalleryButtonState
180 wxRIBBON_GALLERY_BUTTON_NORMAL
,
181 wxRIBBON_GALLERY_BUTTON_HOVERED
,
182 wxRIBBON_GALLERY_BUTTON_ACTIVE
,
183 wxRIBBON_GALLERY_BUTTON_DISABLED
,
188 class wxRibbonGallery
;
189 class wxRibbonGalleryItem
;
190 class wxRibbonPageTabInfo
;
191 class wxRibbonPageTabInfoArray
;
193 class WXDLLIMPEXP_RIBBON wxRibbonArtProvider
196 wxRibbonArtProvider();
197 virtual ~wxRibbonArtProvider();
199 virtual wxRibbonArtProvider
* Clone() const = 0;
200 virtual void SetFlags(long flags
) = 0;
201 virtual long GetFlags() const = 0;
203 virtual int GetMetric(int id
) const = 0;
204 virtual void SetMetric(int id
, int new_val
) = 0;
205 virtual void SetFont(int id
, const wxFont
& font
) = 0;
206 virtual wxFont
GetFont(int id
) const = 0;
207 virtual wxColour
GetColour(int id
) const = 0;
208 virtual void SetColour(int id
, const wxColor
& colour
) = 0;
209 wxColour
GetColor(int id
) const { return GetColour(id
); }
210 void SetColor(int id
, const wxColour
& color
) { SetColour(id
, color
); }
211 virtual void GetColourScheme(wxColour
* primary
,
213 wxColour
* tertiary
) const = 0;
214 virtual void SetColourScheme(const wxColour
& primary
,
215 const wxColour
& secondary
,
216 const wxColour
& tertiary
) = 0;
218 virtual void DrawTabCtrlBackground(
221 const wxRect
& rect
) = 0;
223 virtual void DrawTab(wxDC
& dc
,
225 const wxRibbonPageTabInfo
& tab
) = 0;
227 virtual void DrawTabSeparator(wxDC
& dc
,
230 double visibility
) = 0;
232 virtual void DrawPageBackground(
235 const wxRect
& rect
) = 0;
237 virtual void DrawScrollButton(
243 virtual void DrawPanelBackground(
246 const wxRect
& rect
) = 0;
248 virtual void DrawGalleryBackground(
250 wxRibbonGallery
* wnd
,
251 const wxRect
& rect
) = 0;
253 virtual void DrawGalleryItemBackground(
255 wxRibbonGallery
* wnd
,
257 wxRibbonGalleryItem
* item
) = 0;
259 virtual void DrawMinimisedPanel(
263 wxBitmap
& bitmap
) = 0;
265 virtual void DrawButtonBarBackground(
268 const wxRect
& rect
) = 0;
270 virtual void DrawButtonBarButton(
274 wxRibbonButtonKind kind
,
276 const wxString
& label
,
277 const wxBitmap
& bitmap_large
,
278 const wxBitmap
& bitmap_small
) = 0;
280 virtual void DrawToolBarBackground(
283 const wxRect
& rect
) = 0;
285 virtual void DrawToolGroupBackground(
288 const wxRect
& rect
) = 0;
290 virtual void DrawTool(
294 const wxBitmap
& bitmap
,
295 wxRibbonButtonKind kind
,
298 virtual void GetBarTabWidth(
301 const wxString
& label
,
302 const wxBitmap
& bitmap
,
304 int* small_begin_need_separator
,
305 int* small_must_have_separator
,
308 virtual int GetTabCtrlHeight(
311 const wxRibbonPageTabInfoArray
& pages
) = 0;
313 virtual wxSize
GetScrollButtonMinimumSize(
318 virtual wxSize
GetPanelSize(
320 const wxRibbonPanel
* wnd
,
322 wxPoint
* client_offset
) = 0;
324 virtual wxSize
GetPanelClientSize(
326 const wxRibbonPanel
* wnd
,
328 wxPoint
* client_offset
) = 0;
330 virtual wxSize
GetGallerySize(
332 const wxRibbonGallery
* wnd
,
333 wxSize client_size
) = 0;
335 virtual wxSize
GetGalleryClientSize(
337 const wxRibbonGallery
* wnd
,
339 wxPoint
* client_offset
,
340 wxRect
* scroll_up_button
,
341 wxRect
* scroll_down_button
,
342 wxRect
* extension_button
) = 0;
344 virtual wxRect
GetPageBackgroundRedrawArea(
346 const wxRibbonPage
* wnd
,
347 wxSize page_old_size
,
348 wxSize page_new_size
) = 0;
350 virtual bool GetButtonBarButtonSize(
353 wxRibbonButtonKind kind
,
354 wxRibbonButtonBarButtonState size
,
355 const wxString
& label
,
356 wxSize bitmap_size_large
,
357 wxSize bitmap_size_small
,
359 wxRect
* normal_region
,
360 wxRect
* dropdown_region
) = 0;
362 virtual wxSize
GetMinimisedPanelMinimumSize(
364 const wxRibbonPanel
* wnd
,
365 wxSize
* desired_bitmap_size
,
366 wxDirection
* expanded_panel_direction
) = 0;
368 virtual wxSize
GetToolSize(
372 wxRibbonButtonKind kind
,
375 wxRect
* dropdown_region
) = 0;
378 class WXDLLIMPEXP_RIBBON wxRibbonMSWArtProvider
: public wxRibbonArtProvider
381 wxRibbonMSWArtProvider(bool set_colour_scheme
= true);
382 virtual ~wxRibbonMSWArtProvider();
384 wxRibbonArtProvider
* Clone() const;
385 void SetFlags(long flags
);
386 long GetFlags() const;
388 int GetMetric(int id
) const;
389 void SetMetric(int id
, int new_val
);
390 void SetFont(int id
, const wxFont
& font
);
391 wxFont
GetFont(int id
) const;
392 wxColour
GetColour(int id
) const;
393 void SetColour(int id
, const wxColor
& colour
);
394 void GetColourScheme(wxColour
* primary
,
396 wxColour
* tertiary
) const;
397 void SetColourScheme(const wxColour
& primary
,
398 const wxColour
& secondary
,
399 const wxColour
& tertiary
);
401 int GetTabCtrlHeight(
404 const wxRibbonPageTabInfoArray
& pages
);
406 void DrawTabCtrlBackground(
411 void DrawTab(wxDC
& dc
,
413 const wxRibbonPageTabInfo
& tab
);
415 void DrawTabSeparator(
421 void DrawPageBackground(
426 void DrawScrollButton(
432 void DrawPanelBackground(
437 void DrawGalleryBackground(
439 wxRibbonGallery
* wnd
,
442 void DrawGalleryItemBackground(
444 wxRibbonGallery
* wnd
,
446 wxRibbonGalleryItem
* item
);
448 void DrawMinimisedPanel(
454 void DrawButtonBarBackground(
459 void DrawButtonBarButton(
463 wxRibbonButtonKind kind
,
465 const wxString
& label
,
466 const wxBitmap
& bitmap_large
,
467 const wxBitmap
& bitmap_small
);
469 void DrawToolBarBackground(
474 void DrawToolGroupBackground(
483 const wxBitmap
& bitmap
,
484 wxRibbonButtonKind kind
,
490 const wxString
& label
,
491 const wxBitmap
& bitmap
,
493 int* small_begin_need_separator
,
494 int* small_must_have_separator
,
497 wxSize
GetScrollButtonMinimumSize(
504 const wxRibbonPanel
* wnd
,
506 wxPoint
* client_offset
);
508 wxSize
GetPanelClientSize(
510 const wxRibbonPanel
* wnd
,
512 wxPoint
* client_offset
);
514 wxSize
GetGallerySize(
516 const wxRibbonGallery
* wnd
,
519 wxSize
GetGalleryClientSize(
521 const wxRibbonGallery
* wnd
,
523 wxPoint
* client_offset
,
524 wxRect
* scroll_up_button
,
525 wxRect
* scroll_down_button
,
526 wxRect
* extension_button
);
528 wxRect
GetPageBackgroundRedrawArea(
530 const wxRibbonPage
* wnd
,
531 wxSize page_old_size
,
532 wxSize page_new_size
);
534 bool GetButtonBarButtonSize(
537 wxRibbonButtonKind kind
,
538 wxRibbonButtonBarButtonState size
,
539 const wxString
& label
,
540 wxSize bitmap_size_large
,
541 wxSize bitmap_size_small
,
543 wxRect
* normal_region
,
544 wxRect
* dropdown_region
);
546 wxSize
GetMinimisedPanelMinimumSize(
548 const wxRibbonPanel
* wnd
,
549 wxSize
* desired_bitmap_size
,
550 wxDirection
* expanded_panel_direction
);
556 wxRibbonButtonKind kind
,
559 wxRect
* dropdown_region
);
562 void ReallyDrawTabSeparator(wxWindow
* wnd
, const wxRect
& rect
, double visibility
);
563 void DrawPartialPageBackground(wxDC
& dc
, wxWindow
* wnd
, const wxRect
& rect
,
564 bool allow_hovered
= true);
565 void DrawPartialPageBackground(wxDC
& dc
, wxWindow
* wnd
, const wxRect
& rect
,
566 wxRibbonPage
* page
, wxPoint offset
, bool hovered
= false);
567 void DrawPanelBorder(wxDC
& dc
, const wxRect
& rect
, wxPen
& primary_colour
,
568 wxPen
& secondary_colour
);
569 void RemovePanelPadding(wxRect
* rect
);
570 void DrawDropdownArrow(wxDC
& dc
, int x
, int y
, const wxColour
& colour
);
571 void DrawGalleryBackgroundCommon(wxDC
& dc
, wxRibbonGallery
* wnd
,
573 virtual void DrawGalleryButton(wxDC
& dc
, wxRect rect
,
574 wxRibbonGalleryButtonState state
, wxBitmap
* bitmaps
);
575 void DrawButtonBarButtonForeground(
578 wxRibbonButtonKind kind
,
580 const wxString
& label
,
581 const wxBitmap
& bitmap_large
,
582 const wxBitmap
& bitmap_small
);
583 void DrawMinimisedPanelCommon(
587 wxRect
* preview_rect
);
588 void CloneTo(wxRibbonMSWArtProvider
* copy
) const;
590 wxBitmap m_cached_tab_separator
;
591 wxBitmap m_gallery_up_bitmap
[4];
592 wxBitmap m_gallery_down_bitmap
[4];
593 wxBitmap m_gallery_extension_bitmap
[4];
594 wxBitmap m_toolbar_drop_bitmap
;
596 wxColour m_primary_scheme_colour
;
597 wxColour m_secondary_scheme_colour
;
598 wxColour m_tertiary_scheme_colour
;
600 wxColour m_button_bar_label_colour
;
601 wxColour m_tab_label_colour
;
602 wxColour m_tab_separator_colour
;
603 wxColour m_tab_separator_gradient_colour
;
604 wxColour m_tab_active_background_colour
;
605 wxColour m_tab_active_background_gradient_colour
;
606 wxColour m_tab_hover_background_colour
;
607 wxColour m_tab_hover_background_gradient_colour
;
608 wxColour m_tab_hover_background_top_colour
;
609 wxColour m_tab_hover_background_top_gradient_colour
;
610 wxColour m_panel_label_colour
;
611 wxColour m_panel_minimised_label_colour
;
612 wxColour m_panel_hover_label_colour
;
613 wxColour m_panel_active_background_colour
;
614 wxColour m_panel_active_background_gradient_colour
;
615 wxColour m_panel_active_background_top_colour
;
616 wxColour m_panel_active_background_top_gradient_colour
;
617 wxColour m_page_background_colour
;
618 wxColour m_page_background_gradient_colour
;
619 wxColour m_page_background_top_colour
;
620 wxColour m_page_background_top_gradient_colour
;
621 wxColour m_page_hover_background_colour
;
622 wxColour m_page_hover_background_gradient_colour
;
623 wxColour m_page_hover_background_top_colour
;
624 wxColour m_page_hover_background_top_gradient_colour
;
625 wxColour m_button_bar_hover_background_colour
;
626 wxColour m_button_bar_hover_background_gradient_colour
;
627 wxColour m_button_bar_hover_background_top_colour
;
628 wxColour m_button_bar_hover_background_top_gradient_colour
;
629 wxColour m_button_bar_active_background_colour
;
630 wxColour m_button_bar_active_background_gradient_colour
;
631 wxColour m_button_bar_active_background_top_colour
;
632 wxColour m_button_bar_active_background_top_gradient_colour
;
633 wxColour m_gallery_button_background_colour
;
634 wxColour m_gallery_button_background_gradient_colour
;
635 wxColour m_gallery_button_hover_background_colour
;
636 wxColour m_gallery_button_hover_background_gradient_colour
;
637 wxColour m_gallery_button_active_background_colour
;
638 wxColour m_gallery_button_active_background_gradient_colour
;
639 wxColour m_gallery_button_disabled_background_colour
;
640 wxColour m_gallery_button_disabled_background_gradient_colour
;
641 wxColour m_gallery_button_face_colour
;
642 wxColour m_gallery_button_hover_face_colour
;
643 wxColour m_gallery_button_active_face_colour
;
644 wxColour m_gallery_button_disabled_face_colour
;
646 wxColour m_tool_face_colour
;
647 wxColour m_tool_background_top_colour
;
648 wxColour m_tool_background_top_gradient_colour
;
649 wxColour m_tool_background_colour
;
650 wxColour m_tool_background_gradient_colour
;
651 wxColour m_tool_hover_background_top_colour
;
652 wxColour m_tool_hover_background_top_gradient_colour
;
653 wxColour m_tool_hover_background_colour
;
654 wxColour m_tool_hover_background_gradient_colour
;
655 wxColour m_tool_active_background_top_colour
;
656 wxColour m_tool_active_background_top_gradient_colour
;
657 wxColour m_tool_active_background_colour
;
658 wxColour m_tool_active_background_gradient_colour
;
660 wxBrush m_tab_ctrl_background_brush
;
661 wxBrush m_panel_label_background_brush
;
662 wxBrush m_panel_hover_label_background_brush
;
663 wxBrush m_gallery_hover_background_brush
;
664 wxBrush m_gallery_button_background_top_brush
;
665 wxBrush m_gallery_button_hover_background_top_brush
;
666 wxBrush m_gallery_button_active_background_top_brush
;
667 wxBrush m_gallery_button_disabled_background_top_brush
;
669 wxFont m_tab_label_font
;
670 wxFont m_panel_label_font
;
671 wxFont m_button_bar_label_font
;
673 wxPen m_page_border_pen
;
674 wxPen m_panel_border_pen
;
675 wxPen m_panel_border_gradient_pen
;
676 wxPen m_panel_minimised_border_pen
;
677 wxPen m_panel_minimised_border_gradient_pen
;
678 wxPen m_tab_border_pen
;
679 wxPen m_button_bar_hover_border_pen
;
680 wxPen m_button_bar_active_border_pen
;
681 wxPen m_gallery_border_pen
;
682 wxPen m_gallery_item_border_pen
;
683 wxPen m_toolbar_border_pen
;
685 double m_cached_tab_separator_visibility
;
688 int m_tab_separation_size
;
689 int m_page_border_left
;
690 int m_page_border_top
;
691 int m_page_border_right
;
692 int m_page_border_bottom
;
693 int m_panel_x_separation_size
;
694 int m_panel_y_separation_size
;
695 int m_tool_group_separation_size
;
696 int m_gallery_bitmap_padding_left_size
;
697 int m_gallery_bitmap_padding_right_size
;
698 int m_gallery_bitmap_padding_top_size
;
699 int m_gallery_bitmap_padding_bottom_size
;
702 class WXDLLIMPEXP_RIBBON wxRibbonAUIArtProvider
: public wxRibbonMSWArtProvider
705 wxRibbonAUIArtProvider();
706 virtual ~wxRibbonAUIArtProvider();
708 wxRibbonArtProvider
* Clone() const;
710 wxColour
GetColour(int id
) const;
711 void SetColour(int id
, const wxColor
& colour
);
712 void SetColourScheme(const wxColour
& primary
,
713 const wxColour
& secondary
,
714 const wxColour
& tertiary
);
715 void SetFont(int id
, const wxFont
& font
);
717 wxSize
GetScrollButtonMinimumSize(
722 void DrawScrollButton(
730 const wxRibbonPanel
* wnd
,
732 wxPoint
* client_offset
);
734 wxSize
GetPanelClientSize(
736 const wxRibbonPanel
* wnd
,
738 wxPoint
* client_offset
);
740 void DrawTabCtrlBackground(
745 int GetTabCtrlHeight(
748 const wxRibbonPageTabInfoArray
& pages
);
753 const wxString
& label
,
754 const wxBitmap
& bitmap
,
756 int* small_begin_need_separator
,
757 int* small_must_have_separator
,
760 void DrawTab(wxDC
& dc
,
762 const wxRibbonPageTabInfo
& tab
);
764 void DrawTabSeparator(
770 void DrawPageBackground(
775 void DrawPanelBackground(
780 void DrawMinimisedPanel(
786 void DrawGalleryBackground(
788 wxRibbonGallery
* wnd
,
791 void DrawGalleryItemBackground(
793 wxRibbonGallery
* wnd
,
795 wxRibbonGalleryItem
* item
);
797 void DrawButtonBarBackground(
802 void DrawButtonBarButton(
806 wxRibbonButtonKind kind
,
808 const wxString
& label
,
809 const wxBitmap
& bitmap_large
,
810 const wxBitmap
& bitmap_small
);
812 void DrawToolBarBackground(
817 void DrawToolGroupBackground(
826 const wxBitmap
& bitmap
,
827 wxRibbonButtonKind kind
,
831 void DrawPartialPanelBackground(wxDC
& dc
, wxWindow
* wnd
,
833 void DrawGalleryButton(wxDC
& dc
, wxRect rect
,
834 wxRibbonGalleryButtonState state
, wxBitmap
* bitmaps
);
836 wxColour m_tab_ctrl_background_colour
;
837 wxColour m_tab_ctrl_background_gradient_colour
;
838 wxColour m_panel_label_background_colour
;
839 wxColour m_panel_label_background_gradient_colour
;
840 wxColour m_panel_hover_label_background_colour
;
841 wxColour m_panel_hover_label_background_gradient_colour
;
843 wxBrush m_background_brush
;
844 wxBrush m_tab_active_top_background_brush
;
845 wxBrush m_tab_hover_background_brush
;
846 wxBrush m_button_bar_hover_background_brush
;
847 wxBrush m_button_bar_active_background_brush
;
848 wxBrush m_gallery_button_active_background_brush
;
849 wxBrush m_gallery_button_hover_background_brush
;
850 wxBrush m_gallery_button_disabled_background_brush
;
851 wxBrush m_tool_hover_background_brush
;
852 wxBrush m_tool_active_background_brush
;
854 wxPen m_toolbar_hover_borden_pen
;
856 wxFont m_tab_active_label_font
;
859 #if defined(__WXMSW__)
860 typedef wxRibbonMSWArtProvider wxRibbonDefaultArtProvider
;
861 #elif defined(__WXOSX_CARBON__) || \
862 defined(__WXOSX_COCOA__) || \
863 defined(__WXOSX_IPHONE__) || \
865 // TODO: Once implemented, change typedef to OSX
866 // typedef wxRibbonOSXArtProvider wxRibbonDefaultArtProvider;
867 typedef wxRibbonAUIArtProvider wxRibbonDefaultArtProvider
;
869 // TODO: Once implemented, change typedef to AUI
870 typedef wxRibbonAUIArtProvider wxRibbonDefaultArtProvider
;
873 #endif // wxUSE_RIBBON
875 #endif // _WX_RIBBON_ART_H_