1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: wx/ribbon/art.h
3 // Purpose: Art providers for ribbon-bar-style interface
4 // Author: Peter Cawley
7 // Copyright: (C) Peter Cawley
8 // Licence: wxWindows licence
9 ///////////////////////////////////////////////////////////////////////////////
11 #ifndef _WX_RIBBON_ART_H_
12 #define _WX_RIBBON_ART_H_
19 #include "wx/colour.h"
22 #include "wx/bitmap.h"
23 #include "wx/ribbon/bar.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
,
107 wxRIBBON_ART_PAGE_TOGGLE_FACE_COLOUR
,
108 wxRIBBON_ART_PAGE_TOGGLE_HOVER_FACE_COLOUR
,
110 wxRIBBON_ART_PAGE_BORDER_COLOUR
,
111 wxRIBBON_ART_PAGE_BACKGROUND_TOP_COLOUR
,
112 wxRIBBON_ART_PAGE_BACKGROUND_TOP_GRADIENT_COLOUR
,
113 wxRIBBON_ART_PAGE_BACKGROUND_COLOUR
,
114 wxRIBBON_ART_PAGE_BACKGROUND_GRADIENT_COLOUR
,
115 wxRIBBON_ART_PAGE_HOVER_BACKGROUND_TOP_COLOUR
,
116 wxRIBBON_ART_PAGE_HOVER_BACKGROUND_TOP_GRADIENT_COLOUR
,
117 wxRIBBON_ART_PAGE_HOVER_BACKGROUND_COLOUR
,
118 wxRIBBON_ART_PAGE_HOVER_BACKGROUND_GRADIENT_COLOUR
,
119 wxRIBBON_ART_TOOLBAR_BORDER_COLOUR
,
120 wxRIBBON_ART_TOOLBAR_HOVER_BORDER_COLOUR
,
121 wxRIBBON_ART_TOOLBAR_FACE_COLOUR
,
122 wxRIBBON_ART_TOOL_BACKGROUND_TOP_COLOUR
,
123 wxRIBBON_ART_TOOL_BACKGROUND_TOP_GRADIENT_COLOUR
,
124 wxRIBBON_ART_TOOL_BACKGROUND_COLOUR
,
125 wxRIBBON_ART_TOOL_BACKGROUND_GRADIENT_COLOUR
,
126 wxRIBBON_ART_TOOL_HOVER_BACKGROUND_TOP_COLOUR
,
127 wxRIBBON_ART_TOOL_HOVER_BACKGROUND_TOP_GRADIENT_COLOUR
,
128 wxRIBBON_ART_TOOL_HOVER_BACKGROUND_COLOUR
,
129 wxRIBBON_ART_TOOL_HOVER_BACKGROUND_GRADIENT_COLOUR
,
130 wxRIBBON_ART_TOOL_ACTIVE_BACKGROUND_TOP_COLOUR
,
131 wxRIBBON_ART_TOOL_ACTIVE_BACKGROUND_TOP_GRADIENT_COLOUR
,
132 wxRIBBON_ART_TOOL_ACTIVE_BACKGROUND_COLOUR
,
133 wxRIBBON_ART_TOOL_ACTIVE_BACKGROUND_GRADIENT_COLOUR
,
134 wxRIBBON_ART_BUTTON_BAR_LABEL_DISABLED_COLOUR
137 enum wxRibbonScrollButtonStyle
139 wxRIBBON_SCROLL_BTN_LEFT
= 0,
140 wxRIBBON_SCROLL_BTN_RIGHT
= 1,
141 wxRIBBON_SCROLL_BTN_UP
= 2,
142 wxRIBBON_SCROLL_BTN_DOWN
= 3,
144 wxRIBBON_SCROLL_BTN_DIRECTION_MASK
= 3,
146 wxRIBBON_SCROLL_BTN_NORMAL
= 0,
147 wxRIBBON_SCROLL_BTN_HOVERED
= 4,
148 wxRIBBON_SCROLL_BTN_ACTIVE
= 8,
150 wxRIBBON_SCROLL_BTN_STATE_MASK
= 12,
152 wxRIBBON_SCROLL_BTN_FOR_OTHER
= 0,
153 wxRIBBON_SCROLL_BTN_FOR_TABS
= 16,
154 wxRIBBON_SCROLL_BTN_FOR_PAGE
= 32,
156 wxRIBBON_SCROLL_BTN_FOR_MASK
= 48
159 enum wxRibbonButtonKind
161 wxRIBBON_BUTTON_NORMAL
= 1 << 0,
162 wxRIBBON_BUTTON_DROPDOWN
= 1 << 1,
163 wxRIBBON_BUTTON_HYBRID
= wxRIBBON_BUTTON_NORMAL
| wxRIBBON_BUTTON_DROPDOWN
,
164 wxRIBBON_BUTTON_TOGGLE
= 1 << 2
167 enum wxRibbonButtonBarButtonState
169 wxRIBBON_BUTTONBAR_BUTTON_SMALL
= 0 << 0,
170 wxRIBBON_BUTTONBAR_BUTTON_MEDIUM
= 1 << 0,
171 wxRIBBON_BUTTONBAR_BUTTON_LARGE
= 2 << 0,
172 wxRIBBON_BUTTONBAR_BUTTON_SIZE_MASK
= 3 << 0,
174 wxRIBBON_BUTTONBAR_BUTTON_NORMAL_HOVERED
= 1 << 3,
175 wxRIBBON_BUTTONBAR_BUTTON_DROPDOWN_HOVERED
= 1 << 4,
176 wxRIBBON_BUTTONBAR_BUTTON_HOVER_MASK
= wxRIBBON_BUTTONBAR_BUTTON_NORMAL_HOVERED
| wxRIBBON_BUTTONBAR_BUTTON_DROPDOWN_HOVERED
,
177 wxRIBBON_BUTTONBAR_BUTTON_NORMAL_ACTIVE
= 1 << 5,
178 wxRIBBON_BUTTONBAR_BUTTON_DROPDOWN_ACTIVE
= 1 << 6,
179 wxRIBBON_BUTTONBAR_BUTTON_ACTIVE_MASK
= wxRIBBON_BUTTONBAR_BUTTON_NORMAL_ACTIVE
| wxRIBBON_BUTTONBAR_BUTTON_DROPDOWN_ACTIVE
,
180 wxRIBBON_BUTTONBAR_BUTTON_DISABLED
= 1 << 7,
181 wxRIBBON_BUTTONBAR_BUTTON_TOGGLED
= 1 << 8,
182 wxRIBBON_BUTTONBAR_BUTTON_STATE_MASK
= 0x1F8
185 enum wxRibbonGalleryButtonState
187 wxRIBBON_GALLERY_BUTTON_NORMAL
,
188 wxRIBBON_GALLERY_BUTTON_HOVERED
,
189 wxRIBBON_GALLERY_BUTTON_ACTIVE
,
190 wxRIBBON_GALLERY_BUTTON_DISABLED
196 class wxRibbonGallery
;
197 class wxRibbonGalleryItem
;
198 class wxRibbonPageTabInfo
;
199 class wxRibbonPageTabInfoArray
;
201 class WXDLLIMPEXP_RIBBON wxRibbonArtProvider
204 wxRibbonArtProvider();
205 virtual ~wxRibbonArtProvider();
207 virtual wxRibbonArtProvider
* Clone() const = 0;
208 virtual void SetFlags(long flags
) = 0;
209 virtual long GetFlags() const = 0;
211 virtual int GetMetric(int id
) const = 0;
212 virtual void SetMetric(int id
, int new_val
) = 0;
213 virtual void SetFont(int id
, const wxFont
& font
) = 0;
214 virtual wxFont
GetFont(int id
) const = 0;
215 virtual wxColour
GetColour(int id
) const = 0;
216 virtual void SetColour(int id
, const wxColor
& colour
) = 0;
217 wxColour
GetColor(int id
) const { return GetColour(id
); }
218 void SetColor(int id
, const wxColour
& color
) { SetColour(id
, color
); }
219 virtual void GetColourScheme(wxColour
* primary
,
221 wxColour
* tertiary
) const = 0;
222 virtual void SetColourScheme(const wxColour
& primary
,
223 const wxColour
& secondary
,
224 const wxColour
& tertiary
) = 0;
226 virtual void DrawTabCtrlBackground(
229 const wxRect
& rect
) = 0;
231 virtual void DrawTab(wxDC
& dc
,
233 const wxRibbonPageTabInfo
& tab
) = 0;
235 virtual void DrawTabSeparator(wxDC
& dc
,
238 double visibility
) = 0;
240 virtual void DrawPageBackground(
243 const wxRect
& rect
) = 0;
245 virtual void DrawScrollButton(
251 virtual void DrawPanelBackground(
254 const wxRect
& rect
) = 0;
256 virtual void DrawGalleryBackground(
258 wxRibbonGallery
* wnd
,
259 const wxRect
& rect
) = 0;
261 virtual void DrawGalleryItemBackground(
263 wxRibbonGallery
* wnd
,
265 wxRibbonGalleryItem
* item
) = 0;
267 virtual void DrawMinimisedPanel(
271 wxBitmap
& bitmap
) = 0;
273 virtual void DrawButtonBarBackground(
276 const wxRect
& rect
) = 0;
278 virtual void DrawButtonBarButton(
282 wxRibbonButtonKind kind
,
284 const wxString
& label
,
285 const wxBitmap
& bitmap_large
,
286 const wxBitmap
& bitmap_small
) = 0;
288 virtual void DrawToolBarBackground(
291 const wxRect
& rect
) = 0;
293 virtual void DrawToolGroupBackground(
296 const wxRect
& rect
) = 0;
298 virtual void DrawTool(
302 const wxBitmap
& bitmap
,
303 wxRibbonButtonKind kind
,
306 virtual void DrawToggleButton(
310 wxRibbonDisplayMode mode
) = 0;
312 virtual void DrawHelpButton(
315 const wxRect
& rect
) = 0;
317 virtual void GetBarTabWidth(
320 const wxString
& label
,
321 const wxBitmap
& bitmap
,
323 int* small_begin_need_separator
,
324 int* small_must_have_separator
,
327 virtual int GetTabCtrlHeight(
330 const wxRibbonPageTabInfoArray
& pages
) = 0;
332 virtual wxSize
GetScrollButtonMinimumSize(
337 virtual wxSize
GetPanelSize(
339 const wxRibbonPanel
* wnd
,
341 wxPoint
* client_offset
) = 0;
343 virtual wxSize
GetPanelClientSize(
345 const wxRibbonPanel
* wnd
,
347 wxPoint
* client_offset
) = 0;
349 virtual wxRect
GetPanelExtButtonArea(
351 const wxRibbonPanel
* wnd
,
354 virtual wxSize
GetGallerySize(
356 const wxRibbonGallery
* wnd
,
357 wxSize client_size
) = 0;
359 virtual wxSize
GetGalleryClientSize(
361 const wxRibbonGallery
* wnd
,
363 wxPoint
* client_offset
,
364 wxRect
* scroll_up_button
,
365 wxRect
* scroll_down_button
,
366 wxRect
* extension_button
) = 0;
368 virtual wxRect
GetPageBackgroundRedrawArea(
370 const wxRibbonPage
* wnd
,
371 wxSize page_old_size
,
372 wxSize page_new_size
) = 0;
374 virtual bool GetButtonBarButtonSize(
377 wxRibbonButtonKind kind
,
378 wxRibbonButtonBarButtonState size
,
379 const wxString
& label
,
380 wxSize bitmap_size_large
,
381 wxSize bitmap_size_small
,
383 wxRect
* normal_region
,
384 wxRect
* dropdown_region
) = 0;
386 virtual wxSize
GetMinimisedPanelMinimumSize(
388 const wxRibbonPanel
* wnd
,
389 wxSize
* desired_bitmap_size
,
390 wxDirection
* expanded_panel_direction
) = 0;
392 virtual wxSize
GetToolSize(
396 wxRibbonButtonKind kind
,
399 wxRect
* dropdown_region
) = 0;
401 virtual wxRect
GetBarToggleButtonArea(const wxRect
& rect
)= 0;
403 virtual wxRect
GetRibbonHelpButtonArea(const wxRect
& rect
) = 0;
406 class WXDLLIMPEXP_RIBBON wxRibbonMSWArtProvider
: public wxRibbonArtProvider
409 wxRibbonMSWArtProvider(bool set_colour_scheme
= true);
410 virtual ~wxRibbonMSWArtProvider();
412 wxRibbonArtProvider
* Clone() const;
413 void SetFlags(long flags
);
414 long GetFlags() const;
416 int GetMetric(int id
) const;
417 void SetMetric(int id
, int new_val
);
418 void SetFont(int id
, const wxFont
& font
);
419 wxFont
GetFont(int id
) const;
420 wxColour
GetColour(int id
) const;
421 void SetColour(int id
, const wxColor
& colour
);
422 void GetColourScheme(wxColour
* primary
,
424 wxColour
* tertiary
) const;
425 void SetColourScheme(const wxColour
& primary
,
426 const wxColour
& secondary
,
427 const wxColour
& tertiary
);
429 int GetTabCtrlHeight(
432 const wxRibbonPageTabInfoArray
& pages
);
434 void DrawTabCtrlBackground(
439 void DrawTab(wxDC
& dc
,
441 const wxRibbonPageTabInfo
& tab
);
443 void DrawTabSeparator(
449 void DrawPageBackground(
454 void DrawScrollButton(
460 void DrawPanelBackground(
465 void DrawGalleryBackground(
467 wxRibbonGallery
* wnd
,
470 void DrawGalleryItemBackground(
472 wxRibbonGallery
* wnd
,
474 wxRibbonGalleryItem
* item
);
476 void DrawMinimisedPanel(
482 void DrawButtonBarBackground(
487 void DrawButtonBarButton(
491 wxRibbonButtonKind kind
,
493 const wxString
& label
,
494 const wxBitmap
& bitmap_large
,
495 const wxBitmap
& bitmap_small
);
497 void DrawToolBarBackground(
502 void DrawToolGroupBackground(
511 const wxBitmap
& bitmap
,
512 wxRibbonButtonKind kind
,
515 void DrawToggleButton(
519 wxRibbonDisplayMode mode
);
521 void DrawHelpButton(wxDC
& dc
,
528 const wxString
& label
,
529 const wxBitmap
& bitmap
,
531 int* small_begin_need_separator
,
532 int* small_must_have_separator
,
535 wxSize
GetScrollButtonMinimumSize(
542 const wxRibbonPanel
* wnd
,
544 wxPoint
* client_offset
);
546 wxSize
GetPanelClientSize(
548 const wxRibbonPanel
* wnd
,
550 wxPoint
* client_offset
);
552 wxRect
GetPanelExtButtonArea(
554 const wxRibbonPanel
* wnd
,
557 wxSize
GetGallerySize(
559 const wxRibbonGallery
* wnd
,
562 wxSize
GetGalleryClientSize(
564 const wxRibbonGallery
* wnd
,
566 wxPoint
* client_offset
,
567 wxRect
* scroll_up_button
,
568 wxRect
* scroll_down_button
,
569 wxRect
* extension_button
);
571 wxRect
GetPageBackgroundRedrawArea(
573 const wxRibbonPage
* wnd
,
574 wxSize page_old_size
,
575 wxSize page_new_size
);
577 bool GetButtonBarButtonSize(
580 wxRibbonButtonKind kind
,
581 wxRibbonButtonBarButtonState size
,
582 const wxString
& label
,
583 wxSize bitmap_size_large
,
584 wxSize bitmap_size_small
,
586 wxRect
* normal_region
,
587 wxRect
* dropdown_region
);
589 wxSize
GetMinimisedPanelMinimumSize(
591 const wxRibbonPanel
* wnd
,
592 wxSize
* desired_bitmap_size
,
593 wxDirection
* expanded_panel_direction
);
599 wxRibbonButtonKind kind
,
602 wxRect
* dropdown_region
);
604 wxRect
GetBarToggleButtonArea(const wxRect
& rect
);
606 wxRect
GetRibbonHelpButtonArea(const wxRect
& rect
);
609 void ReallyDrawTabSeparator(wxWindow
* wnd
, const wxRect
& rect
, double visibility
);
610 void DrawPartialPageBackground(wxDC
& dc
, wxWindow
* wnd
, const wxRect
& rect
,
611 bool allow_hovered
= true);
612 void DrawPartialPageBackground(wxDC
& dc
, wxWindow
* wnd
, const wxRect
& rect
,
613 wxRibbonPage
* page
, wxPoint offset
, bool hovered
= false);
614 void DrawPanelBorder(wxDC
& dc
, const wxRect
& rect
, wxPen
& primary_colour
,
615 wxPen
& secondary_colour
);
616 void RemovePanelPadding(wxRect
* rect
);
617 void DrawDropdownArrow(wxDC
& dc
, int x
, int y
, const wxColour
& colour
);
618 void DrawGalleryBackgroundCommon(wxDC
& dc
, wxRibbonGallery
* wnd
,
620 virtual void DrawGalleryButton(wxDC
& dc
, wxRect rect
,
621 wxRibbonGalleryButtonState state
, wxBitmap
* bitmaps
);
622 void DrawButtonBarButtonForeground(
625 wxRibbonButtonKind kind
,
627 const wxString
& label
,
628 const wxBitmap
& bitmap_large
,
629 const wxBitmap
& bitmap_small
);
630 void DrawMinimisedPanelCommon(
634 wxRect
* preview_rect
);
635 void CloneTo(wxRibbonMSWArtProvider
* copy
) const;
637 wxBitmap m_cached_tab_separator
;
638 wxBitmap m_gallery_up_bitmap
[4];
639 wxBitmap m_gallery_down_bitmap
[4];
640 wxBitmap m_gallery_extension_bitmap
[4];
641 wxBitmap m_toolbar_drop_bitmap
;
642 wxBitmap m_panel_extension_bitmap
[2];
643 wxBitmap m_ribbon_toggle_up_bitmap
[2];
644 wxBitmap m_ribbon_toggle_down_bitmap
[2];
645 wxBitmap m_ribbon_toggle_pin_bitmap
[2];
646 wxBitmap m_ribbon_bar_help_button_bitmap
[2];
648 wxColour m_primary_scheme_colour
;
649 wxColour m_secondary_scheme_colour
;
650 wxColour m_tertiary_scheme_colour
;
652 wxColour m_button_bar_label_colour
;
653 wxColour m_button_bar_label_disabled_colour
;
654 wxColour m_tab_label_colour
;
655 wxColour m_tab_separator_colour
;
656 wxColour m_tab_separator_gradient_colour
;
657 wxColour m_tab_active_background_colour
;
658 wxColour m_tab_active_background_gradient_colour
;
659 wxColour m_tab_hover_background_colour
;
660 wxColour m_tab_hover_background_gradient_colour
;
661 wxColour m_tab_hover_background_top_colour
;
662 wxColour m_tab_hover_background_top_gradient_colour
;
663 wxColour m_panel_label_colour
;
664 wxColour m_panel_minimised_label_colour
;
665 wxColour m_panel_hover_label_colour
;
666 wxColour m_panel_active_background_colour
;
667 wxColour m_panel_active_background_gradient_colour
;
668 wxColour m_panel_active_background_top_colour
;
669 wxColour m_panel_active_background_top_gradient_colour
;
670 wxColour m_panel_button_face_colour
;
671 wxColour m_panel_button_hover_face_colour
;
672 wxColour m_page_toggle_face_colour
;
673 wxColour m_page_toggle_hover_face_colour
;
674 wxColour m_page_background_colour
;
675 wxColour m_page_background_gradient_colour
;
676 wxColour m_page_background_top_colour
;
677 wxColour m_page_background_top_gradient_colour
;
678 wxColour m_page_hover_background_colour
;
679 wxColour m_page_hover_background_gradient_colour
;
680 wxColour m_page_hover_background_top_colour
;
681 wxColour m_page_hover_background_top_gradient_colour
;
682 wxColour m_button_bar_hover_background_colour
;
683 wxColour m_button_bar_hover_background_gradient_colour
;
684 wxColour m_button_bar_hover_background_top_colour
;
685 wxColour m_button_bar_hover_background_top_gradient_colour
;
686 wxColour m_button_bar_active_background_colour
;
687 wxColour m_button_bar_active_background_gradient_colour
;
688 wxColour m_button_bar_active_background_top_colour
;
689 wxColour m_button_bar_active_background_top_gradient_colour
;
690 wxColour m_gallery_button_background_colour
;
691 wxColour m_gallery_button_background_gradient_colour
;
692 wxColour m_gallery_button_hover_background_colour
;
693 wxColour m_gallery_button_hover_background_gradient_colour
;
694 wxColour m_gallery_button_active_background_colour
;
695 wxColour m_gallery_button_active_background_gradient_colour
;
696 wxColour m_gallery_button_disabled_background_colour
;
697 wxColour m_gallery_button_disabled_background_gradient_colour
;
698 wxColour m_gallery_button_face_colour
;
699 wxColour m_gallery_button_hover_face_colour
;
700 wxColour m_gallery_button_active_face_colour
;
701 wxColour m_gallery_button_disabled_face_colour
;
703 wxColour m_tool_face_colour
;
704 wxColour m_tool_background_top_colour
;
705 wxColour m_tool_background_top_gradient_colour
;
706 wxColour m_tool_background_colour
;
707 wxColour m_tool_background_gradient_colour
;
708 wxColour m_tool_hover_background_top_colour
;
709 wxColour m_tool_hover_background_top_gradient_colour
;
710 wxColour m_tool_hover_background_colour
;
711 wxColour m_tool_hover_background_gradient_colour
;
712 wxColour m_tool_active_background_top_colour
;
713 wxColour m_tool_active_background_top_gradient_colour
;
714 wxColour m_tool_active_background_colour
;
715 wxColour m_tool_active_background_gradient_colour
;
717 wxBrush m_tab_ctrl_background_brush
;
718 wxBrush m_panel_label_background_brush
;
719 wxBrush m_panel_hover_label_background_brush
;
720 wxBrush m_panel_hover_button_background_brush
;
721 wxBrush m_gallery_hover_background_brush
;
722 wxBrush m_gallery_button_background_top_brush
;
723 wxBrush m_gallery_button_hover_background_top_brush
;
724 wxBrush m_gallery_button_active_background_top_brush
;
725 wxBrush m_gallery_button_disabled_background_top_brush
;
726 wxBrush m_ribbon_toggle_brush
;
728 wxFont m_tab_label_font
;
729 wxFont m_panel_label_font
;
730 wxFont m_button_bar_label_font
;
732 wxPen m_page_border_pen
;
733 wxPen m_panel_border_pen
;
734 wxPen m_panel_border_gradient_pen
;
735 wxPen m_panel_minimised_border_pen
;
736 wxPen m_panel_minimised_border_gradient_pen
;
737 wxPen m_panel_hover_button_border_pen
;
738 wxPen m_tab_border_pen
;
739 wxPen m_button_bar_hover_border_pen
;
740 wxPen m_button_bar_active_border_pen
;
741 wxPen m_gallery_border_pen
;
742 wxPen m_gallery_item_border_pen
;
743 wxPen m_toolbar_border_pen
;
744 wxPen m_ribbon_toggle_pen
;
746 double m_cached_tab_separator_visibility
;
749 int m_tab_separation_size
;
750 int m_page_border_left
;
751 int m_page_border_top
;
752 int m_page_border_right
;
753 int m_page_border_bottom
;
754 int m_panel_x_separation_size
;
755 int m_panel_y_separation_size
;
756 int m_tool_group_separation_size
;
757 int m_gallery_bitmap_padding_left_size
;
758 int m_gallery_bitmap_padding_right_size
;
759 int m_gallery_bitmap_padding_top_size
;
760 int m_gallery_bitmap_padding_bottom_size
;
761 int m_toggle_button_offset
;
762 int m_help_button_offset
;
765 class WXDLLIMPEXP_RIBBON wxRibbonAUIArtProvider
: public wxRibbonMSWArtProvider
768 wxRibbonAUIArtProvider();
769 virtual ~wxRibbonAUIArtProvider();
771 wxRibbonArtProvider
* Clone() const;
773 wxColour
GetColour(int id
) const;
774 void SetColour(int id
, const wxColor
& colour
);
775 void SetColourScheme(const wxColour
& primary
,
776 const wxColour
& secondary
,
777 const wxColour
& tertiary
);
778 void SetFont(int id
, const wxFont
& font
);
780 wxSize
GetScrollButtonMinimumSize(
785 void DrawScrollButton(
793 const wxRibbonPanel
* wnd
,
795 wxPoint
* client_offset
);
797 wxSize
GetPanelClientSize(
799 const wxRibbonPanel
* wnd
,
801 wxPoint
* client_offset
);
803 wxRect
GetPanelExtButtonArea(
805 const wxRibbonPanel
* wnd
,
808 void DrawTabCtrlBackground(
813 int GetTabCtrlHeight(
816 const wxRibbonPageTabInfoArray
& pages
);
821 const wxString
& label
,
822 const wxBitmap
& bitmap
,
824 int* small_begin_need_separator
,
825 int* small_must_have_separator
,
828 void DrawTab(wxDC
& dc
,
830 const wxRibbonPageTabInfo
& tab
);
832 void DrawTabSeparator(
838 void DrawPageBackground(
843 void DrawPanelBackground(
848 void DrawMinimisedPanel(
854 void DrawGalleryBackground(
856 wxRibbonGallery
* wnd
,
859 void DrawGalleryItemBackground(
861 wxRibbonGallery
* wnd
,
863 wxRibbonGalleryItem
* item
);
865 void DrawButtonBarBackground(
870 void DrawButtonBarButton(
874 wxRibbonButtonKind kind
,
876 const wxString
& label
,
877 const wxBitmap
& bitmap_large
,
878 const wxBitmap
& bitmap_small
);
880 void DrawToolBarBackground(
885 void DrawToolGroupBackground(
894 const wxBitmap
& bitmap
,
895 wxRibbonButtonKind kind
,
899 void DrawPartialPanelBackground(wxDC
& dc
, wxWindow
* wnd
,
901 void DrawGalleryButton(wxDC
& dc
, wxRect rect
,
902 wxRibbonGalleryButtonState state
, wxBitmap
* bitmaps
);
904 wxColour m_tab_ctrl_background_colour
;
905 wxColour m_tab_ctrl_background_gradient_colour
;
906 wxColour m_panel_label_background_colour
;
907 wxColour m_panel_label_background_gradient_colour
;
908 wxColour m_panel_hover_label_background_colour
;
909 wxColour m_panel_hover_label_background_gradient_colour
;
911 wxBrush m_background_brush
;
912 wxBrush m_tab_active_top_background_brush
;
913 wxBrush m_tab_hover_background_brush
;
914 wxBrush m_button_bar_hover_background_brush
;
915 wxBrush m_button_bar_active_background_brush
;
916 wxBrush m_gallery_button_active_background_brush
;
917 wxBrush m_gallery_button_hover_background_brush
;
918 wxBrush m_gallery_button_disabled_background_brush
;
919 wxBrush m_tool_hover_background_brush
;
920 wxBrush m_tool_active_background_brush
;
922 wxPen m_toolbar_hover_borden_pen
;
924 wxFont m_tab_active_label_font
;
927 #if defined(__WXMSW__)
928 typedef wxRibbonMSWArtProvider wxRibbonDefaultArtProvider
;
929 #elif defined(__WXOSX_CARBON__) || \
930 defined(__WXOSX_COCOA__) || \
931 defined(__WXOSX_IPHONE__) || \
933 // TODO: Once implemented, change typedef to OSX
934 // typedef wxRibbonOSXArtProvider wxRibbonDefaultArtProvider;
935 typedef wxRibbonAUIArtProvider wxRibbonDefaultArtProvider
;
937 // TODO: Once implemented, change typedef to AUI
938 typedef wxRibbonAUIArtProvider wxRibbonDefaultArtProvider
;
941 #endif // wxUSE_RIBBON
943 #endif // _WX_RIBBON_ART_H_