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"
18 #include "wx/ribbon/gallery.h"
22 #include "wx/ribbon/art.h"
23 #include "wx/ribbon/bar.h"
24 #include "wx/dcbuffer.h"
25 #include "wx/clntdata.h"
31 #include "wx/msw/private.h"
34 wxDEFINE_EVENT(wxEVT_COMMAND_RIBBONGALLERY_HOVER_CHANGED
, wxRibbonGalleryEvent
);
35 wxDEFINE_EVENT(wxEVT_COMMAND_RIBBONGALLERY_SELECTED
, wxRibbonGalleryEvent
);
37 IMPLEMENT_DYNAMIC_CLASS(wxRibbonGalleryEvent
, wxCommandEvent
)
38 IMPLEMENT_CLASS(wxRibbonGallery
, wxRibbonControl
)
40 class wxRibbonGalleryItem
49 void SetId(int id
) {m_id
= id
;}
50 void SetBitmap(const wxBitmap
& bitmap
) {m_bitmap
= bitmap
;}
51 const wxBitmap
& GetBitmap() const {return m_bitmap
;}
52 void SetIsVisible(bool visible
) {m_is_visible
= visible
;}
53 void SetPosition(int x
, int y
, const wxSize
& size
)
55 m_position
= wxRect(wxPoint(x
, y
), size
);
57 bool IsVisible() const {return m_is_visible
;}
58 const wxRect
& GetPosition() const {return m_position
;}
60 void SetClientObject(wxClientData
*data
) {m_client_data
.SetClientObject(data
);}
61 wxClientData
*GetClientObject() const {return m_client_data
.GetClientObject();}
62 void SetClientData(void *data
) {m_client_data
.SetClientData(data
);}
63 void *GetClientData() const {return m_client_data
.GetClientData();}
67 wxClientDataContainer m_client_data
;
73 BEGIN_EVENT_TABLE(wxRibbonGallery
, wxRibbonControl
)
74 EVT_ENTER_WINDOW(wxRibbonGallery::OnMouseEnter
)
75 EVT_ERASE_BACKGROUND(wxRibbonGallery::OnEraseBackground
)
76 EVT_LEAVE_WINDOW(wxRibbonGallery::OnMouseLeave
)
77 EVT_LEFT_DOWN(wxRibbonGallery::OnMouseDown
)
78 EVT_LEFT_UP(wxRibbonGallery::OnMouseUp
)
79 EVT_MOTION(wxRibbonGallery::OnMouseMove
)
80 EVT_PAINT(wxRibbonGallery::OnPaint
)
81 EVT_SIZE(wxRibbonGallery::OnSize
)
84 wxRibbonGallery::wxRibbonGallery()
88 wxRibbonGallery::wxRibbonGallery(wxWindow
* parent
,
93 : wxRibbonControl(parent
, id
, pos
, size
, wxBORDER_NONE
)
98 wxRibbonGallery::~wxRibbonGallery()
103 bool wxRibbonGallery::Create(wxWindow
* parent
,
109 if(!wxRibbonControl::Create(parent
, id
, pos
, size
, wxBORDER_NONE
))
118 void wxRibbonGallery::CommonInit(long WXUNUSED(style
))
120 m_selected_item
= NULL
;
121 m_hovered_item
= NULL
;
122 m_active_item
= NULL
;
123 m_scroll_up_button_rect
= wxRect(0, 0, 0, 0);
124 m_scroll_down_button_rect
= wxRect(0, 0, 0, 0);
125 m_extension_button_rect
= wxRect(0, 0, 0, 0);
126 m_mouse_active_rect
= NULL
;
127 m_bitmap_size
= wxSize(64, 32);
128 m_bitmap_padded_size
= m_bitmap_size
;
129 m_item_separation_x
= 0;
130 m_item_separation_y
= 0;
133 m_up_button_state
= wxRIBBON_GALLERY_BUTTON_DISABLED
;
134 m_down_button_state
= wxRIBBON_GALLERY_BUTTON_NORMAL
;
135 m_extension_button_state
= wxRIBBON_GALLERY_BUTTON_NORMAL
;
138 SetBackgroundStyle(wxBG_STYLE_CUSTOM
);
141 void wxRibbonGallery::OnMouseEnter(wxMouseEvent
& evt
)
144 if(m_mouse_active_rect
!= NULL
&& !evt
.LeftIsDown())
146 m_mouse_active_rect
= NULL
;
147 m_active_item
= NULL
;
152 void wxRibbonGallery::OnMouseMove(wxMouseEvent
& evt
)
154 bool refresh
= false;
155 wxPoint pos
= evt
.GetPosition();
157 if(TestButtonHover(m_scroll_up_button_rect
, pos
, &m_up_button_state
))
159 if(TestButtonHover(m_scroll_down_button_rect
, pos
, &m_down_button_state
))
161 if(TestButtonHover(m_extension_button_rect
, pos
, &m_extension_button_state
))
164 wxRibbonGalleryItem
*hovered_item
= NULL
;
165 wxRibbonGalleryItem
*active_item
= NULL
;
166 if(m_client_rect
.Contains(pos
))
168 if(m_art
&& m_art
->GetFlags() & wxRIBBON_BAR_FLOW_VERTICAL
)
169 pos
.x
+= m_scroll_amount
;
171 pos
.y
+= m_scroll_amount
;
173 size_t item_count
= m_items
.Count();
175 for(item_i
= 0; item_i
< item_count
; ++item_i
)
177 wxRibbonGalleryItem
*item
= m_items
.Item(item_i
);
178 if(!item
->IsVisible())
181 if(item
->GetPosition().Contains(pos
))
183 if(m_mouse_active_rect
== &item
->GetPosition())
190 if(active_item
!= m_active_item
)
192 m_active_item
= active_item
;
195 if(hovered_item
!= m_hovered_item
)
197 m_hovered_item
= hovered_item
;
198 wxRibbonGalleryEvent
notification(
199 wxEVT_COMMAND_RIBBONGALLERY_HOVER_CHANGED
, GetId());
200 notification
.SetEventObject(this);
201 notification
.SetGallery(this);
202 notification
.SetGalleryItem(hovered_item
);
203 ProcessWindowEvent(notification
);
211 bool wxRibbonGallery::TestButtonHover(const wxRect
& rect
, wxPoint pos
,
212 wxRibbonGalleryButtonState
* state
)
214 if(*state
== wxRIBBON_GALLERY_BUTTON_DISABLED
)
217 wxRibbonGalleryButtonState new_state
;
218 if(rect
.Contains(pos
))
220 if(m_mouse_active_rect
== &rect
)
221 new_state
= wxRIBBON_GALLERY_BUTTON_ACTIVE
;
223 new_state
= wxRIBBON_GALLERY_BUTTON_HOVERED
;
226 new_state
= wxRIBBON_GALLERY_BUTTON_NORMAL
;
228 if(new_state
!= *state
)
239 void wxRibbonGallery::OnMouseLeave(wxMouseEvent
& WXUNUSED(evt
))
242 m_active_item
= NULL
;
243 if(m_up_button_state
!= wxRIBBON_GALLERY_BUTTON_DISABLED
)
244 m_up_button_state
= wxRIBBON_GALLERY_BUTTON_NORMAL
;
245 if(m_down_button_state
!= wxRIBBON_GALLERY_BUTTON_DISABLED
)
246 m_down_button_state
= wxRIBBON_GALLERY_BUTTON_NORMAL
;
247 if(m_extension_button_state
!= wxRIBBON_GALLERY_BUTTON_DISABLED
)
248 m_extension_button_state
= wxRIBBON_GALLERY_BUTTON_NORMAL
;
249 if(m_hovered_item
!= NULL
)
251 m_hovered_item
= NULL
;
252 wxRibbonGalleryEvent
notification(
253 wxEVT_COMMAND_RIBBONGALLERY_HOVER_CHANGED
, GetId());
254 notification
.SetEventObject(this);
255 notification
.SetGallery(this);
256 ProcessWindowEvent(notification
);
261 void wxRibbonGallery::OnMouseDown(wxMouseEvent
& evt
)
263 wxPoint pos
= evt
.GetPosition();
264 m_mouse_active_rect
= NULL
;
265 if(m_client_rect
.Contains(pos
))
267 if(m_art
&& m_art
->GetFlags() & wxRIBBON_BAR_FLOW_VERTICAL
)
268 pos
.x
+= m_scroll_amount
;
270 pos
.y
+= m_scroll_amount
;
271 size_t item_count
= m_items
.Count();
273 for(item_i
= 0; item_i
< item_count
; ++item_i
)
275 wxRibbonGalleryItem
*item
= m_items
.Item(item_i
);
276 if(!item
->IsVisible())
279 const wxRect
& rect
= item
->GetPosition();
280 if(rect
.Contains(pos
))
282 m_active_item
= item
;
283 m_mouse_active_rect
= &rect
;
288 else if(m_scroll_up_button_rect
.Contains(pos
))
290 if(m_up_button_state
!= wxRIBBON_GALLERY_BUTTON_DISABLED
)
292 m_mouse_active_rect
= &m_scroll_up_button_rect
;
293 m_up_button_state
= wxRIBBON_GALLERY_BUTTON_ACTIVE
;
296 else if(m_scroll_down_button_rect
.Contains(pos
))
298 if(m_down_button_state
!= wxRIBBON_GALLERY_BUTTON_DISABLED
)
300 m_mouse_active_rect
= &m_scroll_down_button_rect
;
301 m_down_button_state
= wxRIBBON_GALLERY_BUTTON_ACTIVE
;
304 else if(m_extension_button_rect
.Contains(pos
))
306 if(m_extension_button_state
!= wxRIBBON_GALLERY_BUTTON_DISABLED
)
308 m_mouse_active_rect
= &m_extension_button_rect
;
309 m_extension_button_state
= wxRIBBON_GALLERY_BUTTON_ACTIVE
;
312 if(m_mouse_active_rect
!= NULL
)
316 void wxRibbonGallery::OnMouseUp(wxMouseEvent
& evt
)
318 if(m_mouse_active_rect
!= NULL
)
320 wxPoint pos
= evt
.GetPosition();
323 if(m_art
&& m_art
->GetFlags() & wxRIBBON_BAR_FLOW_VERTICAL
)
324 pos
.x
+= m_scroll_amount
;
326 pos
.y
+= m_scroll_amount
;
328 if(m_mouse_active_rect
->Contains(pos
))
330 if(m_mouse_active_rect
== &m_scroll_up_button_rect
)
332 m_up_button_state
= wxRIBBON_GALLERY_BUTTON_HOVERED
;
335 else if(m_mouse_active_rect
== &m_scroll_down_button_rect
)
337 m_down_button_state
= wxRIBBON_GALLERY_BUTTON_HOVERED
;
340 else if(m_mouse_active_rect
== &m_extension_button_rect
)
342 m_extension_button_state
= wxRIBBON_GALLERY_BUTTON_HOVERED
;
343 wxCommandEvent
notification(wxEVT_COMMAND_BUTTON_CLICKED
,
345 notification
.SetEventObject(this);
346 ProcessWindowEvent(notification
);
348 else if(m_active_item
!= NULL
)
350 if(m_selected_item
!= m_active_item
)
352 m_selected_item
= m_active_item
;
353 wxRibbonGalleryEvent
notification(
354 wxEVT_COMMAND_RIBBONGALLERY_SELECTED
, GetId());
355 notification
.SetEventObject(this);
356 notification
.SetGallery(this);
357 notification
.SetGalleryItem(m_selected_item
);
358 ProcessWindowEvent(notification
);
362 m_mouse_active_rect
= NULL
;
363 m_active_item
= NULL
;
368 void wxRibbonGallery::SetItemClientObject(wxRibbonGalleryItem
* itm
,
371 itm
->SetClientObject(data
);
374 wxClientData
* wxRibbonGallery::GetItemClientObject(const wxRibbonGalleryItem
* itm
) const
376 return itm
->GetClientObject();
379 void wxRibbonGallery::SetItemClientData(wxRibbonGalleryItem
* itm
, void* data
)
381 itm
->SetClientData(data
);
384 void* wxRibbonGallery::GetItemClientData(const wxRibbonGalleryItem
* itm
) const
386 return itm
->GetClientData();
389 bool wxRibbonGallery::ScrollLines(int lines
)
391 if(m_scroll_limit
== 0 || m_art
== NULL
)
394 int line_size
= m_bitmap_padded_size
.GetHeight();
395 if(m_art
->GetFlags() & wxRIBBON_BAR_FLOW_VERTICAL
)
396 line_size
= m_bitmap_padded_size
.GetWidth();
399 if(m_scroll_amount
> 0)
401 m_scroll_amount
+= lines
* line_size
;
402 if(m_scroll_amount
<= 0)
405 m_up_button_state
= wxRIBBON_GALLERY_BUTTON_DISABLED
;
407 else if(m_up_button_state
== wxRIBBON_GALLERY_BUTTON_DISABLED
)
408 m_up_button_state
= wxRIBBON_GALLERY_BUTTON_NORMAL
;
409 if(m_down_button_state
== wxRIBBON_GALLERY_BUTTON_DISABLED
)
410 m_down_button_state
= wxRIBBON_GALLERY_BUTTON_NORMAL
;
416 if(m_scroll_amount
< m_scroll_limit
)
418 m_scroll_amount
+= lines
* line_size
;
419 if(m_scroll_amount
>= m_scroll_limit
)
421 m_scroll_amount
= m_scroll_limit
;
422 m_down_button_state
= wxRIBBON_GALLERY_BUTTON_DISABLED
;
424 else if(m_down_button_state
== wxRIBBON_GALLERY_BUTTON_DISABLED
)
425 m_down_button_state
= wxRIBBON_GALLERY_BUTTON_NORMAL
;
426 if(m_up_button_state
== wxRIBBON_GALLERY_BUTTON_DISABLED
)
427 m_up_button_state
= wxRIBBON_GALLERY_BUTTON_NORMAL
;
434 void wxRibbonGallery::EnsureVisible(const wxRibbonGalleryItem
* item
)
436 if(item
== NULL
|| !item
->IsVisible() || IsEmpty())
439 int y
= item
->GetPosition().GetTop();
440 int base_y
= m_items
.Item(0)->GetPosition().GetTop();
441 int delta
= y
- base_y
- m_scroll_amount
;
442 ScrollLines(delta
/ m_bitmap_padded_size
.GetHeight());
445 bool wxRibbonGallery::IsHovered() const
450 void wxRibbonGallery::OnEraseBackground(wxEraseEvent
& WXUNUSED(evt
))
452 // All painting done in main paint handler to minimise flicker
455 void wxRibbonGallery::OnPaint(wxPaintEvent
& WXUNUSED(evt
))
457 wxAutoBufferedPaintDC
dc(this);
461 wxSize cur_size
= GetSize();
462 wxSize min_size
= GetMinSize();
464 m_art
->DrawGalleryBackground(dc
, this, GetSize());
466 int padding_top
= m_art
->GetMetric(wxRIBBON_ART_GALLERY_BITMAP_PADDING_TOP_SIZE
);
467 int padding_left
= m_art
->GetMetric(wxRIBBON_ART_GALLERY_BITMAP_PADDING_LEFT_SIZE
);
469 dc
.SetClippingRegion(m_client_rect
);
471 bool offset_vertical
= true;
472 if(m_art
->GetFlags() & wxRIBBON_BAR_FLOW_VERTICAL
)
473 offset_vertical
= false;
474 size_t item_count
= m_items
.Count();
476 for(item_i
= 0; item_i
< item_count
; ++item_i
)
478 wxRibbonGalleryItem
*item
= m_items
.Item(item_i
);
479 if(!item
->IsVisible())
482 const wxRect
& pos
= item
->GetPosition();
483 wxRect
offset_pos(pos
);
485 offset_pos
.SetTop(offset_pos
.GetTop() - m_scroll_amount
);
487 offset_pos
.SetLeft(offset_pos
.GetLeft() - m_scroll_amount
);
488 m_art
->DrawGalleryItemBackground(dc
, this, offset_pos
, item
);
489 dc
.DrawBitmap(item
->GetBitmap(), offset_pos
.GetLeft() + padding_left
,
490 offset_pos
.GetTop() + padding_top
);
494 void wxRibbonGallery::OnSize(wxSizeEvent
& WXUNUSED(evt
))
499 wxRibbonGalleryItem
* wxRibbonGallery::Append(const wxBitmap
& bitmap
, int id
)
501 wxASSERT(bitmap
.IsOk());
502 if(m_items
.IsEmpty())
504 m_bitmap_size
= bitmap
.GetSize();
509 wxASSERT(bitmap
.GetSize() == m_bitmap_size
);
512 wxRibbonGalleryItem
*item
= new wxRibbonGalleryItem
;
514 item
->SetBitmap(bitmap
);
519 wxRibbonGalleryItem
* wxRibbonGallery::Append(const wxBitmap
& bitmap
, int id
,
522 wxRibbonGalleryItem
*item
= Append(bitmap
, id
);
523 item
->SetClientData(clientData
);
527 wxRibbonGalleryItem
* wxRibbonGallery::Append(const wxBitmap
& bitmap
, int id
,
528 wxClientData
* clientData
)
530 wxRibbonGalleryItem
*item
= Append(bitmap
, id
);
531 item
->SetClientObject(clientData
);
535 void wxRibbonGallery::Clear()
537 size_t item_count
= m_items
.Count();
539 for(item_i
= 0; item_i
< item_count
; ++item_i
)
541 wxRibbonGalleryItem
*item
= m_items
.Item(item_i
);
547 bool wxRibbonGallery::IsSizingContinuous() const
552 void wxRibbonGallery::CalculateMinSize()
554 if(m_art
== NULL
|| !m_bitmap_size
.IsFullySpecified())
556 SetMinSize(wxSize(20, 20));
560 m_bitmap_padded_size
= m_bitmap_size
;
561 m_bitmap_padded_size
.IncBy(
562 m_art
->GetMetric(wxRIBBON_ART_GALLERY_BITMAP_PADDING_LEFT_SIZE
) +
563 m_art
->GetMetric(wxRIBBON_ART_GALLERY_BITMAP_PADDING_RIGHT_SIZE
),
564 m_art
->GetMetric(wxRIBBON_ART_GALLERY_BITMAP_PADDING_TOP_SIZE
) +
565 m_art
->GetMetric(wxRIBBON_ART_GALLERY_BITMAP_PADDING_BOTTOM_SIZE
));
568 SetMinSize(m_art
->GetGallerySize(dc
, this, m_bitmap_padded_size
));
570 // The best size is displaying several items
571 m_best_size
= m_bitmap_padded_size
;
573 m_best_size
= m_art
->GetGallerySize(dc
, this, m_best_size
);
577 bool wxRibbonGallery::Realize()
583 bool wxRibbonGallery::Layout()
590 wxSize client_size
= m_art
->GetGalleryClientSize(dc
, this, GetSize(),
591 &origin
, &m_scroll_up_button_rect
, &m_scroll_down_button_rect
,
592 &m_extension_button_rect
);
593 m_client_rect
= wxRect(origin
, client_size
);
598 size_t item_count
= m_items
.Count();
600 long art_flags
= m_art
->GetFlags();
601 for(item_i
= 0; item_i
< item_count
; ++item_i
)
603 wxRibbonGalleryItem
*item
= m_items
.Item(item_i
);
604 item
->SetIsVisible(true);
605 if(art_flags
& wxRIBBON_BAR_FLOW_VERTICAL
)
607 if(y_cursor
+ m_bitmap_padded_size
.y
> client_size
.GetHeight())
612 x_cursor
+= m_bitmap_padded_size
.x
;
614 item
->SetPosition(origin
.x
+ x_cursor
, origin
.y
+ y_cursor
,
615 m_bitmap_padded_size
);
616 y_cursor
+= m_bitmap_padded_size
.y
;
620 if(x_cursor
+ m_bitmap_padded_size
.x
> client_size
.GetWidth())
625 y_cursor
+= m_bitmap_padded_size
.y
;
627 item
->SetPosition(origin
.x
+ x_cursor
, origin
.y
+ y_cursor
,
628 m_bitmap_padded_size
);
629 x_cursor
+= m_bitmap_padded_size
.x
;
632 for(; item_i
< item_count
; ++item_i
)
634 wxRibbonGalleryItem
*item
= m_items
.Item(item_i
);
635 item
->SetIsVisible(false);
637 if(art_flags
& wxRIBBON_BAR_FLOW_VERTICAL
)
638 m_scroll_limit
= x_cursor
;
640 m_scroll_limit
= y_cursor
;
641 if(m_scroll_amount
>= m_scroll_limit
)
643 m_scroll_amount
= m_scroll_limit
;
644 m_down_button_state
= wxRIBBON_GALLERY_BUTTON_DISABLED
;
646 else if(m_down_button_state
== wxRIBBON_GALLERY_BUTTON_DISABLED
)
647 m_down_button_state
= wxRIBBON_GALLERY_BUTTON_NORMAL
;
649 if(m_scroll_amount
<= 0)
652 m_up_button_state
= wxRIBBON_GALLERY_BUTTON_DISABLED
;
654 else if(m_up_button_state
== wxRIBBON_GALLERY_BUTTON_DISABLED
)
655 m_up_button_state
= wxRIBBON_GALLERY_BUTTON_NORMAL
;
660 wxSize
wxRibbonGallery::DoGetBestSize() const
665 wxSize
wxRibbonGallery::DoGetNextSmallerSize(wxOrientation direction
,
666 wxSize relative_to
) const
673 wxSize client
= m_art
->GetGalleryClientSize(dc
, this, relative_to
, NULL
,
687 if(client
.GetWidth() < 0 || client
.GetHeight() < 0)
690 client
.x
= (client
.x
/ m_bitmap_padded_size
.x
) * m_bitmap_padded_size
.x
;
691 client
.y
= (client
.y
/ m_bitmap_padded_size
.y
) * m_bitmap_padded_size
.y
;
693 wxSize size
= m_art
->GetGallerySize(dc
, this, client
);
694 wxSize minimum
= GetMinSize();
696 if(size
.GetWidth() < minimum
.GetWidth() ||
697 size
.GetHeight() < minimum
.GetHeight())
705 size
.SetHeight(relative_to
.GetHeight());
708 size
.SetWidth(relative_to
.GetWidth());
717 wxSize
wxRibbonGallery::DoGetNextLargerSize(wxOrientation direction
,
718 wxSize relative_to
) const
725 wxSize client
= m_art
->GetGalleryClientSize(dc
, this, relative_to
, NULL
,
728 // No need to grow if the given size can already display every item
729 int nitems
= (client
.GetWidth() / m_bitmap_padded_size
.x
) *
730 (client
.GetHeight() / m_bitmap_padded_size
.y
);
731 if(nitems
>= (int)m_items
.GetCount())
737 client
.IncBy(m_bitmap_padded_size
.x
, 0);
740 client
.IncBy(0, m_bitmap_padded_size
.y
);
743 client
.IncBy(m_bitmap_padded_size
);
747 client
.x
= (client
.x
/ m_bitmap_padded_size
.x
) * m_bitmap_padded_size
.x
;
748 client
.y
= (client
.y
/ m_bitmap_padded_size
.y
) * m_bitmap_padded_size
.y
;
750 wxSize size
= m_art
->GetGallerySize(dc
, this, client
);
751 wxSize minimum
= GetMinSize();
753 if(size
.GetWidth() < minimum
.GetWidth() ||
754 size
.GetHeight() < minimum
.GetHeight())
762 size
.SetHeight(relative_to
.GetHeight());
765 size
.SetWidth(relative_to
.GetWidth());
774 bool wxRibbonGallery::IsEmpty() const
776 return m_items
.IsEmpty();
779 unsigned int wxRibbonGallery::GetCount() const
781 return (unsigned int)m_items
.GetCount();
784 wxRibbonGalleryItem
* wxRibbonGallery::GetItem(unsigned int n
)
788 return m_items
.Item(n
);
791 void wxRibbonGallery::SetSelection(wxRibbonGalleryItem
* item
)
793 if(item
!= m_selected_item
)
795 m_selected_item
= item
;
800 wxRibbonGalleryItem
* wxRibbonGallery::GetSelection() const
802 return m_selected_item
;
805 wxRibbonGalleryItem
* wxRibbonGallery::GetHoveredItem() const
807 return m_hovered_item
;
810 wxRibbonGalleryItem
* wxRibbonGallery::GetActiveItem() const
812 return m_active_item
;
815 wxRibbonGalleryButtonState
wxRibbonGallery::GetUpButtonState() const
817 return m_up_button_state
;
820 wxRibbonGalleryButtonState
wxRibbonGallery::GetDownButtonState() const
822 return m_down_button_state
;
825 wxRibbonGalleryButtonState
wxRibbonGallery::GetExtensionButtonState() const
827 return m_extension_button_state
;
830 #endif // wxUSE_RIBBON