Class: Gtk::ComboBox
- Inherits:
-
Object
- Object
- Gtk::ComboBox
- Defined in:
- (unknown)
Instance Method Summary collapse
-
#active ⇒ Integer
The item which is currently active.
-
#active=(active) ⇒ Integer
The item which is currently active.
-
#active_id ⇒ String
The value of the ID column of the active row.
-
#active_id=(active_id) ⇒ String
The value of the ID column of the active row.
-
#active_iter=(iter) ⇒ nil
Sets the current active item to be the one referenced by iter, or unsets the active item if iter is nil.
-
#add_tearoffs ⇒ TrueClass
Gets the current value of the :add-tearoffs property.
-
#add_tearoffs=(add_tearoffs) ⇒ TrueClass
The add-tearoffs property controls whether generated menus have tearoff menu items.
-
#add_tearoffs? ⇒ TrueClass
The add-tearoffs property controls whether generated menus have tearoff menu items.
-
#button_sensitivity ⇒ Gtk::SensitivityType
Whether the dropdown button is sensitive when the model is empty.
-
#button_sensitivity=(button_sensitivity) ⇒ Gtk::SensitivityType
Whether the dropdown button is sensitive when the model is empty.
-
#cell_area ⇒ Gtk::CellArea
The Gtk::CellArea used to layout cell renderers for this combo box.
-
#cell_area=(cell_area) ⇒ Gtk::CellArea
The Gtk::CellArea used to layout cell renderers for this combo box.
-
#column_span_column ⇒ Integer
If this is set to a non-negative value, it must be the index of a column of type %G_TYPE_INT in the model.
-
#column_span_column=(column_span_column) ⇒ Integer
If this is set to a non-negative value, it must be the index of a column of type %G_TYPE_INT in the model.
-
#entry_text_column ⇒ Integer
The column in the combo box’s model to associate with strings from the entry if the combo was created with Gtk::ComboBox:has-entry = true.
-
#entry_text_column=(entry_text_column) ⇒ Integer
The column in the combo box’s model to associate with strings from the entry if the combo was created with Gtk::ComboBox:has-entry = true.
-
#focus_on_click ⇒ TrueClass
Returns whether the combo box grabs focus when it is clicked with the mouse.
-
#focus_on_click=(focus_on_click) ⇒ nil
Sets whether the combo box will grab focus when it is clicked with the mouse.
-
#get_active_iter(iter) ⇒ TrueClass
Sets iter to point to the currently active item, if any item is active.
-
#has_entry ⇒ TrueClass
Returns whether the combo box has an entry.
-
#has_entry=(has_entry) ⇒ TrueClass
Whether the combo box has an entry.
-
#has_entry? ⇒ TrueClass
Whether the combo box has an entry.
-
#has_frame=(has_frame) ⇒ TrueClass
The has-frame property controls whether a frame is drawn around the entry.
-
#has_frame? ⇒ TrueClass
The has-frame property controls whether a frame is drawn around the entry.
-
#id_column ⇒ Integer
The column in the combo box’s model that provides string IDs for the values in the model, if != -1.
-
#id_column=(id_column) ⇒ Integer
The column in the combo box’s model that provides string IDs for the values in the model, if != -1.
-
#model ⇒ Gtk::TreeModel
The model from which the combo box takes the values shown in the list.
-
#model=(model) ⇒ Gtk::TreeModel
The model from which the combo box takes the values shown in the list.
-
#new ⇒ Gtk::Widget
Creates a new empty Gtk::ComboBox.
-
#new_with_area(area) ⇒ Gtk::Widget
Creates a new empty Gtk::ComboBox using area to layout cells.
-
#new_with_area_and_entry(area) ⇒ Gtk::Widget
Creates a new empty Gtk::ComboBox with an entry.
-
#new_with_entry ⇒ Gtk::Widget
Creates a new empty Gtk::ComboBox with an entry.
-
#new_with_model(model) ⇒ Gtk::Widget
Creates a new Gtk::ComboBox with the model initialized to model.
-
#new_with_model_and_entry(model) ⇒ Gtk::Widget
Creates a new empty Gtk::ComboBox with an entry and with the model initialized to model.
-
#popdown ⇒ nil
Hides the menu or dropdown list of combo_box.
-
#popup ⇒ nil
Pops up the menu or dropdown list of combo_box.
-
#popup_accessible ⇒ Atk::Object
Gets the accessible object corresponding to the combo box’s popup.
-
#popup_fixed_width ⇒ TrueClass
Gets whether the popup uses a fixed width matching the allocated width of the combo box.
-
#popup_fixed_width=(popup_fixed_width) ⇒ TrueClass
Whether the popup’s width should be a fixed width matching the allocated width of the combo box.
-
#popup_fixed_width? ⇒ TrueClass
Whether the popup’s width should be a fixed width matching the allocated width of the combo box.
-
#popup_for_device(device) ⇒ nil
Pops up the menu or dropdown list of combo_box, the popup window will be grabbed so only device and its associated pointer/keyboard are the only Gdk::Devices able to send events to it.
-
#popup_shown=(popup_shown) ⇒ TrueClass
Whether the combo boxes dropdown is popped up.
-
#popup_shown? ⇒ TrueClass
Whether the combo boxes dropdown is popped up.
-
#row_separator_func ⇒ Gtk::TreeViewRowSeparatorFunc
Returns the current row separator function.
-
#row_span_column ⇒ Integer
If this is set to a non-negative value, it must be the index of a column of type %G_TYPE_INT in the model.
-
#row_span_column=(row_span_column) ⇒ Integer
If this is set to a non-negative value, it must be the index of a column of type %G_TYPE_INT in the model.
-
#set_row_separator_func(func, data, destroy) ⇒ nil
Sets the row separator function, which is used to determine whether a row should be drawn as a separator.
-
#tearoff_title ⇒ String
A title that may be displayed by the window manager when the popup is torn-off.
-
#tearoff_title=(tearoff_title) ⇒ String
A title that may be displayed by the window manager when the popup is torn-off.
-
#title ⇒ String
Gets the current title of the menu in tearoff mode.
-
#title=(title) ⇒ nil
Sets the menu’s title in tearoff mode.
-
#wrap_width ⇒ Integer
If wrap-width is set to a positive value, items in the popup will be laid out along multiple columns, starting a new row on reaching the wrap width.
-
#wrap_width=(wrap_width) ⇒ Integer
If wrap-width is set to a positive value, items in the popup will be laid out along multiple columns, starting a new row on reaching the wrap width.
Instance Method Details
#active ⇒ Integer
The item which is currently active. If the model is a non-flat treemodel, and the active item is not an immediate child of the root of the tree, this property has the value ‘gtk_tree_path_get_indices (path)`, where `path` is the Gtk::TreePath of the active item.
#active=(active) ⇒ Integer
The item which is currently active. If the model is a non-flat treemodel, and the active item is not an immediate child of the root of the tree, this property has the value ‘gtk_tree_path_get_indices (path)`, where `path` is the Gtk::TreePath of the active item.
#active_id ⇒ String
The value of the ID column of the active row.
#active_id=(active_id) ⇒ String
The value of the ID column of the active row.
#active_iter=(iter) ⇒ nil
Sets the current active item to be the one referenced by iter, or unsets the active item if iter is nil.
#add_tearoffs ⇒ TrueClass
Gets the current value of the :add-tearoffs property.
#add_tearoffs=(add_tearoffs) ⇒ TrueClass
The add-tearoffs property controls whether generated menus have tearoff menu items.
Note that this only affects menu style combo boxes.
#add_tearoffs? ⇒ TrueClass
The add-tearoffs property controls whether generated menus have tearoff menu items.
Note that this only affects menu style combo boxes.
#button_sensitivity ⇒ Gtk::SensitivityType
Whether the dropdown button is sensitive when the model is empty.
#button_sensitivity=(button_sensitivity) ⇒ Gtk::SensitivityType
Whether the dropdown button is sensitive when the model is empty.
#cell_area ⇒ Gtk::CellArea
The Gtk::CellArea used to layout cell renderers for this combo box.
If no area is specified when creating the combo box with gtk_combo_box_new_with_area() a horizontally oriented Gtk::CellAreaBox will be used.
#cell_area=(cell_area) ⇒ Gtk::CellArea
The Gtk::CellArea used to layout cell renderers for this combo box.
If no area is specified when creating the combo box with gtk_combo_box_new_with_area() a horizontally oriented Gtk::CellAreaBox will be used.
#column_span_column ⇒ Integer
If this is set to a non-negative value, it must be the index of a column of type %G_TYPE_INT in the model. The value in that column for each item will determine how many columns that item will span in the popup. Therefore, values in this column must be greater than zero, and the sum of an item’s column position + span should not exceed Gtk::ComboBox:wrap-width.
#column_span_column=(column_span_column) ⇒ Integer
If this is set to a non-negative value, it must be the index of a column of type %G_TYPE_INT in the model. The value in that column for each item will determine how many columns that item will span in the popup. Therefore, values in this column must be greater than zero, and the sum of an item’s column position + span should not exceed Gtk::ComboBox:wrap-width.
#entry_text_column ⇒ Integer
The column in the combo box’s model to associate with strings from the entry if the combo was created with Gtk::ComboBox:has-entry = true.
#entry_text_column=(entry_text_column) ⇒ Integer
The column in the combo box’s model to associate with strings from the entry if the combo was created with Gtk::ComboBox:has-entry = true.
#focus_on_click ⇒ TrueClass
Returns whether the combo box grabs focus when it is clicked with the mouse. See gtk_combo_box_set_focus_on_click().
#focus_on_click=(focus_on_click) ⇒ nil
Sets whether the combo box will grab focus when it is clicked with the mouse. Making mouse clicks not grab focus is useful in places like toolbars where you don’t want the keyboard focus removed from the main area of the application.
#get_active_iter(iter) ⇒ TrueClass
Sets iter to point to the currently active item, if any item is active. Otherwise, iter is left unchanged.
#has_entry ⇒ TrueClass
Returns whether the combo box has an entry.
#has_entry=(has_entry) ⇒ TrueClass
Whether the combo box has an entry.
#has_entry? ⇒ TrueClass
Whether the combo box has an entry.
#has_frame=(has_frame) ⇒ TrueClass
The has-frame property controls whether a frame is drawn around the entry.
#has_frame? ⇒ TrueClass
The has-frame property controls whether a frame is drawn around the entry.
#id_column ⇒ Integer
The column in the combo box’s model that provides string IDs for the values in the model, if != -1.
#id_column=(id_column) ⇒ Integer
The column in the combo box’s model that provides string IDs for the values in the model, if != -1.
#model ⇒ Gtk::TreeModel
The model from which the combo box takes the values shown in the list.
#model=(model) ⇒ Gtk::TreeModel
The model from which the combo box takes the values shown in the list.
#new ⇒ Gtk::Widget
Creates a new empty Gtk::ComboBox.
#new_with_area(area) ⇒ Gtk::Widget
Creates a new empty Gtk::ComboBox using area to layout cells.
#new_with_area_and_entry(area) ⇒ Gtk::Widget
Creates a new empty Gtk::ComboBox with an entry.
The new combo box will use area to layout cells.
#new_with_entry ⇒ Gtk::Widget
Creates a new empty Gtk::ComboBox with an entry.
#new_with_model(model) ⇒ Gtk::Widget
Creates a new Gtk::ComboBox with the model initialized to model.
#new_with_model_and_entry(model) ⇒ Gtk::Widget
Creates a new empty Gtk::ComboBox with an entry and with the model initialized to model.
#popdown ⇒ nil
Hides the menu or dropdown list of combo_box.
This function is mostly intended for use by accessibility technologies; applications should have little use for it.
#popup ⇒ nil
Pops up the menu or dropdown list of combo_box.
This function is mostly intended for use by accessibility technologies; applications should have little use for it.
Before calling this, combo_box must be mapped, or nothing will happen.
#popup_accessible ⇒ Atk::Object
Gets the accessible object corresponding to the combo box’s popup.
This function is mostly intended for use by accessibility technologies; applications should have little use for it.
#popup_fixed_width ⇒ TrueClass
Gets whether the popup uses a fixed width matching the allocated width of the combo box.
#popup_fixed_width=(popup_fixed_width) ⇒ TrueClass
Whether the popup’s width should be a fixed width matching the allocated width of the combo box.
#popup_fixed_width? ⇒ TrueClass
Whether the popup’s width should be a fixed width matching the allocated width of the combo box.
#popup_for_device(device) ⇒ nil
Pops up the menu or dropdown list of combo_box, the popup window will be grabbed so only device and its associated pointer/keyboard are the only Gdk::Devices able to send events to it.
#popup_shown=(popup_shown) ⇒ TrueClass
Whether the combo boxes dropdown is popped up. Note that this property is mainly useful, because it allows you to connect to notify::popup-shown.
#popup_shown? ⇒ TrueClass
Whether the combo boxes dropdown is popped up. Note that this property is mainly useful, because it allows you to connect to notify::popup-shown.
#row_separator_func ⇒ Gtk::TreeViewRowSeparatorFunc
Returns the current row separator function.
#row_span_column ⇒ Integer
If this is set to a non-negative value, it must be the index of a column of type %G_TYPE_INT in the model. The value in that column for each item will determine how many rows that item will span in the popup. Therefore, values in this column must be greater than zero.
#row_span_column=(row_span_column) ⇒ Integer
If this is set to a non-negative value, it must be the index of a column of type %G_TYPE_INT in the model. The value in that column for each item will determine how many rows that item will span in the popup. Therefore, values in this column must be greater than zero.
#set_row_separator_func(func, data, destroy) ⇒ nil
Sets the row separator function, which is used to determine whether a row should be drawn as a separator. If the row separator function is nil, no separators are drawn. This is the default value.
#tearoff_title ⇒ String
A title that may be displayed by the window manager when the popup is torn-off.
#tearoff_title=(tearoff_title) ⇒ String
A title that may be displayed by the window manager when the popup is torn-off.
#title ⇒ String
Gets the current title of the menu in tearoff mode. See gtk_combo_box_set_add_tearoffs(). string which must not be freed.
#title=(title) ⇒ nil
Sets the menu’s title in tearoff mode.
#wrap_width ⇒ Integer
If wrap-width is set to a positive value, items in the popup will be laid out along multiple columns, starting a new row on reaching the wrap width.
#wrap_width=(wrap_width) ⇒ Integer
If wrap-width is set to a positive value, items in the popup will be laid out along multiple columns, starting a new row on reaching the wrap width.