1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: src/ribbon/gallery.cpp
3 // Purpose: Ribbon control which displays a gallery of items to choose from
4 // Author: Peter Cawley
8 // Copyright: (C) Peter Cawley
9 // Licence: wxWindows licence
10 ///////////////////////////////////////////////////////////////////////////////
12 #include "wx/wxprec.h"
20 #include "wx/ribbon/gallery.h"
21 #include "wx/ribbon/art.h"
22 #include "wx/ribbon/bar.h"
23 #include "wx/dcbuffer.h"
24 #include "wx/clntdata.h"
30 #include "wx/msw/private.h"
33 wxDEFINE_EVENT(wxEVT_COMMAND_RIBBONGALLERY_HOVER_CHANGED
, wxRibbonGalleryEvent
);
34 wxDEFINE_EVENT(wxEVT_COMMAND_RIBBONGALLERY_SELECTED
, wxRibbonGalleryEvent
);
36 IMPLEMENT_DYNAMIC_CLASS(wxRibbonGalleryEvent
, wxCommandEvent
)
37 IMPLEMENT_CLASS(wxRibbonGallery
, wxRibbonControl
)
39 class wxRibbonGalleryItem
48 void SetId(int id
) {m_id
= id
;}
49 void SetBitmap(const wxBitmap
& bitmap
) {m_bitmap
= bitmap
;}
50 const wxBitmap
& GetBitmap() const {return m_bitmap
;}
51 void SetIsVisible(bool visible
) {m_is_visible
= visible
;}
52 void SetPosition(int x
, int y
, const wxSize
& size
)
54 m_position
= wxRect(wxPoint(x
, y
), size
);
56 bool IsVisible() const {return m_is_visible
;}
57 const wxRect
& GetPosition() const {return m_position
;}
59 void SetClientObject(wxClientData
*data
) {m_client_data
.SetClientObject(data
);}
60 wxClientData
*GetClientObject() const {return m_client_data
.GetClientObject();}
61 void SetClientData(void *data
) {m_client_data
.SetClientData(data
);}
62 void *GetClientData() const {return m_client_data
.GetClientData();}
66 wxClientDataContainer m_client_data
;
72 BEGIN_EVENT_TABLE(wxRibbonGallery
, wxRibbonControl
)
73 EVT_ENTER_WINDOW(wxRibbonGallery::OnMouseEnter
)
74 EVT_ERASE_BACKGROUND(wxRibbonGallery::OnEraseBackground
)
75 EVT_LEAVE_WINDOW(wxRibbonGallery::OnMouseLeave
)
76 EVT_LEFT_DOWN(wxRibbonGallery::OnMouseDown
)
77 EVT_LEFT_UP(wxRibbonGallery::OnMouseUp
)
78 EVT_MOTION(wxRibbonGallery::OnMouseMove
)
79 EVT_PAINT(wxRibbonGallery::OnPaint
)
80 EVT_SIZE(wxRibbonGallery::OnSize
)
83 wxRibbonGallery::wxRibbonGallery()
87 wxRibbonGallery::wxRibbonGallery(wxWindow
* parent
,
92 : wxRibbonControl(parent
, id
, pos
, size
, wxBORDER_NONE
)
97 wxRibbonGallery::~wxRibbonGallery()
102 bool wxRibbonGallery::Create(wxWindow
* parent
,
108 if(!wxRibbonControl::Create(parent
, id
, pos
, size
, wxBORDER_NONE
))
117 void wxRibbonGallery::CommonInit(long WXUNUSED(style
))
119 m_selected_item
= NULL
;
120 m_hovered_item
= NULL
;
121 m_active_item
= NULL
;
122 m_scroll_up_button_rect
= wxRect(0, 0, 0, 0);
123 m_scroll_down_button_rect
= wxRect(0, 0, 0, 0);
124 m_extension_button_rect
= wxRect(0, 0, 0, 0);
125 m_mouse_active_rect
= NULL
;
126 m_bitmap_size
= wxSize(64, 32);
127 m_bitmap_padded_size
= m_bitmap_size
;
128 m_item_separation_x
= 0;
129 m_item_separation_y
= 0;
132 m_up_button_state
= wxRIBBON_GALLERY_BUTTON_DISABLED
;
133 m_down_button_state
= wxRIBBON_GALLERY_BUTTON_NORMAL
;
134 m_extension_button_state
= wxRIBBON_GALLERY_BUTTON_NORMAL
;
137 SetBackgroundStyle(wxBG_STYLE_CUSTOM
);
140 void wxRibbonGallery::OnMouseEnter(wxMouseEvent
& evt
)
143 if(m_mouse_active_rect
!= NULL
&& !evt
.LeftIsDown())
145 m_mouse_active_rect
= NULL
;
146 m_active_item
= NULL
;
151 void wxRibbonGallery::OnMouseMove(wxMouseEvent
& evt
)
153 bool refresh
= false;
154 wxPoint pos
= evt
.GetPosition();
156 if(TestButtonHover(m_scroll_up_button_rect
, pos
, &m_up_button_state
))
158 if(TestButtonHover(m_scroll_down_button_rect
, pos
, &m_down_button_state
))
160 if(TestButtonHover(m_extension_button_rect
, pos
, &m_extension_button_state
))
163 wxRibbonGalleryItem
*hovered_item
= NULL
;
164 wxRibbonGalleryItem
*active_item
= NULL
;
165 if(m_client_rect
.Contains(pos
))
167 if(m_art
&& m_art
->GetFlags() & wxRIBBON_BAR_FLOW_VERTICAL
)
168 pos
.x
+= m_scroll_amount
;
170 pos
.y
+= m_scroll_amount
;
172 size_t item_count
= m_items
.Count();
174 for(item_i
= 0; item_i
< item_count
; ++item_i
)
176 wxRibbonGalleryItem
*item
= m_items
.Item(item_i
);
177 if(!item
->IsVisible())
180 if(item
->GetPosition().Contains(pos
))
182 if(m_mouse_active_rect
== &item
->GetPosition())
189 if(active_item
!= m_active_item
)
191 m_active_item
= active_item
;
194 if(hovered_item
!= m_hovered_item
)
196 m_hovered_item
= hovered_item
;
197 wxRibbonGalleryEvent
notification(
198 wxEVT_COMMAND_RIBBONGALLERY_HOVER_CHANGED
, GetId());
199 notification
.SetEventObject(this);
200 notification
.SetGallery(this);
201 notification
.SetGalleryItem(hovered_item
);
202 ProcessWindowEvent(notification
);
210 bool wxRibbonGallery::TestButtonHover(const wxRect
& rect
, wxPoint pos
,
211 wxRibbonGalleryButtonState
* state
)
213 if(*state
== wxRIBBON_GALLERY_BUTTON_DISABLED
)
216 wxRibbonGalleryButtonState new_state
;
217 if(rect
.Contains(pos
))
219 if(m_mouse_active_rect
== &rect
)
220 new_state
= wxRIBBON_GALLERY_BUTTON_ACTIVE
;
222 new_state
= wxRIBBON_GALLERY_BUTTON_HOVERED
;
225 new_state
= wxRIBBON_GALLERY_BUTTON_NORMAL
;
227 if(new_state
!= *state
)
238 void wxRibbonGallery::OnMouseLeave(wxMouseEvent
& WXUNUSED(evt
))
241 m_active_item
= NULL
;
242 if(m_up_button_state
!= wxRIBBON_GALLERY_BUTTON_DISABLED
)
243 m_up_button_state
= wxRIBBON_GALLERY_BUTTON_NORMAL
;
244 if(m_down_button_state
!= wxRIBBON_GALLERY_BUTTON_DISABLED
)
245 m_down_button_state
= wxRIBBON_GALLERY_BUTTON_NORMAL
;
246 if(m_extension_button_state
!= wxRIBBON_GALLERY_BUTTON_DISABLED
)
247 m_extension_button_state
= wxRIBBON_GALLERY_BUTTON_NORMAL
;
248 if(m_hovered_item
!= NULL
)
250 m_hovered_item
= NULL
;
251 wxRibbonGalleryEvent
notification(
252 wxEVT_COMMAND_RIBBONGALLERY_HOVER_CHANGED
, GetId());
253 notification
.SetEventObject(this);
254 notification
.SetGallery(this);
255 ProcessWindowEvent(notification
);
260 void wxRibbonGallery::OnMouseDown(wxMouseEvent
& evt
)
262 wxPoint pos
= evt
.GetPosition();
263 m_mouse_active_rect
= NULL
;
264 if(m_client_rect
.Contains(pos
))
266 if(m_art
&& m_art
->GetFlags() & wxRIBBON_BAR_FLOW_VERTICAL
)
267 pos
.x
+= m_scroll_amount
;
269 pos
.y
+= m_scroll_amount
;
270 size_t item_count
= m_items
.Count();
272 for(item_i
= 0; item_i
< item_count
; ++item_i
)
274 wxRibbonGalleryItem
*item
= m_items
.Item(item_i
);
275 if(!item
->IsVisible())
278 const wxRect
& rect
= item
->GetPosition();
279 if(rect
.Contains(pos
))
281 m_active_item
= item
;
282 m_mouse_active_rect
= &rect
;
287 else if(m_scroll_up_button_rect
.Contains(pos
))
289 if(m_up_button_state
!= wxRIBBON_GALLERY_BUTTON_DISABLED
)
291 m_mouse_active_rect
= &m_scroll_up_button_rect
;
292 m_up_button_state
= wxRIBBON_GALLERY_BUTTON_ACTIVE
;
295 else if(m_scroll_down_button_rect
.Contains(pos
))
297 if(m_down_button_state
!= wxRIBBON_GALLERY_BUTTON_DISABLED
)
299 m_mouse_active_rect
= &m_scroll_down_button_rect
;
300 m_down_button_state
= wxRIBBON_GALLERY_BUTTON_ACTIVE
;
303 else if(m_extension_button_rect
.Contains(pos
))
305 if(m_extension_button_state
!= wxRIBBON_GALLERY_BUTTON_DISABLED
)
307 m_mouse_active_rect
= &m_extension_button_rect
;
308 m_extension_button_state
= wxRIBBON_GALLERY_BUTTON_ACTIVE
;
311 if(m_mouse_active_rect
!= NULL
)
315 void wxRibbonGallery::OnMouseUp(wxMouseEvent
& evt
)
317 if(m_mouse_active_rect
!= NULL
)
319 wxPoint pos
= evt
.GetPosition();
322 if(m_art
&& m_art
->GetFlags() & wxRIBBON_BAR_FLOW_VERTICAL
)
323 pos
.x
+= m_scroll_amount
;
325 pos
.y
+= m_scroll_amount
;
327 if(m_mouse_active_rect
->Contains(pos
))
329 if(m_mouse_active_rect
== &m_scroll_up_button_rect
)
331 m_up_button_state
= wxRIBBON_GALLERY_BUTTON_HOVERED
;
334 else if(m_mouse_active_rect
== &m_scroll_down_button_rect
)
336 m_down_button_state
= wxRIBBON_GALLERY_BUTTON_HOVERED
;
339 else if(m_mouse_active_rect
== &m_extension_button_rect
)
341 m_extension_button_state
= wxRIBBON_GALLERY_BUTTON_HOVERED
;
342 wxCommandEvent
notification(wxEVT_COMMAND_BUTTON_CLICKED
,
344 notification
.SetEventObject(this);
345 ProcessWindowEvent(notification
);
347 else if(m_active_item
!= NULL
)
349 if(m_selected_item
!= m_active_item
)
351 m_selected_item
= m_active_item
;
352 wxRibbonGalleryEvent
notification(
353 wxEVT_COMMAND_RIBBONGALLERY_SELECTED
, GetId());
354 notification
.SetEventObject(this);
355 notification
.SetGallery(this);
356 notification
.SetGalleryItem(m_selected_item
);
357 ProcessWindowEvent(notification
);
361 m_mouse_active_rect
= NULL
;
362 m_active_item
= NULL
;
367 void wxRibbonGallery::SetItemClientObject(wxRibbonGalleryItem
* itm
,
370 itm
->SetClientObject(data
);
373 wxClientData
* wxRibbonGallery::GetItemClientObject(const wxRibbonGalleryItem
* itm
) const
375 return itm
->GetClientObject();
378 void wxRibbonGallery::SetItemClientData(wxRibbonGalleryItem
* itm
, void* data
)
380 itm
->SetClientData(data
);
383 void* wxRibbonGallery::GetItemClientData(const wxRibbonGalleryItem
* itm
) const
385 return itm
->GetClientData();
388 bool wxRibbonGallery::ScrollLines(int lines
)
390 if(m_scroll_limit
== 0 || m_art
== NULL
)
393 int line_size
= m_bitmap_padded_size
.GetHeight();
394 if(m_art
->GetFlags() & wxRIBBON_BAR_FLOW_VERTICAL
)
395 line_size
= m_bitmap_padded_size
.GetWidth();
398 if(m_scroll_amount
> 0)
400 m_scroll_amount
+= lines
* line_size
;
401 if(m_scroll_amount
<= 0)
404 m_up_button_state
= wxRIBBON_GALLERY_BUTTON_DISABLED
;
406 else if(m_up_button_state
== wxRIBBON_GALLERY_BUTTON_DISABLED
)
407 m_up_button_state
= wxRIBBON_GALLERY_BUTTON_NORMAL
;
408 if(m_down_button_state
== wxRIBBON_GALLERY_BUTTON_DISABLED
)
409 m_down_button_state
= wxRIBBON_GALLERY_BUTTON_NORMAL
;
415 if(m_scroll_amount
< m_scroll_limit
)
417 m_scroll_amount
+= lines
* line_size
;
418 if(m_scroll_amount
>= m_scroll_limit
)
420 m_scroll_amount
= m_scroll_limit
;
421 m_down_button_state
= wxRIBBON_GALLERY_BUTTON_DISABLED
;
423 else if(m_down_button_state
== wxRIBBON_GALLERY_BUTTON_DISABLED
)
424 m_down_button_state
= wxRIBBON_GALLERY_BUTTON_NORMAL
;
425 if(m_up_button_state
== wxRIBBON_GALLERY_BUTTON_DISABLED
)
426 m_up_button_state
= wxRIBBON_GALLERY_BUTTON_NORMAL
;
433 void wxRibbonGallery::EnsureVisible(const wxRibbonGalleryItem
* item
)
435 if(item
== NULL
|| !item
->IsVisible() || IsEmpty())
438 int y
= item
->GetPosition().GetTop();
439 int base_y
= m_items
.Item(0)->GetPosition().GetTop();
440 int delta
= y
- base_y
- m_scroll_amount
;
441 ScrollLines(delta
/ m_bitmap_padded_size
.GetHeight());
444 bool wxRibbonGallery::IsHovered() const
449 void wxRibbonGallery::OnEraseBackground(wxEraseEvent
& WXUNUSED(evt
))
451 // All painting done in main paint handler to minimise flicker
454 void wxRibbonGallery::OnPaint(wxPaintEvent
& WXUNUSED(evt
))
456 wxAutoBufferedPaintDC
dc(this);
460 m_art
->DrawGalleryBackground(dc
, this, GetSize());
462 int padding_top
= m_art
->GetMetric(wxRIBBON_ART_GALLERY_BITMAP_PADDING_TOP_SIZE
);
463 int padding_left
= m_art
->GetMetric(wxRIBBON_ART_GALLERY_BITMAP_PADDING_LEFT_SIZE
);
465 dc
.SetClippingRegion(m_client_rect
);
467 bool offset_vertical
= true;
468 if(m_art
->GetFlags() & wxRIBBON_BAR_FLOW_VERTICAL
)
469 offset_vertical
= false;
470 size_t item_count
= m_items
.Count();
472 for(item_i
= 0; item_i
< item_count
; ++item_i
)
474 wxRibbonGalleryItem
*item
= m_items
.Item(item_i
);
475 if(!item
->IsVisible())
478 const wxRect
& pos
= item
->GetPosition();
479 wxRect
offset_pos(pos
);
481 offset_pos
.SetTop(offset_pos
.GetTop() - m_scroll_amount
);
483 offset_pos
.SetLeft(offset_pos
.GetLeft() - m_scroll_amount
);
484 m_art
->DrawGalleryItemBackground(dc
, this, offset_pos
, item
);
485 dc
.DrawBitmap(item
->GetBitmap(), offset_pos
.GetLeft() + padding_left
,
486 offset_pos
.GetTop() + padding_top
);
490 void wxRibbonGallery::OnSize(wxSizeEvent
& WXUNUSED(evt
))
495 wxRibbonGalleryItem
* wxRibbonGallery::Append(const wxBitmap
& bitmap
, int id
)
497 wxASSERT(bitmap
.IsOk());
498 if(m_items
.IsEmpty())
500 m_bitmap_size
= bitmap
.GetSize();
505 wxASSERT(bitmap
.GetSize() == m_bitmap_size
);
508 wxRibbonGalleryItem
*item
= new wxRibbonGalleryItem
;
510 item
->SetBitmap(bitmap
);
515 wxRibbonGalleryItem
* wxRibbonGallery::Append(const wxBitmap
& bitmap
, int id
,
518 wxRibbonGalleryItem
*item
= Append(bitmap
, id
);
519 item
->SetClientData(clientData
);
523 wxRibbonGalleryItem
* wxRibbonGallery::Append(const wxBitmap
& bitmap
, int id
,
524 wxClientData
* clientData
)
526 wxRibbonGalleryItem
*item
= Append(bitmap
, id
);
527 item
->SetClientObject(clientData
);
531 void wxRibbonGallery::Clear()
533 size_t item_count
= m_items
.Count();
535 for(item_i
= 0; item_i
< item_count
; ++item_i
)
537 wxRibbonGalleryItem
*item
= m_items
.Item(item_i
);
543 bool wxRibbonGallery::IsSizingContinuous() const
548 void wxRibbonGallery::CalculateMinSize()
550 if(m_art
== NULL
|| !m_bitmap_size
.IsFullySpecified())
552 SetMinSize(wxSize(20, 20));
556 m_bitmap_padded_size
= m_bitmap_size
;
557 m_bitmap_padded_size
.IncBy(
558 m_art
->GetMetric(wxRIBBON_ART_GALLERY_BITMAP_PADDING_LEFT_SIZE
) +
559 m_art
->GetMetric(wxRIBBON_ART_GALLERY_BITMAP_PADDING_RIGHT_SIZE
),
560 m_art
->GetMetric(wxRIBBON_ART_GALLERY_BITMAP_PADDING_TOP_SIZE
) +
561 m_art
->GetMetric(wxRIBBON_ART_GALLERY_BITMAP_PADDING_BOTTOM_SIZE
));
564 SetMinSize(m_art
->GetGallerySize(dc
, this, m_bitmap_padded_size
));
566 // The best size is displaying several items
567 m_best_size
= m_bitmap_padded_size
;
569 m_best_size
= m_art
->GetGallerySize(dc
, this, m_best_size
);
573 bool wxRibbonGallery::Realize()
579 bool wxRibbonGallery::Layout()
586 wxSize client_size
= m_art
->GetGalleryClientSize(dc
, this, GetSize(),
587 &origin
, &m_scroll_up_button_rect
, &m_scroll_down_button_rect
,
588 &m_extension_button_rect
);
589 m_client_rect
= wxRect(origin
, client_size
);
594 size_t item_count
= m_items
.Count();
596 long art_flags
= m_art
->GetFlags();
597 for(item_i
= 0; item_i
< item_count
; ++item_i
)
599 wxRibbonGalleryItem
*item
= m_items
.Item(item_i
);
600 item
->SetIsVisible(true);
601 if(art_flags
& wxRIBBON_BAR_FLOW_VERTICAL
)
603 if(y_cursor
+ m_bitmap_padded_size
.y
> client_size
.GetHeight())
608 x_cursor
+= m_bitmap_padded_size
.x
;
610 item
->SetPosition(origin
.x
+ x_cursor
, origin
.y
+ y_cursor
,
611 m_bitmap_padded_size
);
612 y_cursor
+= m_bitmap_padded_size
.y
;
616 if(x_cursor
+ m_bitmap_padded_size
.x
> client_size
.GetWidth())
621 y_cursor
+= m_bitmap_padded_size
.y
;
623 item
->SetPosition(origin
.x
+ x_cursor
, origin
.y
+ y_cursor
,
624 m_bitmap_padded_size
);
625 x_cursor
+= m_bitmap_padded_size
.x
;
628 for(; item_i
< item_count
; ++item_i
)
630 wxRibbonGalleryItem
*item
= m_items
.Item(item_i
);
631 item
->SetIsVisible(false);
633 if(art_flags
& wxRIBBON_BAR_FLOW_VERTICAL
)
634 m_scroll_limit
= x_cursor
;
636 m_scroll_limit
= y_cursor
;
637 if(m_scroll_amount
>= m_scroll_limit
)
639 m_scroll_amount
= m_scroll_limit
;
640 m_down_button_state
= wxRIBBON_GALLERY_BUTTON_DISABLED
;
642 else if(m_down_button_state
== wxRIBBON_GALLERY_BUTTON_DISABLED
)
643 m_down_button_state
= wxRIBBON_GALLERY_BUTTON_NORMAL
;
645 if(m_scroll_amount
<= 0)
648 m_up_button_state
= wxRIBBON_GALLERY_BUTTON_DISABLED
;
650 else if(m_up_button_state
== wxRIBBON_GALLERY_BUTTON_DISABLED
)
651 m_up_button_state
= wxRIBBON_GALLERY_BUTTON_NORMAL
;
656 wxSize
wxRibbonGallery::DoGetBestSize() const
661 wxSize
wxRibbonGallery::DoGetNextSmallerSize(wxOrientation direction
,
662 wxSize relative_to
) const
669 wxSize client
= m_art
->GetGalleryClientSize(dc
, this, relative_to
, NULL
,
683 if(client
.GetWidth() < 0 || client
.GetHeight() < 0)
686 client
.x
= (client
.x
/ m_bitmap_padded_size
.x
) * m_bitmap_padded_size
.x
;
687 client
.y
= (client
.y
/ m_bitmap_padded_size
.y
) * m_bitmap_padded_size
.y
;
689 wxSize size
= m_art
->GetGallerySize(dc
, this, client
);
690 wxSize minimum
= GetMinSize();
692 if(size
.GetWidth() < minimum
.GetWidth() ||
693 size
.GetHeight() < minimum
.GetHeight())
701 size
.SetHeight(relative_to
.GetHeight());
704 size
.SetWidth(relative_to
.GetWidth());
713 wxSize
wxRibbonGallery::DoGetNextLargerSize(wxOrientation direction
,
714 wxSize relative_to
) const
721 wxSize client
= m_art
->GetGalleryClientSize(dc
, this, relative_to
, NULL
,
724 // No need to grow if the given size can already display every item
725 int nitems
= (client
.GetWidth() / m_bitmap_padded_size
.x
) *
726 (client
.GetHeight() / m_bitmap_padded_size
.y
);
727 if(nitems
>= (int)m_items
.GetCount())
733 client
.IncBy(m_bitmap_padded_size
.x
, 0);
736 client
.IncBy(0, m_bitmap_padded_size
.y
);
739 client
.IncBy(m_bitmap_padded_size
);
743 client
.x
= (client
.x
/ m_bitmap_padded_size
.x
) * m_bitmap_padded_size
.x
;
744 client
.y
= (client
.y
/ m_bitmap_padded_size
.y
) * m_bitmap_padded_size
.y
;
746 wxSize size
= m_art
->GetGallerySize(dc
, this, client
);
747 wxSize minimum
= GetMinSize();
749 if(size
.GetWidth() < minimum
.GetWidth() ||
750 size
.GetHeight() < minimum
.GetHeight())
758 size
.SetHeight(relative_to
.GetHeight());
761 size
.SetWidth(relative_to
.GetWidth());
770 bool wxRibbonGallery::IsEmpty() const
772 return m_items
.IsEmpty();
775 unsigned int wxRibbonGallery::GetCount() const
777 return (unsigned int)m_items
.GetCount();
780 wxRibbonGalleryItem
* wxRibbonGallery::GetItem(unsigned int n
)
784 return m_items
.Item(n
);
787 void wxRibbonGallery::SetSelection(wxRibbonGalleryItem
* item
)
789 if(item
!= m_selected_item
)
791 m_selected_item
= item
;
796 wxRibbonGalleryItem
* wxRibbonGallery::GetSelection() const
798 return m_selected_item
;
801 wxRibbonGalleryItem
* wxRibbonGallery::GetHoveredItem() const
803 return m_hovered_item
;
806 wxRibbonGalleryItem
* wxRibbonGallery::GetActiveItem() const
808 return m_active_item
;
811 wxRibbonGalleryButtonState
wxRibbonGallery::GetUpButtonState() const
813 return m_up_button_state
;
816 wxRibbonGalleryButtonState
wxRibbonGallery::GetDownButtonState() const
818 return m_down_button_state
;
821 wxRibbonGalleryButtonState
wxRibbonGallery::GetExtensionButtonState() const
823 return m_extension_button_state
;
826 #endif // wxUSE_RIBBON