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"
24 #include "wx/ribbon/bar.h"
26 class WXDLLIMPEXP_FWD_CORE wxDC
;
27 class WXDLLIMPEXP_FWD_CORE wxWindow
;
29 enum wxRibbonArtSetting
31 wxRIBBON_ART_TAB_SEPARATION_SIZE
,
32 wxRIBBON_ART_PAGE_BORDER_LEFT_SIZE
,
33 wxRIBBON_ART_PAGE_BORDER_TOP_SIZE
,
34 wxRIBBON_ART_PAGE_BORDER_RIGHT_SIZE
,
35 wxRIBBON_ART_PAGE_BORDER_BOTTOM_SIZE
,
36 wxRIBBON_ART_PANEL_X_SEPARATION_SIZE
,
37 wxRIBBON_ART_PANEL_Y_SEPARATION_SIZE
,
38 wxRIBBON_ART_TOOL_GROUP_SEPARATION_SIZE
,
39 wxRIBBON_ART_GALLERY_BITMAP_PADDING_LEFT_SIZE
,
40 wxRIBBON_ART_GALLERY_BITMAP_PADDING_RIGHT_SIZE
,
41 wxRIBBON_ART_GALLERY_BITMAP_PADDING_TOP_SIZE
,
42 wxRIBBON_ART_GALLERY_BITMAP_PADDING_BOTTOM_SIZE
,
43 wxRIBBON_ART_PANEL_LABEL_FONT
,
44 wxRIBBON_ART_BUTTON_BAR_LABEL_FONT
,
45 wxRIBBON_ART_TAB_LABEL_FONT
,
46 wxRIBBON_ART_BUTTON_BAR_LABEL_COLOUR
,
47 wxRIBBON_ART_BUTTON_BAR_HOVER_BORDER_COLOUR
,
48 wxRIBBON_ART_BUTTON_BAR_HOVER_BACKGROUND_TOP_COLOUR
,
49 wxRIBBON_ART_BUTTON_BAR_HOVER_BACKGROUND_TOP_GRADIENT_COLOUR
,
50 wxRIBBON_ART_BUTTON_BAR_HOVER_BACKGROUND_COLOUR
,
51 wxRIBBON_ART_BUTTON_BAR_HOVER_BACKGROUND_GRADIENT_COLOUR
,
52 wxRIBBON_ART_BUTTON_BAR_ACTIVE_BORDER_COLOUR
,
53 wxRIBBON_ART_BUTTON_BAR_ACTIVE_BACKGROUND_TOP_COLOUR
,
54 wxRIBBON_ART_BUTTON_BAR_ACTIVE_BACKGROUND_TOP_GRADIENT_COLOUR
,
55 wxRIBBON_ART_BUTTON_BAR_ACTIVE_BACKGROUND_COLOUR
,
56 wxRIBBON_ART_BUTTON_BAR_ACTIVE_BACKGROUND_GRADIENT_COLOUR
,
57 wxRIBBON_ART_GALLERY_BORDER_COLOUR
,
58 wxRIBBON_ART_GALLERY_HOVER_BACKGROUND_COLOUR
,
59 wxRIBBON_ART_GALLERY_BUTTON_BACKGROUND_COLOUR
,
60 wxRIBBON_ART_GALLERY_BUTTON_BACKGROUND_GRADIENT_COLOUR
,
61 wxRIBBON_ART_GALLERY_BUTTON_BACKGROUND_TOP_COLOUR
,
62 wxRIBBON_ART_GALLERY_BUTTON_FACE_COLOUR
,
63 wxRIBBON_ART_GALLERY_BUTTON_HOVER_BACKGROUND_COLOUR
,
64 wxRIBBON_ART_GALLERY_BUTTON_HOVER_BACKGROUND_GRADIENT_COLOUR
,
65 wxRIBBON_ART_GALLERY_BUTTON_HOVER_BACKGROUND_TOP_COLOUR
,
66 wxRIBBON_ART_GALLERY_BUTTON_HOVER_FACE_COLOUR
,
67 wxRIBBON_ART_GALLERY_BUTTON_ACTIVE_BACKGROUND_COLOUR
,
68 wxRIBBON_ART_GALLERY_BUTTON_ACTIVE_BACKGROUND_GRADIENT_COLOUR
,
69 wxRIBBON_ART_GALLERY_BUTTON_ACTIVE_BACKGROUND_TOP_COLOUR
,
70 wxRIBBON_ART_GALLERY_BUTTON_ACTIVE_FACE_COLOUR
,
71 wxRIBBON_ART_GALLERY_BUTTON_DISABLED_BACKGROUND_COLOUR
,
72 wxRIBBON_ART_GALLERY_BUTTON_DISABLED_BACKGROUND_GRADIENT_COLOUR
,
73 wxRIBBON_ART_GALLERY_BUTTON_DISABLED_BACKGROUND_TOP_COLOUR
,
74 wxRIBBON_ART_GALLERY_BUTTON_DISABLED_FACE_COLOUR
,
75 wxRIBBON_ART_GALLERY_ITEM_BORDER_COLOUR
,
76 wxRIBBON_ART_TAB_LABEL_COLOUR
,
77 wxRIBBON_ART_TAB_SEPARATOR_COLOUR
,
78 wxRIBBON_ART_TAB_SEPARATOR_GRADIENT_COLOUR
,
79 wxRIBBON_ART_TAB_CTRL_BACKGROUND_COLOUR
,
80 wxRIBBON_ART_TAB_CTRL_BACKGROUND_GRADIENT_COLOUR
,
81 wxRIBBON_ART_TAB_HOVER_BACKGROUND_TOP_COLOUR
,
82 wxRIBBON_ART_TAB_HOVER_BACKGROUND_TOP_GRADIENT_COLOUR
,
83 wxRIBBON_ART_TAB_HOVER_BACKGROUND_COLOUR
,
84 wxRIBBON_ART_TAB_HOVER_BACKGROUND_GRADIENT_COLOUR
,
85 wxRIBBON_ART_TAB_ACTIVE_BACKGROUND_TOP_COLOUR
,
86 wxRIBBON_ART_TAB_ACTIVE_BACKGROUND_TOP_GRADIENT_COLOUR
,
87 wxRIBBON_ART_TAB_ACTIVE_BACKGROUND_COLOUR
,
88 wxRIBBON_ART_TAB_ACTIVE_BACKGROUND_GRADIENT_COLOUR
,
89 wxRIBBON_ART_TAB_BORDER_COLOUR
,
90 wxRIBBON_ART_PANEL_BORDER_COLOUR
,
91 wxRIBBON_ART_PANEL_BORDER_GRADIENT_COLOUR
,
92 wxRIBBON_ART_PANEL_MINIMISED_BORDER_COLOUR
,
93 wxRIBBON_ART_PANEL_MINIMISED_BORDER_GRADIENT_COLOUR
,
94 wxRIBBON_ART_PANEL_LABEL_BACKGROUND_COLOUR
,
95 wxRIBBON_ART_PANEL_LABEL_BACKGROUND_GRADIENT_COLOUR
,
96 wxRIBBON_ART_PANEL_LABEL_COLOUR
,
97 wxRIBBON_ART_PANEL_HOVER_LABEL_BACKGROUND_COLOUR
,
98 wxRIBBON_ART_PANEL_HOVER_LABEL_BACKGROUND_GRADIENT_COLOUR
,
99 wxRIBBON_ART_PANEL_HOVER_LABEL_COLOUR
,
100 wxRIBBON_ART_PANEL_MINIMISED_LABEL_COLOUR
,
101 wxRIBBON_ART_PANEL_ACTIVE_BACKGROUND_TOP_COLOUR
,
102 wxRIBBON_ART_PANEL_ACTIVE_BACKGROUND_TOP_GRADIENT_COLOUR
,
103 wxRIBBON_ART_PANEL_ACTIVE_BACKGROUND_COLOUR
,
104 wxRIBBON_ART_PANEL_ACTIVE_BACKGROUND_GRADIENT_COLOUR
,
105 wxRIBBON_ART_PANEL_BUTTON_FACE_COLOUR
,
106 wxRIBBON_ART_PANEL_BUTTON_HOVER_FACE_COLOUR
,
108 wxRIBBON_ART_PAGE_TOGGLE_FACE_COLOUR
,
109 wxRIBBON_ART_PAGE_TOGGLE_HOVER_FACE_COLOUR
,
111 wxRIBBON_ART_PAGE_BORDER_COLOUR
,
112 wxRIBBON_ART_PAGE_BACKGROUND_TOP_COLOUR
,
113 wxRIBBON_ART_PAGE_BACKGROUND_TOP_GRADIENT_COLOUR
,
114 wxRIBBON_ART_PAGE_BACKGROUND_COLOUR
,
115 wxRIBBON_ART_PAGE_BACKGROUND_GRADIENT_COLOUR
,
116 wxRIBBON_ART_PAGE_HOVER_BACKGROUND_TOP_COLOUR
,
117 wxRIBBON_ART_PAGE_HOVER_BACKGROUND_TOP_GRADIENT_COLOUR
,
118 wxRIBBON_ART_PAGE_HOVER_BACKGROUND_COLOUR
,
119 wxRIBBON_ART_PAGE_HOVER_BACKGROUND_GRADIENT_COLOUR
,
120 wxRIBBON_ART_TOOLBAR_BORDER_COLOUR
,
121 wxRIBBON_ART_TOOLBAR_HOVER_BORDER_COLOUR
,
122 wxRIBBON_ART_TOOLBAR_FACE_COLOUR
,
123 wxRIBBON_ART_TOOL_BACKGROUND_TOP_COLOUR
,
124 wxRIBBON_ART_TOOL_BACKGROUND_TOP_GRADIENT_COLOUR
,
125 wxRIBBON_ART_TOOL_BACKGROUND_COLOUR
,
126 wxRIBBON_ART_TOOL_BACKGROUND_GRADIENT_COLOUR
,
127 wxRIBBON_ART_TOOL_HOVER_BACKGROUND_TOP_COLOUR
,
128 wxRIBBON_ART_TOOL_HOVER_BACKGROUND_TOP_GRADIENT_COLOUR
,
129 wxRIBBON_ART_TOOL_HOVER_BACKGROUND_COLOUR
,
130 wxRIBBON_ART_TOOL_HOVER_BACKGROUND_GRADIENT_COLOUR
,
131 wxRIBBON_ART_TOOL_ACTIVE_BACKGROUND_TOP_COLOUR
,
132 wxRIBBON_ART_TOOL_ACTIVE_BACKGROUND_TOP_GRADIENT_COLOUR
,
133 wxRIBBON_ART_TOOL_ACTIVE_BACKGROUND_COLOUR
,
134 wxRIBBON_ART_TOOL_ACTIVE_BACKGROUND_GRADIENT_COLOUR
,
135 wxRIBBON_ART_BUTTON_BAR_LABEL_DISABLED_COLOUR
138 enum wxRibbonScrollButtonStyle
140 wxRIBBON_SCROLL_BTN_LEFT
= 0,
141 wxRIBBON_SCROLL_BTN_RIGHT
= 1,
142 wxRIBBON_SCROLL_BTN_UP
= 2,
143 wxRIBBON_SCROLL_BTN_DOWN
= 3,
145 wxRIBBON_SCROLL_BTN_DIRECTION_MASK
= 3,
147 wxRIBBON_SCROLL_BTN_NORMAL
= 0,
148 wxRIBBON_SCROLL_BTN_HOVERED
= 4,
149 wxRIBBON_SCROLL_BTN_ACTIVE
= 8,
151 wxRIBBON_SCROLL_BTN_STATE_MASK
= 12,
153 wxRIBBON_SCROLL_BTN_FOR_OTHER
= 0,
154 wxRIBBON_SCROLL_BTN_FOR_TABS
= 16,
155 wxRIBBON_SCROLL_BTN_FOR_PAGE
= 32,
157 wxRIBBON_SCROLL_BTN_FOR_MASK
= 48
160 enum wxRibbonButtonKind
162 wxRIBBON_BUTTON_NORMAL
= 1 << 0,
163 wxRIBBON_BUTTON_DROPDOWN
= 1 << 1,
164 wxRIBBON_BUTTON_HYBRID
= wxRIBBON_BUTTON_NORMAL
| wxRIBBON_BUTTON_DROPDOWN
,
165 wxRIBBON_BUTTON_TOGGLE
= 1 << 2
168 enum wxRibbonButtonBarButtonState
170 wxRIBBON_BUTTONBAR_BUTTON_SMALL
= 0 << 0,
171 wxRIBBON_BUTTONBAR_BUTTON_MEDIUM
= 1 << 0,
172 wxRIBBON_BUTTONBAR_BUTTON_LARGE
= 2 << 0,
173 wxRIBBON_BUTTONBAR_BUTTON_SIZE_MASK
= 3 << 0,
175 wxRIBBON_BUTTONBAR_BUTTON_NORMAL_HOVERED
= 1 << 3,
176 wxRIBBON_BUTTONBAR_BUTTON_DROPDOWN_HOVERED
= 1 << 4,
177 wxRIBBON_BUTTONBAR_BUTTON_HOVER_MASK
= wxRIBBON_BUTTONBAR_BUTTON_NORMAL_HOVERED
| wxRIBBON_BUTTONBAR_BUTTON_DROPDOWN_HOVERED
,
178 wxRIBBON_BUTTONBAR_BUTTON_NORMAL_ACTIVE
= 1 << 5,
179 wxRIBBON_BUTTONBAR_BUTTON_DROPDOWN_ACTIVE
= 1 << 6,
180 wxRIBBON_BUTTONBAR_BUTTON_ACTIVE_MASK
= wxRIBBON_BUTTONBAR_BUTTON_NORMAL_ACTIVE
| wxRIBBON_BUTTONBAR_BUTTON_DROPDOWN_ACTIVE
,
181 wxRIBBON_BUTTONBAR_BUTTON_DISABLED
= 1 << 7,
182 wxRIBBON_BUTTONBAR_BUTTON_TOGGLED
= 1 << 8,
183 wxRIBBON_BUTTONBAR_BUTTON_STATE_MASK
= 0x1F8
186 enum wxRibbonGalleryButtonState
188 wxRIBBON_GALLERY_BUTTON_NORMAL
,
189 wxRIBBON_GALLERY_BUTTON_HOVERED
,
190 wxRIBBON_GALLERY_BUTTON_ACTIVE
,
191 wxRIBBON_GALLERY_BUTTON_DISABLED
197 class wxRibbonGallery
;
198 class wxRibbonGalleryItem
;
199 class wxRibbonPageTabInfo
;
200 class wxRibbonPageTabInfoArray
;
202 class WXDLLIMPEXP_RIBBON wxRibbonArtProvider
205 wxRibbonArtProvider();
206 virtual ~wxRibbonArtProvider();
208 virtual wxRibbonArtProvider
* Clone() const = 0;
209 virtual void SetFlags(long flags
) = 0;
210 virtual long GetFlags() const = 0;
212 virtual int GetMetric(int id
) const = 0;
213 virtual void SetMetric(int id
, int new_val
) = 0;
214 virtual void SetFont(int id
, const wxFont
& font
) = 0;
215 virtual wxFont
GetFont(int id
) const = 0;
216 virtual wxColour
GetColour(int id
) const = 0;
217 virtual void SetColour(int id
, const wxColor
& colour
) = 0;
218 wxColour
GetColor(int id
) const { return GetColour(id
); }
219 void SetColor(int id
, const wxColour
& color
) { SetColour(id
, color
); }
220 virtual void GetColourScheme(wxColour
* primary
,
222 wxColour
* tertiary
) const = 0;
223 virtual void SetColourScheme(const wxColour
& primary
,
224 const wxColour
& secondary
,
225 const wxColour
& tertiary
) = 0;
227 virtual void DrawTabCtrlBackground(
230 const wxRect
& rect
) = 0;
232 virtual void DrawTab(wxDC
& dc
,
234 const wxRibbonPageTabInfo
& tab
) = 0;
236 virtual void DrawTabSeparator(wxDC
& dc
,
239 double visibility
) = 0;
241 virtual void DrawPageBackground(
244 const wxRect
& rect
) = 0;
246 virtual void DrawScrollButton(
252 virtual void DrawPanelBackground(
255 const wxRect
& rect
) = 0;
257 virtual void DrawGalleryBackground(
259 wxRibbonGallery
* wnd
,
260 const wxRect
& rect
) = 0;
262 virtual void DrawGalleryItemBackground(
264 wxRibbonGallery
* wnd
,
266 wxRibbonGalleryItem
* item
) = 0;
268 virtual void DrawMinimisedPanel(
272 wxBitmap
& bitmap
) = 0;
274 virtual void DrawButtonBarBackground(
277 const wxRect
& rect
) = 0;
279 virtual void DrawButtonBarButton(
283 wxRibbonButtonKind kind
,
285 const wxString
& label
,
286 const wxBitmap
& bitmap_large
,
287 const wxBitmap
& bitmap_small
) = 0;
289 virtual void DrawToolBarBackground(
292 const wxRect
& rect
) = 0;
294 virtual void DrawToolGroupBackground(
297 const wxRect
& rect
) = 0;
299 virtual void DrawTool(
303 const wxBitmap
& bitmap
,
304 wxRibbonButtonKind kind
,
307 virtual void DrawToggleButton(
311 wxRibbonDisplayMode mode
) = 0;
313 virtual void DrawHelpButton(
316 const wxRect
& rect
) = 0;
318 virtual void GetBarTabWidth(
321 const wxString
& label
,
322 const wxBitmap
& bitmap
,
324 int* small_begin_need_separator
,
325 int* small_must_have_separator
,
328 virtual int GetTabCtrlHeight(
331 const wxRibbonPageTabInfoArray
& pages
) = 0;
333 virtual wxSize
GetScrollButtonMinimumSize(
338 virtual wxSize
GetPanelSize(
340 const wxRibbonPanel
* wnd
,
342 wxPoint
* client_offset
) = 0;
344 virtual wxSize
GetPanelClientSize(
346 const wxRibbonPanel
* wnd
,
348 wxPoint
* client_offset
) = 0;
350 virtual wxRect
GetPanelExtButtonArea(
352 const wxRibbonPanel
* wnd
,
355 virtual wxSize
GetGallerySize(
357 const wxRibbonGallery
* wnd
,
358 wxSize client_size
) = 0;
360 virtual wxSize
GetGalleryClientSize(
362 const wxRibbonGallery
* wnd
,
364 wxPoint
* client_offset
,
365 wxRect
* scroll_up_button
,
366 wxRect
* scroll_down_button
,
367 wxRect
* extension_button
) = 0;
369 virtual wxRect
GetPageBackgroundRedrawArea(
371 const wxRibbonPage
* wnd
,
372 wxSize page_old_size
,
373 wxSize page_new_size
) = 0;
375 virtual bool GetButtonBarButtonSize(
378 wxRibbonButtonKind kind
,
379 wxRibbonButtonBarButtonState size
,
380 const wxString
& label
,
381 wxSize bitmap_size_large
,
382 wxSize bitmap_size_small
,
384 wxRect
* normal_region
,
385 wxRect
* dropdown_region
) = 0;
387 virtual wxSize
GetMinimisedPanelMinimumSize(
389 const wxRibbonPanel
* wnd
,
390 wxSize
* desired_bitmap_size
,
391 wxDirection
* expanded_panel_direction
) = 0;
393 virtual wxSize
GetToolSize(
397 wxRibbonButtonKind kind
,
400 wxRect
* dropdown_region
) = 0;
402 virtual wxRect
GetBarToggleButtonArea(const wxRect
& rect
)= 0;
404 virtual wxRect
GetRibbonHelpButtonArea(const wxRect
& rect
) = 0;
407 class WXDLLIMPEXP_RIBBON wxRibbonMSWArtProvider
: public wxRibbonArtProvider
410 wxRibbonMSWArtProvider(bool set_colour_scheme
= true);
411 virtual ~wxRibbonMSWArtProvider();
413 wxRibbonArtProvider
* Clone() const;
414 void SetFlags(long flags
);
415 long GetFlags() const;
417 int GetMetric(int id
) const;
418 void SetMetric(int id
, int new_val
);
419 void SetFont(int id
, const wxFont
& font
);
420 wxFont
GetFont(int id
) const;
421 wxColour
GetColour(int id
) const;
422 void SetColour(int id
, const wxColor
& colour
);
423 void GetColourScheme(wxColour
* primary
,
425 wxColour
* tertiary
) const;
426 void SetColourScheme(const wxColour
& primary
,
427 const wxColour
& secondary
,
428 const wxColour
& tertiary
);
430 int GetTabCtrlHeight(
433 const wxRibbonPageTabInfoArray
& pages
);
435 void DrawTabCtrlBackground(
440 void DrawTab(wxDC
& dc
,
442 const wxRibbonPageTabInfo
& tab
);
444 void DrawTabSeparator(
450 void DrawPageBackground(
455 void DrawScrollButton(
461 void DrawPanelBackground(
466 void DrawGalleryBackground(
468 wxRibbonGallery
* wnd
,
471 void DrawGalleryItemBackground(
473 wxRibbonGallery
* wnd
,
475 wxRibbonGalleryItem
* item
);
477 void DrawMinimisedPanel(
483 void DrawButtonBarBackground(
488 void DrawButtonBarButton(
492 wxRibbonButtonKind kind
,
494 const wxString
& label
,
495 const wxBitmap
& bitmap_large
,
496 const wxBitmap
& bitmap_small
);
498 void DrawToolBarBackground(
503 void DrawToolGroupBackground(
512 const wxBitmap
& bitmap
,
513 wxRibbonButtonKind kind
,
516 void DrawToggleButton(
520 wxRibbonDisplayMode mode
);
522 void DrawHelpButton(wxDC
& dc
,
529 const wxString
& label
,
530 const wxBitmap
& bitmap
,
532 int* small_begin_need_separator
,
533 int* small_must_have_separator
,
536 wxSize
GetScrollButtonMinimumSize(
543 const wxRibbonPanel
* wnd
,
545 wxPoint
* client_offset
);
547 wxSize
GetPanelClientSize(
549 const wxRibbonPanel
* wnd
,
551 wxPoint
* client_offset
);
553 wxRect
GetPanelExtButtonArea(
555 const wxRibbonPanel
* wnd
,
558 wxSize
GetGallerySize(
560 const wxRibbonGallery
* wnd
,
563 wxSize
GetGalleryClientSize(
565 const wxRibbonGallery
* wnd
,
567 wxPoint
* client_offset
,
568 wxRect
* scroll_up_button
,
569 wxRect
* scroll_down_button
,
570 wxRect
* extension_button
);
572 wxRect
GetPageBackgroundRedrawArea(
574 const wxRibbonPage
* wnd
,
575 wxSize page_old_size
,
576 wxSize page_new_size
);
578 bool GetButtonBarButtonSize(
581 wxRibbonButtonKind kind
,
582 wxRibbonButtonBarButtonState size
,
583 const wxString
& label
,
584 wxSize bitmap_size_large
,
585 wxSize bitmap_size_small
,
587 wxRect
* normal_region
,
588 wxRect
* dropdown_region
);
590 wxSize
GetMinimisedPanelMinimumSize(
592 const wxRibbonPanel
* wnd
,
593 wxSize
* desired_bitmap_size
,
594 wxDirection
* expanded_panel_direction
);
600 wxRibbonButtonKind kind
,
603 wxRect
* dropdown_region
);
605 wxRect
GetBarToggleButtonArea(const wxRect
& rect
);
607 wxRect
GetRibbonHelpButtonArea(const wxRect
& rect
);
610 void ReallyDrawTabSeparator(wxWindow
* wnd
, const wxRect
& rect
, double visibility
);
611 void DrawPartialPageBackground(wxDC
& dc
, wxWindow
* wnd
, const wxRect
& rect
,
612 bool allow_hovered
= true);
613 void DrawPartialPageBackground(wxDC
& dc
, wxWindow
* wnd
, const wxRect
& rect
,
614 wxRibbonPage
* page
, wxPoint offset
, bool hovered
= false);
615 void DrawPanelBorder(wxDC
& dc
, const wxRect
& rect
, wxPen
& primary_colour
,
616 wxPen
& secondary_colour
);
617 void RemovePanelPadding(wxRect
* rect
);
618 void DrawDropdownArrow(wxDC
& dc
, int x
, int y
, const wxColour
& colour
);
619 void DrawGalleryBackgroundCommon(wxDC
& dc
, wxRibbonGallery
* wnd
,
621 virtual void DrawGalleryButton(wxDC
& dc
, wxRect rect
,
622 wxRibbonGalleryButtonState state
, wxBitmap
* bitmaps
);
623 void DrawButtonBarButtonForeground(
626 wxRibbonButtonKind kind
,
628 const wxString
& label
,
629 const wxBitmap
& bitmap_large
,
630 const wxBitmap
& bitmap_small
);
631 void DrawMinimisedPanelCommon(
635 wxRect
* preview_rect
);
636 void CloneTo(wxRibbonMSWArtProvider
* copy
) const;
638 wxBitmap m_cached_tab_separator
;
639 wxBitmap m_gallery_up_bitmap
[4];
640 wxBitmap m_gallery_down_bitmap
[4];
641 wxBitmap m_gallery_extension_bitmap
[4];
642 wxBitmap m_toolbar_drop_bitmap
;
643 wxBitmap m_panel_extension_bitmap
[2];
644 wxBitmap m_ribbon_toggle_up_bitmap
[2];
645 wxBitmap m_ribbon_toggle_down_bitmap
[2];
646 wxBitmap m_ribbon_toggle_pin_bitmap
[2];
647 wxBitmap m_ribbon_bar_help_button_bitmap
[2];
649 wxColour m_primary_scheme_colour
;
650 wxColour m_secondary_scheme_colour
;
651 wxColour m_tertiary_scheme_colour
;
653 wxColour m_button_bar_label_colour
;
654 wxColour m_button_bar_label_disabled_colour
;
655 wxColour m_tab_label_colour
;
656 wxColour m_tab_separator_colour
;
657 wxColour m_tab_separator_gradient_colour
;
658 wxColour m_tab_active_background_colour
;
659 wxColour m_tab_active_background_gradient_colour
;
660 wxColour m_tab_hover_background_colour
;
661 wxColour m_tab_hover_background_gradient_colour
;
662 wxColour m_tab_hover_background_top_colour
;
663 wxColour m_tab_hover_background_top_gradient_colour
;
664 wxColour m_panel_label_colour
;
665 wxColour m_panel_minimised_label_colour
;
666 wxColour m_panel_hover_label_colour
;
667 wxColour m_panel_active_background_colour
;
668 wxColour m_panel_active_background_gradient_colour
;
669 wxColour m_panel_active_background_top_colour
;
670 wxColour m_panel_active_background_top_gradient_colour
;
671 wxColour m_panel_button_face_colour
;
672 wxColour m_panel_button_hover_face_colour
;
673 wxColour m_page_toggle_face_colour
;
674 wxColour m_page_toggle_hover_face_colour
;
675 wxColour m_page_background_colour
;
676 wxColour m_page_background_gradient_colour
;
677 wxColour m_page_background_top_colour
;
678 wxColour m_page_background_top_gradient_colour
;
679 wxColour m_page_hover_background_colour
;
680 wxColour m_page_hover_background_gradient_colour
;
681 wxColour m_page_hover_background_top_colour
;
682 wxColour m_page_hover_background_top_gradient_colour
;
683 wxColour m_button_bar_hover_background_colour
;
684 wxColour m_button_bar_hover_background_gradient_colour
;
685 wxColour m_button_bar_hover_background_top_colour
;
686 wxColour m_button_bar_hover_background_top_gradient_colour
;
687 wxColour m_button_bar_active_background_colour
;
688 wxColour m_button_bar_active_background_gradient_colour
;
689 wxColour m_button_bar_active_background_top_colour
;
690 wxColour m_button_bar_active_background_top_gradient_colour
;
691 wxColour m_gallery_button_background_colour
;
692 wxColour m_gallery_button_background_gradient_colour
;
693 wxColour m_gallery_button_hover_background_colour
;
694 wxColour m_gallery_button_hover_background_gradient_colour
;
695 wxColour m_gallery_button_active_background_colour
;
696 wxColour m_gallery_button_active_background_gradient_colour
;
697 wxColour m_gallery_button_disabled_background_colour
;
698 wxColour m_gallery_button_disabled_background_gradient_colour
;
699 wxColour m_gallery_button_face_colour
;
700 wxColour m_gallery_button_hover_face_colour
;
701 wxColour m_gallery_button_active_face_colour
;
702 wxColour m_gallery_button_disabled_face_colour
;
704 wxColour m_tool_face_colour
;
705 wxColour m_tool_background_top_colour
;
706 wxColour m_tool_background_top_gradient_colour
;
707 wxColour m_tool_background_colour
;
708 wxColour m_tool_background_gradient_colour
;
709 wxColour m_tool_hover_background_top_colour
;
710 wxColour m_tool_hover_background_top_gradient_colour
;
711 wxColour m_tool_hover_background_colour
;
712 wxColour m_tool_hover_background_gradient_colour
;
713 wxColour m_tool_active_background_top_colour
;
714 wxColour m_tool_active_background_top_gradient_colour
;
715 wxColour m_tool_active_background_colour
;
716 wxColour m_tool_active_background_gradient_colour
;
718 wxBrush m_tab_ctrl_background_brush
;
719 wxBrush m_panel_label_background_brush
;
720 wxBrush m_panel_hover_label_background_brush
;
721 wxBrush m_panel_hover_button_background_brush
;
722 wxBrush m_gallery_hover_background_brush
;
723 wxBrush m_gallery_button_background_top_brush
;
724 wxBrush m_gallery_button_hover_background_top_brush
;
725 wxBrush m_gallery_button_active_background_top_brush
;
726 wxBrush m_gallery_button_disabled_background_top_brush
;
727 wxBrush m_ribbon_toggle_brush
;
729 wxFont m_tab_label_font
;
730 wxFont m_panel_label_font
;
731 wxFont m_button_bar_label_font
;
733 wxPen m_page_border_pen
;
734 wxPen m_panel_border_pen
;
735 wxPen m_panel_border_gradient_pen
;
736 wxPen m_panel_minimised_border_pen
;
737 wxPen m_panel_minimised_border_gradient_pen
;
738 wxPen m_panel_hover_button_border_pen
;
739 wxPen m_tab_border_pen
;
740 wxPen m_button_bar_hover_border_pen
;
741 wxPen m_button_bar_active_border_pen
;
742 wxPen m_gallery_border_pen
;
743 wxPen m_gallery_item_border_pen
;
744 wxPen m_toolbar_border_pen
;
745 wxPen m_ribbon_toggle_pen
;
747 double m_cached_tab_separator_visibility
;
750 int m_tab_separation_size
;
751 int m_page_border_left
;
752 int m_page_border_top
;
753 int m_page_border_right
;
754 int m_page_border_bottom
;
755 int m_panel_x_separation_size
;
756 int m_panel_y_separation_size
;
757 int m_tool_group_separation_size
;
758 int m_gallery_bitmap_padding_left_size
;
759 int m_gallery_bitmap_padding_right_size
;
760 int m_gallery_bitmap_padding_top_size
;
761 int m_gallery_bitmap_padding_bottom_size
;
762 int m_toggle_button_offset
;
763 int m_help_button_offset
;
766 class WXDLLIMPEXP_RIBBON wxRibbonAUIArtProvider
: public wxRibbonMSWArtProvider
769 wxRibbonAUIArtProvider();
770 virtual ~wxRibbonAUIArtProvider();
772 wxRibbonArtProvider
* Clone() const;
774 wxColour
GetColour(int id
) const;
775 void SetColour(int id
, const wxColor
& colour
);
776 void SetColourScheme(const wxColour
& primary
,
777 const wxColour
& secondary
,
778 const wxColour
& tertiary
);
779 void SetFont(int id
, const wxFont
& font
);
781 wxSize
GetScrollButtonMinimumSize(
786 void DrawScrollButton(
794 const wxRibbonPanel
* wnd
,
796 wxPoint
* client_offset
);
798 wxSize
GetPanelClientSize(
800 const wxRibbonPanel
* wnd
,
802 wxPoint
* client_offset
);
804 wxRect
GetPanelExtButtonArea(
806 const wxRibbonPanel
* wnd
,
809 void DrawTabCtrlBackground(
814 int GetTabCtrlHeight(
817 const wxRibbonPageTabInfoArray
& pages
);
822 const wxString
& label
,
823 const wxBitmap
& bitmap
,
825 int* small_begin_need_separator
,
826 int* small_must_have_separator
,
829 void DrawTab(wxDC
& dc
,
831 const wxRibbonPageTabInfo
& tab
);
833 void DrawTabSeparator(
839 void DrawPageBackground(
844 void DrawPanelBackground(
849 void DrawMinimisedPanel(
855 void DrawGalleryBackground(
857 wxRibbonGallery
* wnd
,
860 void DrawGalleryItemBackground(
862 wxRibbonGallery
* wnd
,
864 wxRibbonGalleryItem
* item
);
866 void DrawButtonBarBackground(
871 void DrawButtonBarButton(
875 wxRibbonButtonKind kind
,
877 const wxString
& label
,
878 const wxBitmap
& bitmap_large
,
879 const wxBitmap
& bitmap_small
);
881 void DrawToolBarBackground(
886 void DrawToolGroupBackground(
895 const wxBitmap
& bitmap
,
896 wxRibbonButtonKind kind
,
900 void DrawPartialPanelBackground(wxDC
& dc
, wxWindow
* wnd
,
902 void DrawGalleryButton(wxDC
& dc
, wxRect rect
,
903 wxRibbonGalleryButtonState state
, wxBitmap
* bitmaps
);
905 wxColour m_tab_ctrl_background_colour
;
906 wxColour m_tab_ctrl_background_gradient_colour
;
907 wxColour m_panel_label_background_colour
;
908 wxColour m_panel_label_background_gradient_colour
;
909 wxColour m_panel_hover_label_background_colour
;
910 wxColour m_panel_hover_label_background_gradient_colour
;
912 wxBrush m_background_brush
;
913 wxBrush m_tab_active_top_background_brush
;
914 wxBrush m_tab_hover_background_brush
;
915 wxBrush m_button_bar_hover_background_brush
;
916 wxBrush m_button_bar_active_background_brush
;
917 wxBrush m_gallery_button_active_background_brush
;
918 wxBrush m_gallery_button_hover_background_brush
;
919 wxBrush m_gallery_button_disabled_background_brush
;
920 wxBrush m_tool_hover_background_brush
;
921 wxBrush m_tool_active_background_brush
;
923 wxPen m_toolbar_hover_borden_pen
;
925 wxFont m_tab_active_label_font
;
928 #if defined(__WXMSW__)
929 typedef wxRibbonMSWArtProvider wxRibbonDefaultArtProvider
;
930 #elif defined(__WXOSX_CARBON__) || \
931 defined(__WXOSX_COCOA__) || \
932 defined(__WXOSX_IPHONE__) || \
934 // TODO: Once implemented, change typedef to OSX
935 // typedef wxRibbonOSXArtProvider wxRibbonDefaultArtProvider;
936 typedef wxRibbonAUIArtProvider wxRibbonDefaultArtProvider
;
938 // TODO: Once implemented, change typedef to AUI
939 typedef wxRibbonAUIArtProvider wxRibbonDefaultArtProvider
;
942 #endif // wxUSE_RIBBON
944 #endif // _WX_RIBBON_ART_H_