wxRibbonButtonBarButton: Implemented mutable lables and minimum label width
Added new function SetButtonText() which modifies labels of existing ribbon button bar buttons. The new function SetButtonTextMinWidth() is used to specify the label width in advance so that lables can be changed without recalculating the layout. wxRibbonArtProvider is modified to support these operation.
This commit is contained in:
@@ -381,12 +381,18 @@ public:
|
||||
wxRibbonButtonKind kind,
|
||||
wxRibbonButtonBarButtonState size,
|
||||
const wxString& label,
|
||||
wxCoord text_min_width,
|
||||
wxSize bitmap_size_large,
|
||||
wxSize bitmap_size_small,
|
||||
wxSize* button_size,
|
||||
wxRect* normal_region,
|
||||
wxRect* dropdown_region) = 0;
|
||||
|
||||
virtual wxCoord GetButtonBarButtonTextWidth(
|
||||
wxDC& dc, const wxString& label,
|
||||
wxRibbonButtonKind kind,
|
||||
wxRibbonButtonBarButtonState size) = 0;
|
||||
|
||||
virtual wxSize GetMinimisedPanelMinimumSize(
|
||||
wxDC& dc,
|
||||
const wxRibbonPanel* wnd,
|
||||
@@ -584,12 +590,18 @@ public:
|
||||
wxRibbonButtonKind kind,
|
||||
wxRibbonButtonBarButtonState size,
|
||||
const wxString& label,
|
||||
wxCoord text_min_width,
|
||||
wxSize bitmap_size_large,
|
||||
wxSize bitmap_size_small,
|
||||
wxSize* button_size,
|
||||
wxRect* normal_region,
|
||||
wxRect* dropdown_region) wxOVERRIDE;
|
||||
|
||||
wxCoord GetButtonBarButtonTextWidth(
|
||||
wxDC& dc, const wxString& label,
|
||||
wxRibbonButtonKind kind,
|
||||
wxRibbonButtonBarButtonState size) wxOVERRIDE;
|
||||
|
||||
wxSize GetMinimisedPanelMinimumSize(
|
||||
wxDC& dc,
|
||||
const wxRibbonPanel* wnd,
|
||||
|
Reference in New Issue
Block a user