# :stopdoc: # This file is automatically generated by the WXRuby3 documentation # generator. Do not alter this file. # :startdoc: module Wx::RBN # # # # class RibbonGalleryButtonState < Wx::Enum # # RIBBON_GALLERY_BUTTON_NORMAL = Wx::RBN::RibbonGalleryButtonState.new(0) # # RIBBON_GALLERY_BUTTON_HOVERED = Wx::RBN::RibbonGalleryButtonState.new(1) # # RIBBON_GALLERY_BUTTON_ACTIVE = Wx::RBN::RibbonGalleryButtonState.new(2) # # RIBBON_GALLERY_BUTTON_DISABLED = Wx::RBN::RibbonGalleryButtonState.new(3) end # RibbonGalleryButtonState # # EVT_RIBBONGALLERY_HOVER_CHANGED = 10437 # # EVT_RIBBONGALLERY_SELECTED = 10438 # # EVT_RIBBONGALLERY_CLICKED = 10439 # A ribbon gallery is like a {Wx::ListBox}, but for bitmaps rather than strings. # It displays a collection of bitmaps arranged in a grid and allows the user to choose one. As there are typically more bitmaps in a gallery than can be displayed in the space used for a ribbon, a gallery always has scroll buttons to allow the user to navigate through the entire gallery. It also has an "extension" button, the behaviour of which is outside the scope of the gallery control itself, though it typically displays some kind of dialog related to the gallery. # === Events emitted by this class # # The following event-handler methods redirect the events to member method or handler blocks for {Wx::RBN::RibbonGalleryEvent} events. # Event handler methods for events emitted by this class: # # - {Wx::EvtHandler#evt_ribbongallery_selected}(id, meth = nil, &block): Triggered when the user selects an item from the gallery. Note that the ID is that of the gallery, not of the item. # # - {Wx::EvtHandler#evt_ribbongallery_clicked}(id, meth = nil, &block): Similar to EVT_RIBBONGALLERY_SELECTED but triggered every time a gallery item is clicked, even if it is already selected. Note that the ID of the event is that of the gallery, not of the item, just as above. This event is available since wxWidgets 2.9.2. # # - {Wx::EvtHandler#evt_ribbongallery_hover_changed}(id, meth = nil, &block): Triggered when the item being hovered over by the user changes. The item in the event will be the new item being hovered, or NULL if there is no longer an item being hovered. Note that the ID is that of the gallery, not of the item. # # === Events emitted by this class # # The following event-handler methods redirect the events to member method or handler blocks for {Wx::CommandEvent} events. # Event handler methods for events emitted by this class: # # - {Wx::EvtHandler#evt_button}(id, meth = nil, &block): Triggered when the "extension" button of the gallery is pressed. # # === # # Category: Ribbon User Interface # class RibbonGallery < RibbonControl # @overload initialize() # Default constructor. # With this constructor, {Wx::RBN::RibbonGallery#create} should be called in order to create the gallery. # @return [Wx::RBN::RibbonGallery] # @overload initialize(parent, id=Wx::StandardID::ID_ANY, pos=Wx::DEFAULT_POSITION, size=Wx::DEFAULT_SIZE, style=0) # Construct a ribbon gallery with the given parameters. # @param parent [Wx::Window] Parent window for the gallery (typically a {Wx::RBN::RibbonPanel}). # @param id [Integer] An identifier for the gallery. {Wx::StandardID::ID_ANY} is taken to mean a default. # @param pos [Array(Integer, Integer), Wx::Point] Initial position of the gallery. # @param size [Array(Integer, Integer), Wx::Size] Initial size of the gallery. # @param style [Integer] Gallery style, currently unused. # @return [Wx::RBN::RibbonGallery] def initialize(*args) end # Create a gallery in two-step gallery construction. # Should only be called when the default constructor is used, and arguments have the same meaning as in the full constructor. # @param parent [Wx::Window] # @param id [Integer] # @param pos [Array(Integer, Integer), Wx::Point] # @param size [Array(Integer, Integer), Wx::Size] # @param style [Integer] # @return [Boolean] def create(parent, id=Wx::StandardID::ID_ANY, pos=Wx::DEFAULT_POSITION, size=Wx::DEFAULT_SIZE, style=0) end # Remove all items from the gallery. # @return [void] def clear; end # Query if the gallery has no items in it. # @return [Boolean] def is_empty; end alias_method :empty?, :is_empty # Get the number of items in the gallery. # @return [Integer] def get_count; end alias_method :count, :get_count # Get an item by index. # @param n [Integer] # @return [Integer] def get_item(n) end alias_method :item, :get_item # @overload append(bitmap, id) # Add an item to the gallery (with no client data). # @param bitmap [Wx::Bitmap] The bitmap to display for the item. Note that all items must have equally sized bitmaps. # @param id [Integer] ID number to associate with the item. Not currently used for anything important. # @return [Integer] # @overload append(bitmap, id, clientData) # Add an item to the gallery (with simple client data). # @param bitmap [Wx::Bitmap] The bitmap to display for the item. Note that all items must have equally sized bitmaps. # @param id [Integer] ID number to associate with the item. Not currently used for anything important. # @param clientData [Object] An opaque pointer to associate with the item. # @return [Integer] def append(*args) end # Set the client data associated with a gallery item. # @param item [Integer] # @param data [Object] # @return [void] def set_item_client_data(item, data) end # Get the client data associated with a gallery item. # @param item [Integer] # @return [Object] def get_item_client_data(item) end alias_method :item_client_data, :get_item_client_data # Set the selection to the given item, or removes the selection if item == NULL. # Note that this not cause any events to be emitted. # @param item [Integer] # @return [void] def set_selection(item) end alias_method :selection=, :set_selection # Get the currently selected item, or NULL if there is none. # The selected item is set by {Wx::RBN::RibbonGallery#set_selection}, or by the user clicking on an item. # @return [Integer] def get_selection; end alias_method :selection, :get_selection # Get the currently hovered item, or NULL if there is none. # The hovered item is the item underneath the mouse cursor. # @return [Integer] def get_hovered_item; end alias_method :hovered_item, :get_hovered_item # Get the currently active item, or NULL if there is none. # The active item is the item being pressed by the user, and will thus become the selected item if the user releases the mouse button. # @return [Integer] def get_active_item; end alias_method :active_item, :get_active_item # Get the state of the scroll up button. # @return [Wx::RibbonGalleryButtonState] def get_up_button_state; end alias_method :up_button_state, :get_up_button_state # Get the state of the scroll down button. # @return [Wx::RibbonGalleryButtonState] def get_down_button_state; end alias_method :down_button_state, :get_down_button_state # Get the state of the "extension" button. # @return [Wx::RibbonGalleryButtonState] def get_extension_button_state; end alias_method :extension_button_state, :get_extension_button_state # Query is the mouse is currently hovered over the gallery. # true if the cursor is within the bounds of the gallery (not just hovering over an item), false otherwise. # @return [Boolean] def is_hovered; end alias_method :hovered?, :is_hovered # Scroll the gallery contents by some amount. # true if the gallery scrolled at least one pixel in the given direction, false if it did not scroll. # @param lines [Integer] Positive values scroll toward the end of the gallery, while negative values scroll toward the start. # @return [Boolean] def scroll_lines(lines) end # Scroll the gallery contents by some fine-grained amount. # true if the gallery scrolled at least one pixel in the given direction, false if it did not scroll. # @param pixels [Integer] Positive values scroll toward the end of the gallery, while negative values scroll toward the start. # @return [Boolean] def scroll_pixels(pixels) end # Scroll the gallery to ensure that the given item is visible. # @param item [Integer] # @return [void] def ensure_visible(item) end end # RibbonGallery end