Class: Gtk::IconView
- Inherits:
-
Object
- Object
- Gtk::IconView
- Defined in:
- (unknown)
Instance Method Summary collapse
-
#activate_on_single_click ⇒ TrueClass
Gets the setting set by gtk_icon_view_set_activate_on_single_click().
-
#activate_on_single_click=(activate_on_single_click) ⇒ TrueClass
The activate-on-single-click property specifies whether the “item-activated” signal will be emitted after a single click.
-
#activate_on_single_click? ⇒ TrueClass
The activate-on-single-click property specifies whether the “item-activated” signal will be emitted after a single click.
-
#cell_area ⇒ Gtk::CellArea
The Gtk::CellArea used to layout cell renderers for this view.
-
#cell_area=(cell_area) ⇒ Gtk::CellArea
The Gtk::CellArea used to layout cell renderers for this view.
-
#column_spacing ⇒ Integer
The column-spacing property specifies the space which is inserted between the columns of the icon view.
-
#column_spacing=(column_spacing) ⇒ Integer
The column-spacing property specifies the space which is inserted between the columns of the icon view.
-
#columns ⇒ Integer
The columns property contains the number of the columns in which the items should be displayed.
-
#columns=(columns) ⇒ Integer
The columns property contains the number of the columns in which the items should be displayed.
-
#convert_widget_to_bin_window_coords(wx, wy, bx, by) ⇒ nil
Converts widget coordinates to coordinates for the bin_window, as expected by e.g.
-
#create_drag_icon(path) ⇒ cairo::Surface
Creates a #cairo_surface_t representation of the item at path.
-
#enable_model_drag_dest(targets, n_targets, actions) ⇒ nil
Turns icon_view into a drop destination for automatic DND.
-
#enable_model_drag_source(start_button_mask, targets, n_targets, actions) ⇒ nil
Turns icon_view into a drag source for automatic DND.
-
#get_cell_rect(path, cell, rect) ⇒ TrueClass
Fills the bounding rectangle in widget coordinates for the cell specified by path and cell.
-
#get_cursor(path, cell) ⇒ TrueClass
Fills in path and cell with the current cursor path and cell.
-
#get_dest_item_at_pos(drag_x, drag_y, path, pos) ⇒ TrueClass
Determines the destination item for a given position.
-
#get_drag_dest_item(path, pos) ⇒ nil
Gets information about the item that is highlighted for feedback.
-
#get_item_at_pos(x, y, path, cell) ⇒ TrueClass
Finds the path at the point (x, y), relative to bin_window coordinates.
-
#get_item_column(path) ⇒ Integer
Gets the column in which the item path is currently displayed.
-
#get_item_row(path) ⇒ Integer
Gets the row in which the item path is currently displayed.
-
#get_path_at_pos(x, y) ⇒ Gtk::TreePath
Finds the path at the point (x, y), relative to bin_window coordinates.
-
#get_tooltip_context(x, y, keyboard_tip, model, path, iter) ⇒ TrueClass
This function is supposed to be used in a Gtk::Widget::query-tooltip signal handler for Gtk::IconView.
-
#get_visible_range(start_path, end_path) ⇒ TrueClass
Sets start_path and end_path to be the first and last visible path.
-
#item_activated(path) ⇒ nil
Activates the item determined by path.
-
#item_orientation ⇒ Gtk::Orientation
The item-orientation property specifies how the cells (i.e. the icon and the text) of the item are positioned relative to each other.
-
#item_orientation=(item_orientation) ⇒ Gtk::Orientation
The item-orientation property specifies how the cells (i.e. the icon and the text) of the item are positioned relative to each other.
-
#item_padding ⇒ Integer
The item-padding property specifies the padding around each of the icon view’s item.
-
#item_padding=(item_padding) ⇒ Integer
The item-padding property specifies the padding around each of the icon view’s item.
-
#item_width ⇒ Integer
The item-width property specifies the width to use for each item.
-
#item_width=(item_width) ⇒ Integer
The item-width property specifies the width to use for each item.
-
#margin ⇒ Integer
The margin property specifies the space which is inserted at the edges of the icon view.
-
#margin=(margin) ⇒ Integer
The margin property specifies the space which is inserted at the edges of the icon view.
-
#markup_column ⇒ Integer
The ::markup-column property contains the number of the model column containing markup information to be displayed.
-
#markup_column=(markup_column) ⇒ Integer
The ::markup-column property contains the number of the model column containing markup information to be displayed.
-
#model ⇒ Gtk::TreeModel
Model.
- #model=(model) ⇒ Gtk::TreeModel
-
#new ⇒ Gtk::Widget
Creates a new Gtk::IconView widget.
-
#new_with_area(area) ⇒ Gtk::Widget
Creates a new Gtk::IconView widget using the specified area to layout cells inside the icons.
-
#new_with_model(model) ⇒ Gtk::Widget
Creates a new Gtk::IconView widget with the model model.
-
#path_is_selected(path) ⇒ TrueClass
Returns true if the icon pointed to by path is currently selected.
-
#pixbuf_column ⇒ Integer
The ::pixbuf-column property contains the number of the model column containing the pixbufs which are displayed.
-
#pixbuf_column=(pixbuf_column) ⇒ Integer
The ::pixbuf-column property contains the number of the model column containing the pixbufs which are displayed.
-
#reorderable ⇒ TrueClass
Retrieves whether the user can reorder the list via drag-and-drop.
-
#reorderable=(reorderable) ⇒ TrueClass
The reorderable property specifies if the items can be reordered by DND.
-
#reorderable? ⇒ TrueClass
The reorderable property specifies if the items can be reordered by DND.
-
#row_spacing ⇒ Integer
The row-spacing property specifies the space which is inserted between the rows of the icon view.
-
#row_spacing=(row_spacing) ⇒ Integer
The row-spacing property specifies the space which is inserted between the rows of the icon view.
-
#scroll_to_path(path, use_align, row_align, col_align) ⇒ nil
Moves the alignments of icon_view to the position specified by path.
-
#select_all ⇒ nil
Selects all the icons.
-
#select_path(path) ⇒ nil
Selects the row at path.
-
#selected_foreach(func, data) ⇒ nil
Calls a function for each selected icon.
-
#selected_items ⇒ GLib::List
Creates a list of paths of all selected items.
-
#selection_mode ⇒ Gtk::SelectionMode
The ::selection-mode property specifies the selection mode of icon view.
-
#selection_mode=(selection_mode) ⇒ Gtk::SelectionMode
The ::selection-mode property specifies the selection mode of icon view.
-
#set_cursor(path, cell, start_editing) ⇒ nil
Sets the current keyboard focus to be at path, and selects it.
-
#set_drag_dest_item(path, pos) ⇒ nil
Sets the item that is highlighted for feedback.
-
#set_tooltip_cell(tooltip, path, cell) ⇒ nil
Sets the tip area of tooltip to the area which cell occupies in the item pointed to by path.
-
#set_tooltip_item(tooltip, path) ⇒ nil
Sets the tip area of tooltip to be the area covered by the item at path.
-
#spacing ⇒ Integer
The spacing property specifies the space which is inserted between the cells (i.e. the icon and the text) of an item.
-
#spacing=(spacing) ⇒ Integer
The spacing property specifies the space which is inserted between the cells (i.e. the icon and the text) of an item.
-
#text_column ⇒ Integer
The ::text-column property contains the number of the model column containing the texts which are displayed.
-
#text_column=(text_column) ⇒ Integer
The ::text-column property contains the number of the model column containing the texts which are displayed.
-
#tooltip_column ⇒ Integer
Tooltip-column.
- #tooltip_column=(tooltip_column) ⇒ Integer
-
#unselect_all ⇒ nil
Unselects all the icons.
-
#unselect_path(path) ⇒ nil
Unselects the row at path.
-
#unset_model_drag_dest ⇒ nil
Undoes the effect of gtk_icon_view_enable_model_drag_dest().
-
#unset_model_drag_source ⇒ nil
Undoes the effect of gtk_icon_view_enable_model_drag_source().
Instance Method Details
#activate_on_single_click ⇒ TrueClass
Gets the setting set by gtk_icon_view_set_activate_on_single_click().
#activate_on_single_click=(activate_on_single_click) ⇒ TrueClass
The activate-on-single-click property specifies whether the “item-activated” signal will be emitted after a single click.
#activate_on_single_click? ⇒ TrueClass
The activate-on-single-click property specifies whether the “item-activated” signal will be emitted after a single click.
#cell_area ⇒ Gtk::CellArea
The Gtk::CellArea used to layout cell renderers for this view.
If no area is specified when creating the icon view with gtk_icon_view_new_with_area() a Gtk::CellAreaBox will be used.
#cell_area=(cell_area) ⇒ Gtk::CellArea
The Gtk::CellArea used to layout cell renderers for this view.
If no area is specified when creating the icon view with gtk_icon_view_new_with_area() a Gtk::CellAreaBox will be used.
#column_spacing ⇒ Integer
The column-spacing property specifies the space which is inserted between the columns of the icon view.
#column_spacing=(column_spacing) ⇒ Integer
The column-spacing property specifies the space which is inserted between the columns of the icon view.
#columns ⇒ Integer
The columns property contains the number of the columns in which the items should be displayed. If it is -1, the number of columns will be chosen automatically to fill the available area.
#columns=(columns) ⇒ Integer
The columns property contains the number of the columns in which the items should be displayed. If it is -1, the number of columns will be chosen automatically to fill the available area.
#convert_widget_to_bin_window_coords(wx, wy, bx, by) ⇒ nil
Converts widget coordinates to coordinates for the bin_window, as expected by e.g. gtk_icon_view_get_path_at_pos().
#create_drag_icon(path) ⇒ cairo::Surface
Creates a #cairo_surface_t representation of the item at path. This image is used for a drag icon.
#enable_model_drag_dest(targets, n_targets, actions) ⇒ nil
Turns icon_view into a drop destination for automatic DND. Calling this method sets Gtk::IconView:reorderable to false.
#enable_model_drag_source(start_button_mask, targets, n_targets, actions) ⇒ nil
Turns icon_view into a drag source for automatic DND. Calling this method sets Gtk::IconView:reorderable to false.
#get_cell_rect(path, cell, rect) ⇒ TrueClass
Fills the bounding rectangle in widget coordinates for the cell specified by path and cell. If cell is nil the main cell area is used.
This function is only valid if icon_view is realized.
#get_cursor(path, cell) ⇒ TrueClass
Fills in path and cell with the current cursor path and cell. If the cursor isn’t currently set, then *path will be nil. If no cell currently has focus, then *cell will be nil.
The returned Gtk::TreePath must be freed with gtk_tree_path_free().
#get_dest_item_at_pos(drag_x, drag_y, path, pos) ⇒ TrueClass
Determines the destination item for a given position.
#get_drag_dest_item(path, pos) ⇒ nil
Gets information about the item that is highlighted for feedback.
#get_item_at_pos(x, y, path, cell) ⇒ TrueClass
Finds the path at the point (x, y), relative to bin_window coordinates. In contrast to gtk_icon_view_get_path_at_pos(), this function also obtains the cell at the specified position. The returned path should be freed with gtk_tree_path_free(). See gtk_icon_view_convert_widget_to_bin_window_coords() for converting widget coordinates to bin_window coordinates.
#get_item_column(path) ⇒ Integer
Gets the column in which the item path is currently displayed. Column numbers start at 0.
#get_item_row(path) ⇒ Integer
Gets the row in which the item path is currently displayed. Row numbers start at 0.
#get_path_at_pos(x, y) ⇒ Gtk::TreePath
Finds the path at the point (x, y), relative to bin_window coordinates. See gtk_icon_view_get_item_at_pos(), if you are also interested in the cell at the specified position. See gtk_icon_view_convert_widget_to_bin_window_coords() for converting widget coordinates to bin_window coordinates. to the icon or nil if no icon exists at that position.
#get_tooltip_context(x, y, keyboard_tip, model, path, iter) ⇒ TrueClass
This function is supposed to be used in a Gtk::Widget::query-tooltip signal handler for Gtk::IconView. The x, y and keyboard_tip values which are received in the signal handler, should be passed to this function without modification.
The return value indicates whether there is an icon view item at the given coordinates (true) or not (false) for mouse tooltips. For keyboard tooltips the item returned will be the cursor item. When true, then any of model, path and iter which have been provided will be set to point to that row and the corresponding model. x and y will always be converted to be relative to icon_view’s bin_window if keyboard_tooltip is false.
#get_visible_range(start_path, end_path) ⇒ TrueClass
Sets start_path and end_path to be the first and last visible path. Note that there may be invisible paths in between.
Both paths should be freed with gtk_tree_path_free() after use.
#item_activated(path) ⇒ nil
Activates the item determined by path.
#item_orientation ⇒ Gtk::Orientation
The item-orientation property specifies how the cells (i.e. the icon and the text) of the item are positioned relative to each other.
#item_orientation=(item_orientation) ⇒ Gtk::Orientation
The item-orientation property specifies how the cells (i.e. the icon and the text) of the item are positioned relative to each other.
#item_padding ⇒ Integer
The item-padding property specifies the padding around each of the icon view’s item.
#item_padding=(item_padding) ⇒ Integer
The item-padding property specifies the padding around each of the icon view’s item.
#item_width ⇒ Integer
The item-width property specifies the width to use for each item. If it is set to -1, the icon view will automatically determine a suitable item size.
#item_width=(item_width) ⇒ Integer
The item-width property specifies the width to use for each item. If it is set to -1, the icon view will automatically determine a suitable item size.
#margin ⇒ Integer
The margin property specifies the space which is inserted at the edges of the icon view.
#margin=(margin) ⇒ Integer
The margin property specifies the space which is inserted at the edges of the icon view.
#markup_column ⇒ Integer
The ::markup-column property contains the number of the model column containing markup information to be displayed. The markup column must be of type #G_TYPE_STRING. If this property and the :text-column property are both set to column numbers, it overrides the text column. If both are set to -1, no texts are displayed.
#markup_column=(markup_column) ⇒ Integer
The ::markup-column property contains the number of the model column containing markup information to be displayed. The markup column must be of type #G_TYPE_STRING. If this property and the :text-column property are both set to column numbers, it overrides the text column. If both are set to -1, no texts are displayed.
#model ⇒ Gtk::TreeModel
Returns model.
#model=(model) ⇒ Gtk::TreeModel
#new ⇒ Gtk::Widget
Creates a new Gtk::IconView widget
#new_with_area(area) ⇒ Gtk::Widget
Creates a new Gtk::IconView widget using the specified area to layout cells inside the icons.
#new_with_model(model) ⇒ Gtk::Widget
Creates a new Gtk::IconView widget with the model model.
#path_is_selected(path) ⇒ TrueClass
Returns true if the icon pointed to by path is currently selected. If path does not point to a valid location, false is returned.
#pixbuf_column ⇒ Integer
The ::pixbuf-column property contains the number of the model column containing the pixbufs which are displayed. The pixbuf column must be of type #GDK_TYPE_PIXBUF. Setting this property to -1 turns off the display of pixbufs.
#pixbuf_column=(pixbuf_column) ⇒ Integer
The ::pixbuf-column property contains the number of the model column containing the pixbufs which are displayed. The pixbuf column must be of type #GDK_TYPE_PIXBUF. Setting this property to -1 turns off the display of pixbufs.
#reorderable ⇒ TrueClass
Retrieves whether the user can reorder the list via drag-and-drop. See gtk_icon_view_set_reorderable().
#reorderable=(reorderable) ⇒ TrueClass
The reorderable property specifies if the items can be reordered by DND.
#reorderable? ⇒ TrueClass
The reorderable property specifies if the items can be reordered by DND.
#row_spacing ⇒ Integer
The row-spacing property specifies the space which is inserted between the rows of the icon view.
#row_spacing=(row_spacing) ⇒ Integer
The row-spacing property specifies the space which is inserted between the rows of the icon view.
#scroll_to_path(path, use_align, row_align, col_align) ⇒ nil
Moves the alignments of icon_view to the position specified by path. row_align determines where the row is placed, and col_align determines where column is placed. Both are expected to be between 0.0 and 1.0. 0.0 means left/top alignment, 1.0 means right/bottom alignment, 0.5 means center.
If use_align is false, then the alignment arguments are ignored, and the tree does the minimum amount of work to scroll the item onto the screen. This means that the item will be scrolled to the edge closest to its current position. If the item is currently visible on the screen, nothing is done.
This function only works if the model is set, and path is a valid row on the model. If the model changes before the icon_view is realized, the centered path will be modified to reflect this change.
#select_all ⇒ nil
Selects all the icons. icon_view must has its selection mode set to #GTK_SELECTION_MULTIPLE.
#select_path(path) ⇒ nil
Selects the row at path.
#selected_foreach(func, data) ⇒ nil
Calls a function for each selected icon. Note that the model or selection cannot be modified from within this function.
#selected_items ⇒ GLib::List
Creates a list of paths of all selected items. Additionally, if you are planning on modifying the model after calling this function, you may want to convert the returned list into a list of Gtk::TreeRowReferences. To do this, you can use gtk_tree_row_reference_new().
To free the return value, use:
g_list_free_full (list, (GDestroyNotify) gtk_tree_path_free);
#selection_mode ⇒ Gtk::SelectionMode
The ::selection-mode property specifies the selection mode of icon view. If the mode is #GTK_SELECTION_MULTIPLE, rubberband selection is enabled, for the other modes, only keyboard selection is possible.
#selection_mode=(selection_mode) ⇒ Gtk::SelectionMode
The ::selection-mode property specifies the selection mode of icon view. If the mode is #GTK_SELECTION_MULTIPLE, rubberband selection is enabled, for the other modes, only keyboard selection is possible.
#set_cursor(path, cell, start_editing) ⇒ nil
Sets the current keyboard focus to be at path, and selects it. This is useful when you want to focus the user’s attention on a particular item. If cell is not nil, then focus is given to the cell specified by it. Additionally, if start_editing is true, then editing should be started in the specified cell.
This function is often followed by ‘gtk_widget_grab_focus (icon_view)` in order to give keyboard focus to the widget. Please note that editing can only happen when the widget is realized.
#set_drag_dest_item(path, pos) ⇒ nil
Sets the item that is highlighted for feedback.
#set_tooltip_cell(tooltip, path, cell) ⇒ nil
Sets the tip area of tooltip to the area which cell occupies in the item pointed to by path. See also gtk_tooltip_set_tip_area().
See also gtk_icon_view_set_tooltip_column() for a simpler alternative.
#set_tooltip_item(tooltip, path) ⇒ nil
Sets the tip area of tooltip to be the area covered by the item at path. See also gtk_icon_view_set_tooltip_column() for a simpler alternative. See also gtk_tooltip_set_tip_area().
#spacing ⇒ Integer
The spacing property specifies the space which is inserted between the cells (i.e. the icon and the text) of an item.
#spacing=(spacing) ⇒ Integer
The spacing property specifies the space which is inserted between the cells (i.e. the icon and the text) of an item.
#text_column ⇒ Integer
The ::text-column property contains the number of the model column containing the texts which are displayed. The text column must be of type #G_TYPE_STRING. If this property and the :markup-column property are both set to -1, no texts are displayed.
#text_column=(text_column) ⇒ Integer
The ::text-column property contains the number of the model column containing the texts which are displayed. The text column must be of type #G_TYPE_STRING. If this property and the :markup-column property are both set to -1, no texts are displayed.
#tooltip_column ⇒ Integer
Returns tooltip-column.
#tooltip_column=(tooltip_column) ⇒ Integer
#unselect_all ⇒ nil
Unselects all the icons.
#unselect_path(path) ⇒ nil
Unselects the row at path.
#unset_model_drag_dest ⇒ nil
Undoes the effect of gtk_icon_view_enable_model_drag_dest(). Calling this method sets Gtk::IconView:reorderable to false.
#unset_model_drag_source ⇒ nil
Undoes the effect of gtk_icon_view_enable_model_drag_source(). Calling this method sets Gtk::IconView:reorderable to false.