# :stopdoc: # This file is automatically generated by the WXRuby3 documentation # generator. Do not alter this file. # :startdoc: module Wx # BU_LEFT = 64 # BU_TOP = 128 # BU_RIGHT = 256 # BU_BOTTOM = 512 # BU_ALIGN_MASK = 960 # BU_EXACTFIT = 1 # BU_NOTEXT = 2 # BU_AUTODRAW = 4 # A class for common button functionality used as the base for the various button classes. # # # # @wxrb_require USE_BUTTON|USE_TOGGLEBTN class AnyButton < Control # @overload set_bitmap_margins(x, y) # Set the margins between the bitmap and the text of the button. # # This method is currently only implemented under MSW. If it is not called, default margin is used around the bitmap. # @see Wx::AnyButton#set_bitmap # @see Wx::AnyButton#set_bitmap_position # @param x [Integer] # @param y [Integer] # @return [void] # @overload set_bitmap_margins(sz) # Set the margins between the bitmap and the text of the button. # # This method is currently only implemented under MSW. If it is not called, default margin is used around the bitmap. # @see Wx::AnyButton#set_bitmap # @see Wx::AnyButton#set_bitmap_position # @param sz [Array(Integer, Integer), Wx::Size] # @return [void] def set_bitmap_margins(*args) end alias_method :bitmap_margins=, :set_bitmap_margins # @return [Wx::AnyButton] def initialize; end # Return the bitmap shown by the button. # # The returned bitmap may be invalid only if the button doesn't show any images. # @see Wx::AnyButton#set_bitmap # @return [Wx::Bitmap] def get_bitmap; end alias_method :bitmap, :get_bitmap # Returns the bitmap used when the mouse is over the button. # # The returned bitmap is only valid if {Wx::AnyButton#set_bitmap_current} had been previously called. # @return [Wx::Bitmap] def get_bitmap_current; end alias_method :bitmap_current, :get_bitmap_current # Returns the bitmap used for the disabled state. # # The returned bitmap is only valid if {Wx::AnyButton#set_bitmap_disabled} had been previously called. # @return [Wx::Bitmap] def get_bitmap_disabled; end alias_method :bitmap_disabled, :get_bitmap_disabled # Returns the bitmap used for the focused state. # # The returned bitmap is only valid if {Wx::AnyButton#set_bitmap_focus} had been previously called. # @return [Wx::Bitmap] def get_bitmap_focus; end alias_method :bitmap_focus, :get_bitmap_focus # Returns the bitmap for the normal state. # # This is exactly the same as {Wx::AnyButton#get_bitmap} but uses a name backwards-compatible with {Wx::BitmapButton}. # @see Wx::AnyButton#set_bitmap # @see Wx::AnyButton#set_bitmap_label # @return [Wx::Bitmap] def get_bitmap_label; end alias_method :bitmap_label, :get_bitmap_label # Returns the bitmap used when the button is pressed. # # The returned bitmap is only valid if {Wx::AnyButton#set_bitmap_pressed} had been previously called. # @return [Wx::Bitmap] def get_bitmap_pressed; end alias_method :bitmap_pressed, :get_bitmap_pressed # Sets the bitmap to display in the button. # # The bitmap is displayed together with the button label. This method sets up a single bitmap which is used in all button states, use {Wx::AnyButton#set_bitmap_disabled}, {Wx::AnyButton#set_bitmap_pressed}, {Wx::AnyButton#set_bitmap_current} or {Wx::AnyButton#set_bitmap_focus} to change the individual images used in different states. # @see Wx::AnyButton#set_bitmap_position # @see Wx::AnyButton#set_bitmap_margins # @param bitmap [Wx::BitmapBundle,Wx::Bitmap,Wx::Icon,Wx::Image] The bitmap bundle containing the resolution-dependent bitmaps to display in the button. At default DPI, the size of the bitmap is determined by the default bundle size, i.e. the value returned from {Wx::BitmapBundle#get_default_size}. If the bitmap bundle is invalid, any currently shown bitmaps are removed from the button. # @param dir [Wx::Direction] The position of the bitmap inside the button. By default it is positioned to the left of the text, near to the left button border. Other possible values include {Wx::Direction::RIGHT}, {Wx::Direction::TOP} and {Wx::Direction::BOTTOM}. # @return [void] def set_bitmap(bitmap, dir=Wx::Direction::LEFT) end alias_method :bitmap=, :set_bitmap # Sets the bitmap to be shown when the mouse is over the button. # # If bitmap is invalid, the normal bitmap will be used in the current state. # @see Wx::AnyButton#get_bitmap_current # @param bitmap [Wx::BitmapBundle,Wx::Bitmap,Wx::Icon,Wx::Image] # @return [void] def set_bitmap_current(bitmap) end alias_method :bitmap_current=, :set_bitmap_current # Sets the bitmap for the disabled button appearance. # # If bitmap is invalid, the disabled bitmap is set to the automatically generated greyed out version of the normal bitmap, i.e. the same bitmap as is used by default if this method is not called at all. Use {Wx::AnyButton#set_bitmap} with an invalid bitmap to remove the bitmap completely (for all states). # @see Wx::AnyButton#get_bitmap_disabled # @see Wx::AnyButton#set_bitmap_label # @see Wx::AnyButton#set_bitmap_pressed # @see Wx::AnyButton#set_bitmap_focus # @param bitmap [Wx::BitmapBundle,Wx::Bitmap,Wx::Icon,Wx::Image] # @return [void] def set_bitmap_disabled(bitmap) end alias_method :bitmap_disabled=, :set_bitmap_disabled # Sets the bitmap for the button appearance when it has the keyboard focus. # # If bitmap is invalid, the normal bitmap will be used in the focused state. # @see Wx::AnyButton#get_bitmap_focus # @see Wx::AnyButton#set_bitmap_label # @see Wx::AnyButton#set_bitmap_pressed # @see Wx::AnyButton#set_bitmap_disabled # @param bitmap [Wx::BitmapBundle,Wx::Bitmap,Wx::Icon,Wx::Image] # @return [void] def set_bitmap_focus(bitmap) end alias_method :bitmap_focus=, :set_bitmap_focus # Sets the bitmap label for the button. # #
# Remark: #

This is the bitmap used for the unselected state, and for all other states if no other bitmaps are provided. #

#
# @see Wx::AnyButton#set_bitmap # @see Wx::AnyButton#get_bitmap_label # @param bitmap [Wx::BitmapBundle,Wx::Bitmap,Wx::Icon,Wx::Image] # @return [void] def set_bitmap_label(bitmap) end alias_method :bitmap_label=, :set_bitmap_label # Sets the bitmap for the selected (depressed) button appearance. # @param bitmap [Wx::BitmapBundle,Wx::Bitmap,Wx::Icon,Wx::Image] # @return [void] def set_bitmap_pressed(bitmap) end alias_method :bitmap_pressed=, :set_bitmap_pressed # Get the margins between the bitmap and the text of the button. # # # @see Wx::AnyButton#set_bitmap_margins # @return [Wx::Size] def get_bitmap_margins; end alias_method :bitmap_margins, :get_bitmap_margins # Set the position at which the bitmap is displayed. # # This method should only be called if the button does have an associated bitmap. # @param dir [Wx::Direction] Direction in which the bitmap should be positioned, one of {Wx::Direction::LEFT}, {Wx::Direction::RIGHT}, {Wx::Direction::TOP} or {Wx::Direction::BOTTOM}. # @return [void] def set_bitmap_position(dir) end alias_method :bitmap_position=, :set_bitmap_position end # AnyButton end