# :stopdoc: # This file is automatically generated by the WXRuby3 documentation # generator. Do not alter this file. # :startdoc: module Wx # A static bitmap control displays a bitmap. # Native implementations on some platforms are only meant for display of the small icons in the dialog boxes. # If you want to display larger images portably, you may use generic implementation {Wx::GenericStaticBitmap} declared in . # Notice that for the best results, the size of the control should be the same as the size of the image displayed in it, as happens by default if it's not resized explicitly. Otherwise, behaviour depends on the platform: under MSW, the bitmap is drawn centred inside the control, while elsewhere it is drawn at the origin of the control. You can use {Wx::StaticBitmap#set_scale_mode} to control how the image is scaled inside the control. # # Category: {Wx::Controls}
Appearance:
WXMSW Appearance # WXGTK Appearance # WXOSX Appearance #
# @see Wx::Bitmap # # # @wxrb_require USE_STATBMP class StaticBitmap < Control # Specify how the bitmap should be scaled in the control. # # # @see Wx::StaticBitmap#set_scale_mode # @see Wx::StaticBitmap#get_scale_mode # # # @wxrb_require USE_STATBMP class ScaleMode < Wx::Enum # The bitmap is displayed in original size. # Scale_None = Wx::StaticBitmap::ScaleMode.new(0) # Scale the bitmap to fit the size of the control by changing the aspect ratio of the bitmap if necessary. # Scale_Fill = Wx::StaticBitmap::ScaleMode.new(1) # Scale the bitmap to fit the size of the control by maintaining the aspect ratio. # Scale_AspectFit = Wx::StaticBitmap::ScaleMode.new(2) # Scale the bitmap to fill the size of the control. # Scale_AspectFill = Wx::StaticBitmap::ScaleMode.new(3) end # ScaleMode # @overload initialize() # Default constructor. # @return [Wx::StaticBitmap] # @overload initialize(parent, id, label, pos=Wx::DEFAULT_POSITION, size=Wx::DEFAULT_SIZE, style=0, name=Wx::STATIC_BITMAP_NAME_STR) # Constructor, creating and showing a static bitmap control. # # @see Wx::StaticBitmap#create # @param parent [Wx::Window] Parent window. Should not be NULL. # @param id [Integer] Control identifier. A value of -1 denotes a default value. # @param label [Wx::BitmapBundle,Wx::Bitmap,Wx::Icon,Wx::Image] Bitmap label. # @param pos [Array(Integer, Integer), Wx::Point] Window position. # @param size [Array(Integer, Integer), Wx::Size] Window size. # @param style [Integer] Window style. See {Wx::StaticBitmap}. # @param name [String] Window name. # @return [Wx::StaticBitmap] def initialize(*args) end # Creation function, for two-step construction. # For details see {Wx::StaticBitmap#initialize}. # @param parent [Wx::Window] # @param id [Integer] # @param label [Wx::BitmapBundle,Wx::Bitmap,Wx::Icon,Wx::Image] # @param pos [Array(Integer, Integer), Wx::Point] # @param size [Array(Integer, Integer), Wx::Size] # @param style [Integer] # @param name [String] # @return [Boolean] def create(parent, id, label, pos=Wx::DEFAULT_POSITION, size=Wx::DEFAULT_SIZE, style=0, name=Wx::STATIC_BITMAP_NAME_STR) end # Returns the bitmap currently used in the control. # Notice that this method can be called even if {Wx::StaticBitmap#set_icon} had been used. # @see Wx::StaticBitmap#set_bitmap # @return [Wx::Bitmap] def get_bitmap; end alias_method :bitmap, :get_bitmap # Returns the icon currently used in the control. # Notice that this method can only be called if {Wx::StaticBitmap#set_icon} had been used: an icon can't be retrieved from the control if a bitmap had been set (using {Wx::StaticBitmap#set_bitmap}). # @see Wx::StaticBitmap#set_icon # @return [Wx::Icon] def get_icon; end alias_method :icon, :get_icon # Sets the bitmap label. # # @see Wx::StaticBitmap#get_bitmap # @param label [Wx::BitmapBundle,Wx::Bitmap,Wx::Icon,Wx::Image] The new bitmap. # @return [void] def set_bitmap(label) end alias_method :bitmap=, :set_bitmap # Sets the label to the given icon. # @param label [Wx::Icon] The new icon. # @return [void] def set_icon(label) end alias_method :icon=, :set_icon # Sets the scale mode. #
# Note: #

Currently only the generic implementation supports all scaling modes. You may use generic implementation {Wx::GenericStaticBitmap} declared in in all ports. #

#
# @see Wx::StaticBitmap#get_scale_mode # @param scaleMode [Wx::wxStaticBitmap::ScaleMode] Controls how the bitmap is scaled inside the control. # @return [void] def set_scale_mode(scaleMode) end alias_method :scale_mode=, :set_scale_mode # Returns the scale mode currently used in the control. # # @see Wx::StaticBitmap#set_scale_mode # @return [Wx::wxStaticBitmap::ScaleMode] def get_scale_mode; end alias_method :scale_mode, :get_scale_mode end # StaticBitmap end