Class: Gtk::FlowBox
- Inherits:
-
Object
- Object
- Gtk::FlowBox
- Defined in:
- (unknown)
Instance Method Summary collapse
-
#activate_on_single_click ⇒ TrueClass
Returns whether children activate on single clicks.
-
#activate_on_single_click=(activate_on_single_click) ⇒ TrueClass
Determines whether children can be activated with a single click, or require a double-click.
-
#activate_on_single_click? ⇒ TrueClass
Determines whether children can be activated with a single click, or require a double-click.
-
#bind_model(model, create_widget_func, user_data, user_data_free_func) ⇒ nil
Binds model to box.
-
#column_spacing ⇒ Integer
The amount of horizontal space between two children.
-
#column_spacing=(column_spacing) ⇒ Integer
The amount of horizontal space between two children.
-
#get_child_at_index(idx) ⇒ Gtk::FlowBoxChild
Gets the nth child in the box.
-
#get_child_at_pos(x, y) ⇒ Gtk::FlowBoxChild
Gets the child in the (x, y) position.
-
#hadjustment=(adjustment) ⇒ nil
Hooks up an adjustment to focus handling in box.
-
#homogeneous ⇒ TrueClass
Returns whether the box is homogeneous (all children are the same size).
-
#homogeneous=(homogeneous) ⇒ TrueClass
Determines whether all children should be allocated the same size.
-
#homogeneous? ⇒ TrueClass
Determines whether all children should be allocated the same size.
-
#insert(widget, position) ⇒ nil
Inserts the widget into box at position.
-
#invalidate_filter ⇒ nil
Updates the filtering for all children.
-
#invalidate_sort ⇒ nil
Updates the sorting for all children.
-
#max_children_per_line ⇒ Integer
The maximum amount of children to request space for consecutively in the given orientation.
-
#max_children_per_line=(max_children_per_line) ⇒ Integer
The maximum amount of children to request space for consecutively in the given orientation.
-
#min_children_per_line ⇒ Integer
The minimum number of children to allocate consecutively in the given orientation.
-
#min_children_per_line=(min_children_per_line) ⇒ Integer
The minimum number of children to allocate consecutively in the given orientation.
-
#new ⇒ Gtk::Widget
Creates a GtkFlowBox.
-
#row_spacing ⇒ Integer
The amount of vertical space between two children.
-
#row_spacing=(row_spacing) ⇒ Integer
The amount of vertical space between two children.
-
#select_all ⇒ nil
Select all children of box, if the selection mode allows it.
-
#select_child(child) ⇒ nil
Selects a single child of box, if the selection mode allows it.
-
#selected_children ⇒ GLib::List
Creates a list of all selected children.
-
#selected_foreach(func, data) ⇒ nil
Calls a function for each selected child.
-
#selection_mode ⇒ Gtk::SelectionMode
The selection mode used by the flow box.
-
#selection_mode=(selection_mode) ⇒ Gtk::SelectionMode
The selection mode used by the flow box.
-
#set_filter_func(filter_func, user_data, destroy) ⇒ nil
By setting a filter function on the box one can decide dynamically which of the children to show.
-
#set_sort_func(sort_func, user_data, destroy) ⇒ nil
By setting a sort function on the box, one can dynamically reorder the children of the box, based on the contents of the children.
-
#unselect_all ⇒ nil
Unselect all children of box, if the selection mode allows it.
-
#unselect_child(child) ⇒ nil
Unselects a single child of box, if the selection mode allows it.
-
#vadjustment=(adjustment) ⇒ nil
Hooks up an adjustment to focus handling in box.
Instance Method Details
#activate_on_single_click ⇒ TrueClass
Returns whether children activate on single clicks.
#activate_on_single_click=(activate_on_single_click) ⇒ TrueClass
Determines whether children can be activated with a single click, or require a double-click.
#activate_on_single_click? ⇒ TrueClass
Determines whether children can be activated with a single click, or require a double-click.
#bind_model(model, create_widget_func, user_data, user_data_free_func) ⇒ nil
Binds model to box.
If box was already bound to a model, that previous binding is destroyed.
The contents of box are cleared and then filled with widgets that represent items from model. box is updated whenever model changes. If model is nil, box is left empty.
It is undefined to add or remove widgets directly (for example, with gtk_flow_box_insert() or gtk_container_add()) while box is bound to a model.
Note that using a model is incompatible with the filtering and sorting functionality in GtkFlowBox. When using a model, filtering and sorting should be implemented by the model.
#column_spacing ⇒ Integer
The amount of horizontal space between two children.
#column_spacing=(column_spacing) ⇒ Integer
The amount of horizontal space between two children.
#get_child_at_index(idx) ⇒ Gtk::FlowBoxChild
Gets the nth child in the box.
#get_child_at_pos(x, y) ⇒ Gtk::FlowBoxChild
Gets the child in the (x, y) position.
#hadjustment=(adjustment) ⇒ nil
Hooks up an adjustment to focus handling in box. The adjustment is also used for autoscrolling during rubberband selection. See gtk_scrolled_window_get_hadjustment() for a typical way of obtaining the adjustment, and gtk_flow_box_set_vadjustment()for setting the vertical adjustment.
The adjustments have to be in pixel units and in the same coordinate system as the allocation for immediate children of the box.
#homogeneous ⇒ TrueClass
Returns whether the box is homogeneous (all children are the same size). See gtk_box_set_homogeneous().
#homogeneous=(homogeneous) ⇒ TrueClass
Determines whether all children should be allocated the same size.
#homogeneous? ⇒ TrueClass
Determines whether all children should be allocated the same size.
#insert(widget, position) ⇒ nil
Inserts the widget into box at position.
If a sort function is set, the widget will actually be inserted at the calculated position and this function has the same effect as gtk_container_add().
If position is -1, or larger than the total number of children in the box, then the widget will be appended to the end.
#invalidate_filter ⇒ nil
Updates the filtering for all children.
Call this function when the result of the filter function on the box is changed due ot an external factor. For instance, this would be used if the filter function just looked for a specific search term, and the entry with the string has changed.
#invalidate_sort ⇒ nil
Updates the sorting for all children.
Call this when the result of the sort function on box is changed due to an external factor.
#max_children_per_line ⇒ Integer
The maximum amount of children to request space for consecutively in the given orientation.
#max_children_per_line=(max_children_per_line) ⇒ Integer
The maximum amount of children to request space for consecutively in the given orientation.
#min_children_per_line ⇒ Integer
The minimum number of children to allocate consecutively in the given orientation.
Setting the minimum children per line ensures that a reasonably small height will be requested for the overall minimum width of the box.
#min_children_per_line=(min_children_per_line) ⇒ Integer
The minimum number of children to allocate consecutively in the given orientation.
Setting the minimum children per line ensures that a reasonably small height will be requested for the overall minimum width of the box.
#new ⇒ Gtk::Widget
Creates a GtkFlowBox.
#row_spacing ⇒ Integer
The amount of vertical space between two children.
#row_spacing=(row_spacing) ⇒ Integer
The amount of vertical space between two children.
#select_all ⇒ nil
Select all children of box, if the selection mode allows it.
#select_child(child) ⇒ nil
Selects a single child of box, if the selection mode allows it.
#selected_children ⇒ GLib::List
Creates a list of all selected children.
#selected_foreach(func, data) ⇒ nil
Calls a function for each selected child.
Note that the selection cannot be modified from within this function.
#selection_mode ⇒ Gtk::SelectionMode
The selection mode used by the flow box.
#selection_mode=(selection_mode) ⇒ Gtk::SelectionMode
The selection mode used by the flow box.
#set_filter_func(filter_func, user_data, destroy) ⇒ nil
By setting a filter function on the box one can decide dynamically which of the children to show. For instance, to implement a search function that only shows the children matching the search terms.
The filter_func will be called for each child after the call, and it will continue to be called each time a child changes (via gtk_flow_box_child_changed()) or when gtk_flow_box_invalidate_filter() is called.
Note that using a filter function is incompatible with using a model (see gtk_flow_box_bind_model()).
#set_sort_func(sort_func, user_data, destroy) ⇒ nil
By setting a sort function on the box, one can dynamically reorder the children of the box, based on the contents of the children.
The sort_func will be called for each child after the call, and will continue to be called each time a child changes (via gtk_flow_box_child_changed()) and when gtk_flow_box_invalidate_sort() is called.
Note that using a sort function is incompatible with using a model (see gtk_flow_box_bind_model()).
#unselect_all ⇒ nil
Unselect all children of box, if the selection mode allows it.
#unselect_child(child) ⇒ nil
Unselects a single child of box, if the selection mode allows it.
#vadjustment=(adjustment) ⇒ nil
Hooks up an adjustment to focus handling in box. The adjustment is also used for autoscrolling during rubberband selection. See gtk_scrolled_window_get_vadjustment() for a typical way of obtaining the adjustment, and gtk_flow_box_set_hadjustment()for setting the horizontal adjustment.
The adjustments have to be in pixel units and in the same coordinate system as the allocation for immediate children of the box.