Class: Wx::RBN::RibbonMSWArtProvider
- Inherits:
-
RibbonArtProvider
- Object
- RibbonArtProvider
- Wx::RBN::RibbonMSWArtProvider
- Defined in:
- lib/wx/doc/gen/rbn/ribbon_art_provider.rb
Overview
This class is untracked and should not be derived from nor instances extended!
Direct Known Subclasses
Instance Method Summary collapse
-
#clone ⇒ Wx::RBN::RibbonArtProvider
Create a new art provider which is a clone of this one.
-
#draw_button_bar_background(dc, wnd, rect) ⇒ void
Draw the background for a RibbonButtonBar control.
-
#draw_button_bar_button(dc, wnd, rect, kind, state, label, bitmap_large, bitmap_small) ⇒ void
Draw a single button for a RibbonButtonBar control.
-
#draw_gallery_background(dc, wnd, rect) ⇒ void
Draw the background and chrome for a RibbonGallery control.
-
#draw_gallery_item_background(dc, wnd, rect, item) ⇒ void
Draw the background of a single item in a RibbonGallery control.
-
#draw_help_button(dc, wnd, rect) ⇒ void
Draw help button on RibbonBar.
-
#draw_minimised_panel(dc, wnd, rect, bitmap) ⇒ void
Draw a minimised ribbon panel.
-
#draw_page_background(dc, wnd, rect) ⇒ void
Draw the background of a ribbon page.
-
#draw_panel_background(dc, wnd, rect) ⇒ void
Draw the background and chrome for a ribbon panel.
-
#draw_scroll_button(dc, wnd, rect, style) ⇒ void
Draw a ribbon-style scroll button.
-
#draw_tab(dc, wnd, tab) ⇒ void
Draw a single tab in the tab region of a ribbon bar.
-
#draw_tab_ctrl_background(dc, wnd, rect) ⇒ void
Draw the background of the tab region of a ribbon bar.
-
#draw_tab_separator(dc, wnd, rect, visibility) ⇒ void
Draw a separator between two tabs in a ribbon bar.
-
#draw_toggle_button(dc, wnd, rect, mode) ⇒ void
Draw toggle button on RibbonBar.
-
#draw_tool(dc, wnd, rect, bitmap, kind, state) ⇒ void
Draw a single tool (for a RibbonToolBar control).
-
#draw_tool_bar_background(dc, wnd, rect) ⇒ void
Draw the background for a RibbonToolBar control.
-
#draw_tool_group_background(dc, wnd, rect) ⇒ void
Draw the background for a group of tools on a RibbonToolBar control.
-
#get_bar_tab_width(dc, wnd, label, bitmap) ⇒ Array(Integer,Integer,Integer,Integer)
(also: #bar_tab_width)
Calculate the ideal and minimum width (in pixels) of a tab in a ribbon bar.
-
#get_bar_toggle_button_area(rect) ⇒ Wx::Rect
(also: #bar_toggle_button_area)
Calculate the position and size of the ribbon’s toggle button.
-
#get_button_bar_button_size(dc, wnd, kind, size, label, text_min_width, bitmap_size_large, bitmap_size_small, button_size, normal_region, dropdown_region) ⇒ Boolean
(also: #button_bar_button_size)
Calculate the size of a button within a RibbonButtonBar.
-
#get_button_bar_button_text_width(dc, label, kind, size) ⇒ Integer
(also: #button_bar_button_text_width)
Gets the width of the string if it is used as a RibbonButtonBar button label.
-
#get_colour(id) ⇒ Wx::Colour
(also: #colour)
Get the value of a certain colour setting.
-
#get_colour_scheme(primary, secondary, tertiary) ⇒ void
(also: #colour_scheme)
Get the current colour scheme.
-
#get_flags ⇒ Integer
(also: #flags)
Get the previously set style flags.
-
#get_font(id) ⇒ Wx::Font
(also: #font)
Get the value of a certain font setting.
-
#get_gallery_client_size(dc, wnd, size, client_offset, scroll_up_button, scroll_down_button, extension_button) ⇒ Wx::Size
(also: #gallery_client_size)
Calculate the client size of a RibbonGallery control for a given size.
-
#get_gallery_size(dc, wnd, client_size) ⇒ Wx::Size
(also: #gallery_size)
Calculate the size of a RibbonGallery control for a given client size.
-
#get_metric(id) ⇒ Integer
(also: #metric)
Get the value of a certain integer setting.
-
#get_minimised_panel_minimum_size(dc, wnd, desired_bitmap_size) ⇒ Array(Wx::Size,Wx::Direction)
(also: #minimised_panel_minimum_size)
Calculate the size of a minimised ribbon panel.
-
#get_page_background_redraw_area(dc, wnd, page_old_size, page_new_size) ⇒ Wx::Rect
(also: #page_background_redraw_area)
Calculate the portion of a page background which needs to be redrawn when a page is resized.
-
#get_panel_client_size(dc, wnd, size, client_offset) ⇒ Wx::Size
(also: #panel_client_size)
Calculate the client size of a panel for a given overall size.
-
#get_panel_ext_button_area(dc, wnd, rect) ⇒ Wx::Rect
(also: #panel_ext_button_area)
Calculate the position and size of the panel extension button.
-
#get_panel_size(dc, wnd, client_size, client_offset) ⇒ Wx::Size
(also: #panel_size)
Calculate the size of a panel for a given client size.
-
#get_ribbon_help_button_area(rect) ⇒ Wx::Rect
(also: #ribbon_help_button_area)
Calculate the position and size of the ribbon’s help button.
-
#get_scroll_button_minimum_size(dc, wnd, style) ⇒ Wx::Size
(also: #scroll_button_minimum_size)
Calculate the minimum size (in pixels) of a scroll button.
-
#get_tab_ctrl_height(dc, wnd, pages) ⇒ Integer
(also: #tab_ctrl_height)
Calculate the height (in pixels) of the tab region of a ribbon bar.
-
#get_tool_size(dc, wnd, bitmap_size, kind, is_first, is_last, dropdown_region) ⇒ Wx::Size
(also: #tool_size)
Calculate the size of a tool within a RibbonToolBar.
- #initialize(set_colour_scheme = true) ⇒ Wx::RBN::RibbonMSWArtProvider constructor
-
#set_colour(id, colour) ⇒ void
Set the value of a certain colour setting to the value colour.
-
#set_colour_scheme(primary, secondary, tertiary) ⇒ void
Set all applicable colour settings from a few base colours.
-
#set_flags(flags) ⇒ void
(also: #flags=)
Set the style flags.
-
#set_font(id, font) ⇒ void
Set the value of a certain font setting to the value font.
-
#set_metric(id, new_val) ⇒ void
Set the value of a certain integer setting to the value new_val.
Methods inherited from RibbonArtProvider
Constructor Details
#initialize(set_colour_scheme = true) ⇒ Wx::RBN::RibbonMSWArtProvider
1111 |
# File 'lib/wx/doc/gen/rbn/ribbon_art_provider.rb', line 1111 def initialize(set_colour_scheme=true) end |
Instance Method Details
#clone ⇒ Wx::RBN::RibbonArtProvider
Create a new art provider which is a clone of this one.
1115 |
# File 'lib/wx/doc/gen/rbn/ribbon_art_provider.rb', line 1115 def clone; end |
#draw_button_bar_background(dc, wnd, rect) ⇒ void
This method returns an undefined value.
Draw the background for a Wx::RBN::RibbonButtonBar control.
1293 |
# File 'lib/wx/doc/gen/rbn/ribbon_art_provider.rb', line 1293 def (dc, wnd, rect) end |
#draw_button_bar_button(dc, wnd, rect, kind, state, label, bitmap_large, bitmap_small) ⇒ void
This method returns an undefined value.
Draw a single button for a Wx::RBN::RibbonButtonBar control.
1305 |
# File 'lib/wx/doc/gen/rbn/ribbon_art_provider.rb', line 1305 def (dc, wnd, rect, kind, state, label, bitmap_large, bitmap_small) end |
#draw_gallery_background(dc, wnd, rect) ⇒ void
This method returns an undefined value.
Draw the background and chrome for a Wx::RBN::RibbonGallery control.
This should draw the border, background, scroll buttons, extension button, and any other UI elements which are not attached to a specific gallery item.
1268 |
# File 'lib/wx/doc/gen/rbn/ribbon_art_provider.rb', line 1268 def draw_gallery_background(dc, wnd, rect) end |
#draw_gallery_item_background(dc, wnd, rect, item) ⇒ void
This method returns an undefined value.
Draw the background of a single item in a Wx::RBN::RibbonGallery control.
This is painted on top of a gallery background, and behind the items bitmap. Unlike #draw_button_bar_button and #draw_tool, it is not expected to draw the item bitmap - that is done by the gallery control itself.
1278 |
# File 'lib/wx/doc/gen/rbn/ribbon_art_provider.rb', line 1278 def draw_gallery_item_background(dc, wnd, rect, item) end |
#draw_help_button(dc, wnd, rect) ⇒ void
This method returns an undefined value.
Draw help button on Wx::RBN::RibbonBar.
This should draw a help button at top right corner of ribbon bar.
1348 |
# File 'lib/wx/doc/gen/rbn/ribbon_art_provider.rb', line 1348 def (dc, wnd, rect) end |
#draw_minimised_panel(dc, wnd, rect, bitmap) ⇒ void
This method returns an undefined value.
Draw a minimised ribbon panel.
1286 |
# File 'lib/wx/doc/gen/rbn/ribbon_art_provider.rb', line 1286 def draw_minimised_panel(dc, wnd, rect, bitmap) end |
#draw_page_background(dc, wnd, rect) ⇒ void
This method returns an undefined value.
Draw the background of a ribbon page.
1241 |
# File 'lib/wx/doc/gen/rbn/ribbon_art_provider.rb', line 1241 def draw_page_background(dc, wnd, rect) end |
#draw_panel_background(dc, wnd, rect) ⇒ void
This method returns an undefined value.
Draw the background and chrome for a ribbon panel.
This should draw the border, background, label, and any other items of a panel which are outside the client area of a panel. Note that when a panel is minimised, this function is not called - only #draw_minimised_panel is called, so a background should be explicitly painted by that if required.
1259 |
# File 'lib/wx/doc/gen/rbn/ribbon_art_provider.rb', line 1259 def draw_panel_background(dc, wnd, rect) end |
#draw_scroll_button(dc, wnd, rect, style) ⇒ void
This method returns an undefined value.
Draw a ribbon-style scroll button.
1249 |
# File 'lib/wx/doc/gen/rbn/ribbon_art_provider.rb', line 1249 def (dc, wnd, rect, style) end |
#draw_tab(dc, wnd, tab) ⇒ void
This method returns an undefined value.
Draw a single tab in the tab region of a ribbon bar.
1223 |
# File 'lib/wx/doc/gen/rbn/ribbon_art_provider.rb', line 1223 def draw_tab(dc, wnd, tab) end |
#draw_tab_ctrl_background(dc, wnd, rect) ⇒ void
This method returns an undefined value.
Draw the background of the tab region of a ribbon bar.
1216 |
# File 'lib/wx/doc/gen/rbn/ribbon_art_provider.rb', line 1216 def draw_tab_ctrl_background(dc, wnd, rect) end |
#draw_tab_separator(dc, wnd, rect, visibility) ⇒ void
This method returns an undefined value.
Draw a separator between two tabs in a ribbon bar.
1231 |
# File 'lib/wx/doc/gen/rbn/ribbon_art_provider.rb', line 1231 def draw_tab_separator(dc, wnd, rect, visibility) end |
#draw_toggle_button(dc, wnd, rect, mode) ⇒ void
This method returns an undefined value.
Draw toggle button on Wx::RBN::RibbonBar.
This should draw a small toggle button at top right corner of ribbon bar.
1339 |
# File 'lib/wx/doc/gen/rbn/ribbon_art_provider.rb', line 1339 def (dc, wnd, rect, mode) end |
#draw_tool(dc, wnd, rect, bitmap, kind, state) ⇒ void
This method returns an undefined value.
Draw a single tool (for a Wx::RBN::RibbonToolBar control).
1329 |
# File 'lib/wx/doc/gen/rbn/ribbon_art_provider.rb', line 1329 def draw_tool(dc, wnd, rect, bitmap, kind, state) end |
#draw_tool_bar_background(dc, wnd, rect) ⇒ void
This method returns an undefined value.
Draw the background for a Wx::RBN::RibbonToolBar control.
1312 |
# File 'lib/wx/doc/gen/rbn/ribbon_art_provider.rb', line 1312 def (dc, wnd, rect) end |
#draw_tool_group_background(dc, wnd, rect) ⇒ void
This method returns an undefined value.
Draw the background for a group of tools on a Wx::RBN::RibbonToolBar control.
1319 |
# File 'lib/wx/doc/gen/rbn/ribbon_art_provider.rb', line 1319 def draw_tool_group_background(dc, wnd, rect) end |
#get_bar_tab_width(dc, wnd, label, bitmap) ⇒ Array(Integer,Integer,Integer,Integer) Also known as: bar_tab_width
Calculate the ideal and minimum width (in pixels) of a tab in a ribbon bar.
1356 |
# File 'lib/wx/doc/gen/rbn/ribbon_art_provider.rb', line 1356 def (dc, wnd, label, bitmap) end |
#get_bar_toggle_button_area(rect) ⇒ Wx::Rect Also known as:
Calculate the position and size of the ribbon’s toggle button.
1493 |
# File 'lib/wx/doc/gen/rbn/ribbon_art_provider.rb', line 1493 def (rect) end |
#get_button_bar_button_size(dc, wnd, kind, size, label, text_min_width, bitmap_size_large, bitmap_size_small, button_size, normal_region, dropdown_region) ⇒ Boolean Also known as:
Calculate the size of a button within a Wx::RBN::RibbonButtonBar.
true if a size exists for the button, false otherwise.
1450 |
# File 'lib/wx/doc/gen/rbn/ribbon_art_provider.rb', line 1450 def (dc, wnd, kind, size, label, text_min_width, bitmap_size_large, bitmap_size_small, , normal_region, dropdown_region) end |
#get_button_bar_button_text_width(dc, label, kind, size) ⇒ Integer Also known as:
Gets the width of the string if it is used as a Wx::RBN::RibbonButtonBar button label.
Width of the given label text in pixel.
This function only works with single-line strings.
1467 |
# File 'lib/wx/doc/gen/rbn/ribbon_art_provider.rb', line 1467 def (dc, label, kind, size) end |
#get_colour(id) ⇒ Wx::Colour Also known as: colour
Get the value of a certain colour setting.
id can be one of the colour values of Wx::RBN::RibbonArtSetting.
1167 |
# File 'lib/wx/doc/gen/rbn/ribbon_art_provider.rb', line 1167 def get_colour(id) end |
#get_colour_scheme(primary, secondary, tertiary) ⇒ void Also known as: colour_scheme
This method returns an undefined value.
Get the current colour scheme.
Returns three colours such that if #set_colour_scheme were called with them, the colour scheme would be restored to what it was when #set_colour_scheme was last called. In practice, this usually means that the returned values are the three colours given in the last call to #set_colour_scheme, however if #set_colour_scheme performs an idempotent operation upon the colours it is given (like clamping a component of the colour), then the returned values may not be the three colours given in the last call to #set_colour_scheme. If #set_colour_scheme has not been called, then the returned values should result in a colour scheme similar to, if not identical to, the default colours of the art provider. Note that if #set_colour is called, then #get_colour_scheme does not try and return a colour scheme similar to colours being used - it’s return values are dependent upon the last values given to #set_colour_scheme, as described above.
1186 |
# File 'lib/wx/doc/gen/rbn/ribbon_art_provider.rb', line 1186 def get_colour_scheme(primary, secondary, tertiary) end |
#get_flags ⇒ Integer Also known as: flags
Get the previously set style flags.
1127 |
# File 'lib/wx/doc/gen/rbn/ribbon_art_provider.rb', line 1127 def get_flags; end |
#get_font(id) ⇒ Wx::Font Also known as: font
Get the value of a certain font setting.
id can be one of the font values of Wx::RBN::RibbonArtSetting.
1159 |
# File 'lib/wx/doc/gen/rbn/ribbon_art_provider.rb', line 1159 def get_font(id) end |
#get_gallery_client_size(dc, wnd, size, client_offset, scroll_up_button, scroll_down_button, extension_button) ⇒ Wx::Size Also known as: gallery_client_size
Calculate the client size of a Wx::RBN::RibbonGallery control for a given size.
This should act as the inverse to #get_gallery_size, and decrement the given size by enough to fit the gallery border, buttons, and other chrome.
1421 |
# File 'lib/wx/doc/gen/rbn/ribbon_art_provider.rb', line 1421 def get_gallery_client_size(dc, wnd, size, client_offset, , , ) end |
#get_gallery_size(dc, wnd, client_size) ⇒ Wx::Size Also known as: gallery_size
Calculate the size of a Wx::RBN::RibbonGallery control for a given client size.
This should increment the given size by enough to fit the gallery border, buttons, and any other chrome.
1407 |
# File 'lib/wx/doc/gen/rbn/ribbon_art_provider.rb', line 1407 def get_gallery_size(dc, wnd, client_size) end |
#get_metric(id) ⇒ Integer Also known as: metric
Get the value of a certain integer setting.
id can be one of the size values of Wx::RBN::RibbonArtSetting.
1135 |
# File 'lib/wx/doc/gen/rbn/ribbon_art_provider.rb', line 1135 def get_metric(id) end |
#get_minimised_panel_minimum_size(dc, wnd, desired_bitmap_size) ⇒ Array(Wx::Size,Wx::Direction) Also known as: minimised_panel_minimum_size
Calculate the size of a minimised ribbon panel.
1475 |
# File 'lib/wx/doc/gen/rbn/ribbon_art_provider.rb', line 1475 def get_minimised_panel_minimum_size(dc, wnd, desired_bitmap_size) end |
#get_page_background_redraw_area(dc, wnd, page_old_size, page_new_size) ⇒ Wx::Rect Also known as: page_background_redraw_area
Calculate the portion of a page background which needs to be redrawn when a page is resized.
To optimise the drawing of page backgrounds, as small an area as possible should be returned. Of course, if the way in which a background is drawn means that the entire background needs to be repainted on resize, then the entire new size should be returned.
1432 |
# File 'lib/wx/doc/gen/rbn/ribbon_art_provider.rb', line 1432 def get_page_background_redraw_area(dc, wnd, page_old_size, page_new_size) end |
#get_panel_client_size(dc, wnd, size, client_offset) ⇒ Wx::Size Also known as: panel_client_size
Calculate the client size of a panel for a given overall size.
This should act as the inverse to #get_panel_size, and decrement the given size by enough to fit the panel label and other chrome.
1388 |
# File 'lib/wx/doc/gen/rbn/ribbon_art_provider.rb', line 1388 def get_panel_client_size(dc, wnd, size, client_offset) end |
#get_panel_ext_button_area(dc, wnd, rect) ⇒ Wx::Rect Also known as:
Calculate the position and size of the panel extension button.
1396 |
# File 'lib/wx/doc/gen/rbn/ribbon_art_provider.rb', line 1396 def (dc, wnd, rect) end |
#get_panel_size(dc, wnd, client_size, client_offset) ⇒ Wx::Size Also known as: panel_size
Calculate the size of a panel for a given client size.
This should increment the given size by enough to fit the panel label and other chrome.
1376 |
# File 'lib/wx/doc/gen/rbn/ribbon_art_provider.rb', line 1376 def get_panel_size(dc, wnd, client_size, client_offset) end |
#get_ribbon_help_button_area(rect) ⇒ Wx::Rect Also known as:
Calculate the position and size of the ribbon’s help button.
1499 |
# File 'lib/wx/doc/gen/rbn/ribbon_art_provider.rb', line 1499 def (rect) end |
#get_scroll_button_minimum_size(dc, wnd, style) ⇒ Wx::Size Also known as:
Calculate the minimum size (in pixels) of a scroll button.
1364 |
# File 'lib/wx/doc/gen/rbn/ribbon_art_provider.rb', line 1364 def (dc, wnd, style) end |
#get_tab_ctrl_height(dc, wnd, pages) ⇒ Integer Also known as: tab_ctrl_height
Calculate the height (in pixels) of the tab region of a ribbon bar.
Note that as the tab region can contain scroll buttons, the height should be greater than or equal to the minimum height for a tab scroll button.
1208 |
# File 'lib/wx/doc/gen/rbn/ribbon_art_provider.rb', line 1208 def get_tab_ctrl_height(dc, wnd, pages) end |
#get_tool_size(dc, wnd, bitmap_size, kind, is_first, is_last, dropdown_region) ⇒ Wx::Size Also known as: tool_size
Calculate the size of a tool within a Wx::RBN::RibbonToolBar.
1487 |
# File 'lib/wx/doc/gen/rbn/ribbon_art_provider.rb', line 1487 def get_tool_size(dc, wnd, bitmap_size, kind, is_first, is_last, dropdown_region) end |
#set_colour(id, colour) ⇒ void
This method returns an undefined value.
Set the value of a certain colour setting to the value colour.
id can be one of the colour values of Wx::RBN::RibbonArtSetting, though not all colour settings will have an effect on every art provider.
1177 |
# File 'lib/wx/doc/gen/rbn/ribbon_art_provider.rb', line 1177 def set_colour(id, colour) end |
#set_colour_scheme(primary, secondary, tertiary) ⇒ void
This method returns an undefined value.
Set all applicable colour settings from a few base colours.
Uses any or all of the three given colours to create a colour scheme, and then sets all colour settings which are relevant to the art provider using that scheme. Note that some art providers may not use the tertiary colour for anything, and some may not use the secondary colour either.
1199 |
# File 'lib/wx/doc/gen/rbn/ribbon_art_provider.rb', line 1199 def set_colour_scheme(primary, secondary, tertiary) end |
#set_flags(flags) ⇒ void Also known as: flags=
This method returns an undefined value.
Set the style flags.
Normally called automatically by Wx::RBN::RibbonBar#set_art_provider with the ribbon bar’s style flags, so that the art provider has the same flags as the bar which it is serving.
1122 |
# File 'lib/wx/doc/gen/rbn/ribbon_art_provider.rb', line 1122 def set_flags(flags) end |
#set_font(id, font) ⇒ void
This method returns an undefined value.
Set the value of a certain font setting to the value font.
id can be one of the font values of Wx::RBN::RibbonArtSetting.
1152 |
# File 'lib/wx/doc/gen/rbn/ribbon_art_provider.rb', line 1152 def set_font(id, font) end |
#set_metric(id, new_val) ⇒ void
This method returns an undefined value.
Set the value of a certain integer setting to the value new_val.
id can be one of the size values of Wx::RBN::RibbonArtSetting.
1144 |
# File 'lib/wx/doc/gen/rbn/ribbon_art_provider.rb', line 1144 def set_metric(id, new_val) end |