# :stopdoc: # This file is automatically generated by the WXRuby3 documentation # generator. Do not alter this file. # :startdoc: module Wx # A combobox that displays bitmap in front of the list items. # It currently only allows using bitmaps of one size, and resizes itself so that a bitmap can be shown next to the text field. # While {Wx::BitmapComboBox} contains the {Wx::ComboBox} API, but it might not actually be derived from that class. In fact, if the platform does not have a native implementation, {Wx::BitmapComboBox} will inherit from {Wx::OwnerDrawnComboBox}. You can determine if the implementation is generic by checking whether {Wx::GENERIC_BITMAPCOMBOBOX} is defined. Currently {Wx::BitmapComboBox} is implemented natively for MSW and GTK+. # # === Styles # # This class supports the following styles: # # - {Wx::CB_READONLY}: Creates a combobox without a text editor. On some platforms the control may appear very different when this style is used. # # - {Wx::CB_SORT}: Sorts the entries in the list alphabetically. # # - {Wx::TE_PROCESS_ENTER}: The control will generate the event {Wx::EVT_TEXT_ENTER} (otherwise pressing Enter key is either processed internally by the control or used for navigation between dialog controls). Windows only. # # Todocreate {Wx::CB_PROCESS_ENTER} rather than reusing {Wx::TE_PROCESS_ENTER}! # # === 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_combobox}(id, meth = nil, &block): Process a {Wx::EVT_COMBOBOX} event, when an item on the list is selected. # # - {Wx::EvtHandler#evt_text}(id, meth = nil, &block): Process a {Wx::EVT_TEXT} event, when the combobox text changes. # # - {Wx::EvtHandler#evt_text_enter}(id, meth = nil, &block): Process a {Wx::EVT_TEXT_ENTER} event, when RETURN is pressed in the combobox. # # === # # Category: {Wx::Controls}
Appearance:
wxMSW Appearance # wxGTK Appearance # wxOSX Appearance #
# @see Wx::ComboBox # @see Wx::Choice # @see Wx::OwnerDrawnComboBox # @see Wx::CommandEvent # # class BitmapComboBox < ComboBox # @overload initialize() # Default ctor. # @return [Wx::BitmapComboBox] # @overload initialize(parent, id=Wx::StandardID::ID_ANY, value=(''), pos=Wx::DEFAULT_POSITION, size=Wx::DEFAULT_SIZE, choices=nil, style=0, validator=Wx::DEFAULT_VALIDATOR, name=Wx::BITMAP_COMBO_BOX_NAME_STR) # Constructor, creating and showing a combobox. # # @see Wx::BitmapComboBox#create # @see Wx::Validator # @param parent [Wx::Window] Parent window. Must not be NULL. # @param id [Integer] Window identifier. The value {Wx::StandardID::ID_ANY} indicates a default value. # @param value [String] Initial selection string. An empty string indicates no selection. # @param pos [Array(Integer, Integer), Wx::Point] Initial position. # @param size [Array(Integer, Integer), Wx::Size] Initial size. # @param choices [Array] An array of strings with which to initialise the control. # @param style [Integer] The window style, see {Wx::CB_}* flags. # @param validator [Wx::Validator] Validator which can be used for additional data checks. # @param name [String] Control name. # @return [Wx::BitmapComboBox] # @overload initialize(parent, id, value, pos, size, choices, style, validator=Wx::DEFAULT_VALIDATOR, name=Wx::BITMAP_COMBO_BOX_NAME_STR) # Constructor, creating and showing a combobox. # # @see Wx::BitmapComboBox#create # @see Wx::Validator # @param parent [Wx::Window] Parent window. Must not be NULL. # @param id [Integer] Window identifier. The value {Wx::StandardID::ID_ANY} indicates a default value. # @param value [String] Initial selection string. An empty string indicates no selection. # @param pos [Array(Integer, Integer), Wx::Point] Initial position. # @param size [Array(Integer, Integer), Wx::Size] Initial size. # @param choices [Array] A {Wx::ArrayString} with which to initialise the control. # @param style [Integer] The window style, see {Wx::CB_}* flags. # @param validator [Wx::Validator] Validator which can be used for additional data checks. # @param name [String] Control name. # @return [Wx::BitmapComboBox] def initialize(*args) end # @overload append(item, bitmap=Wx::NULL_BITMAP) # Adds the item to the end of the combo box. # @param item [String] # @param bitmap [Wx::Bitmap] # @return [Integer] # @overload append(item, bitmap, clientData) # Adds the item to the end of the combo box, associating the given untyped, client data pointer clientData with the item. # @param item [String] # @param bitmap [Wx::Bitmap] # @param clientData [Object] # @return [Integer] def append(*args) end # @overload create(parent, id, value, pos, size, choices, style=0, validator=Wx::DEFAULT_VALIDATOR, name=Wx::BITMAP_COMBO_BOX_NAME_STR) # Creates the combobox for two-step construction. # @param parent [Wx::Window] # @param id [Integer] # @param value [String] # @param pos [Array(Integer, Integer), Wx::Point] # @param size [Array(Integer, Integer), Wx::Size] # @param choices [Array] # @param style [Integer] # @param validator [Wx::Validator] # @param name [String] # @return [Boolean] # @overload create(parent, id, value, pos, size, choices, style=0, validator=Wx::DEFAULT_VALIDATOR, name=Wx::BITMAP_COMBO_BOX_NAME_STR) # Creates the combobox for two-step construction. # @param parent [Wx::Window] # @param id [Integer] # @param value [String] # @param pos [Array(Integer, Integer), Wx::Point] # @param size [Array(Integer, Integer), Wx::Size] # @param choices [Array] # @param style [Integer] # @param validator [Wx::Validator] # @param name [String] # @return [Boolean] def create(*args) end # Returns the size of the bitmaps used in the combo box. # If the combo box is empty, then {Wx::DEFAULT_SIZE} is returned. # @return [Wx::Size] def get_bitmap_size; end alias_method :bitmap_size, :get_bitmap_size # Returns the bitmap of the item with the given index. # @param n [Integer] # @return [Wx::Bitmap] def get_item_bitmap(n) end alias_method :item_bitmap, :get_item_bitmap # @overload insert(item, bitmap, pos) # Inserts the item into the list before pos. # Not valid for {Wx::CB_SORT} style, use {Wx::BitmapComboBox#append} instead. # @param item [String] # @param bitmap [Wx::Bitmap] # @param pos [Integer] # @return [Integer] # @overload insert(item, bitmap, pos, clientData) # Inserts the item into the list before pos, associating the given untyped, client data pointer with the item. # Not valid for {Wx::CB_SORT} style, use {Wx::BitmapComboBox#append} instead. # @param item [String] # @param bitmap [Wx::Bitmap] # @param pos [Integer] # @param clientData [Object] # @return [Integer] def insert(*args) end # Sets the bitmap for the given item. # @param n [Integer] # @param bitmap [Wx::BitmapBundle,Wx::Bitmap,Wx::Icon,Wx::Image] # @return [void] def set_item_bitmap(n, bitmap) end end # BitmapComboBox end