package ocgtk
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=4e50fdb5093136a10fc8ffbe388e44cbcb70d52f8afdd48863ec7e22580ff054
doc/ocgtk.gtk/Ocgtk_gtk/Gtk/Wrappers/Icon_view/index.html
Module Wrappers.Icon_view
type t = [ `icon_view | `widget | `initially_unowned | `object_ ] Gobject.objval new_ : unit -> tCreate a new IconView
val new_with_area :
[ `cell_area | `initially_unowned | `object_ ] Gobject.obj ->
tCreate a new IconView
val new_with_model : [ `tree_model ] Gobject.obj -> tCreate a new IconView
val unset_model_drag_source : t -> unitUndoes the effect of gtk_icon_view_enable_model_drag_source(). Calling this method sets `GtkIconView`:reorderable to %FALSE.
val unset_model_drag_dest : t -> unitUndoes the effect of gtk_icon_view_enable_model_drag_dest(). Calling this method sets `GtkIconView`:reorderable to %FALSE.
val unselect_path : t -> [ `tree_path ] Gobject.obj -> unitUnselects the row at @path.
val unselect_all : t -> unitUnselects all the icons.
val set_tooltip_item :
t ->
[ `tooltip | `object_ ] Gobject.obj ->
[ `tree_path ] Gobject.obj ->
unitSets 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().
val set_tooltip_column : t -> int -> unitIf you only plan to have simple (text-only) tooltips on full items, you can use this function to have `GtkIconView` handle these automatically for you. @column should be set to the column in @icon_view’s model containing the tooltip texts, or -1 to disable this feature.
When enabled, `GtkWidget:has-tooltip` will be set to %TRUE and @icon_view will connect a `GtkWidget::query-tooltip` signal handler.
Note that the signal handler sets the text with gtk_tooltip_set_markup(), so &, <, etc have to be escaped in the text.
val set_tooltip_cell :
t ->
[ `tooltip | `object_ ] Gobject.obj ->
[ `tree_path ] Gobject.obj ->
[ `cell_renderer | `initially_unowned | `object_ ] Gobject.obj option ->
unitSets 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.
val set_text_column : t -> int -> unitSets the column with text for @icon_view to be @column. The text column must be of type `G_TYPE_STRING`.
val set_spacing : t -> int -> unitSets the ::spacing property which specifies the space which is inserted between the cells (i.e. the icon and the text) of an item.
val set_selection_mode : t -> Gtk_enums.selectionmode -> unitSets the selection mode of the @icon_view.
val set_row_spacing : t -> int -> unitSets the ::row-spacing property which specifies the space which is inserted between the rows of the icon view.
val set_reorderable : t -> bool -> unitThis function is a convenience function to allow you to reorder models that support the `GtkTreeDragSourceIface` and the `GtkTreeDragDestIface`. Both `GtkTreeStore` and `GtkListStore` support these. If @reorderable is %TRUE, then the user can reorder the model by dragging and dropping rows. The developer can listen to these changes by connecting to the model's row_inserted and row_deleted signals. The reordering is implemented by setting up the icon view as a drag source and destination. Therefore, drag and drop can not be used in a reorderable view for any other purpose.
This function does not give you any degree of control over the order -- any reordering is allowed. If more control is needed, you should probably handle drag and drop manually.
val set_pixbuf_column : t -> int -> unitSets the column with pixbufs for @icon_view to be @column. The pixbuf column must be of type `GDK_TYPE_PIXBUF`
val set_model : t -> [ `tree_model ] Gobject.obj option -> unitSets the model for a `GtkIconView`. If the @icon_view already has a model set, it will remove it before setting the new model. If @model is %NULL, then it will unset the old model.
val set_markup_column : t -> int -> unitSets the column with markup information for @icon_view to be @column. The markup column must be of type `G_TYPE_STRING`. If the markup column is set to something, it overrides the text column set by gtk_icon_view_set_text_column().
val set_margin : t -> int -> unitSets the ::margin property which specifies the space which is inserted at the top, bottom, left and right of the icon view.
val set_item_width : t -> int -> unitSets the ::item-width property which specifies the width to use for each item. If it is set to -1, the icon view will automatically determine a suitable item size.
val set_item_padding : t -> int -> unitSets the `GtkIconView`:item-padding property which specifies the padding around each of the icon view’s items.
val set_item_orientation : t -> Gtk_enums.orientation -> unitSets the ::item-orientation property which determines whether the labels are drawn beside the icons instead of below.
val set_drag_dest_item :
t ->
[ `tree_path ] Gobject.obj option ->
Gtk_enums.iconviewdropposition ->
unitSets the item that is highlighted for feedback.
val set_cursor :
t ->
[ `tree_path ] Gobject.obj ->
[ `cell_renderer | `initially_unowned | `object_ ] Gobject.obj option ->
bool ->
unitSets 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 %NULL, 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.
val set_columns : t -> int -> unitSets the ::columns property which determines in how many columns the icons are arranged. If @columns is -1, the number of columns will be chosen automatically to fill the available area.
val set_column_spacing : t -> int -> unitSets the ::column-spacing property which specifies the space which is inserted between the columns of the icon view.
val set_activate_on_single_click : t -> bool -> unitCauses the `GtkIconView`::item-activated signal to be emitted on a single click instead of a double click.
val select_path : t -> [ `tree_path ] Gobject.obj -> unitSelects the row at @path.
val select_all : t -> unitSelects all the icons. @icon_view must has its selection mode set to %GTK_SELECTION_MULTIPLE.
val scroll_to_path :
t ->
[ `tree_path ] Gobject.obj ->
bool ->
float ->
float ->
unitMoves 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.
val path_is_selected : t -> [ `tree_path ] Gobject.obj -> boolReturns %TRUE if the icon pointed to by @path is currently selected. If @path does not point to a valid location, %FALSE is returned.
val item_activated : t -> [ `tree_path ] Gobject.obj -> unitActivates the item determined by @path.
val get_tooltip_column : t -> intReturns the column of @icon_view’s model which is being used for displaying tooltips on @icon_view’s rows.
val get_text_column : t -> intReturns the column with text for @icon_view.
val get_spacing : t -> intReturns the value of the ::spacing property.
val get_selection_mode : t -> Gtk_enums.selectionmodeGets the selection mode of the @icon_view.
val get_selected_items : t -> [ `tree_path ] Gobject.obj listCreates 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 `GtkTreeRowReferences`. To do this, you can use gtk_tree_row_reference_new().
To free the return value, use `g_list_free_full`: |<!-- language="C" --> GtkWidget *icon_view = gtk_icon_view_new (); // Use icon_view GList *list = gtk_icon_view_get_selected_items (GTK_ICON_VIEW (icon_view)); // use list g_list_free_full (list, (GDestroyNotify) gtk_tree_path_free); |
val get_row_spacing : t -> intReturns the value of the ::row-spacing property.
val get_reorderable : t -> boolRetrieves whether the user can reorder the list via drag-and-drop. See gtk_icon_view_set_reorderable().
val get_pixbuf_column : t -> intReturns the column with pixbufs for @icon_view.
val get_path_at_pos : t -> int -> int -> [ `tree_path ] Gobject.obj optionGets the path for the icon at the given position.
val get_model : t -> [ `tree_model ] Gobject.obj optionReturns the model the `GtkIconView` is based on. Returns %NULL if the model is unset.
val get_markup_column : t -> intReturns the column with markup text for @icon_view.
val get_margin : t -> intReturns the value of the ::margin property.
val get_item_width : t -> intReturns the value of the ::item-width property.
val get_item_row : t -> [ `tree_path ] Gobject.obj -> intGets the row in which the item @path is currently displayed. Row numbers start at 0.
val get_item_padding : t -> intReturns the value of the ::item-padding property.
val get_item_orientation : t -> Gtk_enums.orientationReturns the value of the ::item-orientation property which determines whether the labels are drawn beside the icons instead of below.
val get_item_column : t -> [ `tree_path ] Gobject.obj -> intGets the column in which the item @path is currently displayed. Column numbers start at 0.
val get_columns : t -> intReturns the value of the ::columns property.
val get_column_spacing : t -> intReturns the value of the ::column-spacing property.
val get_cell_rect :
t ->
[ `tree_path ] Gobject.obj ->
[ `cell_renderer | `initially_unowned | `object_ ] Gobject.obj option ->
bool * Ocgtk_gdk.Gdk.Wrappers.Rectangle.tFills the bounding rectangle in widget coordinates for the cell specified by @path and @cell. If @cell is %NULL the main cell area is used.
This function is only valid if @icon_view is realized.
val get_activate_on_single_click : t -> boolGets the setting set by gtk_icon_view_set_activate_on_single_click().
val enable_model_drag_source :
t ->
Ocgtk_gdk.Gdk.modifiertype ->
Ocgtk_gdk.Gdk.Wrappers.Content_formats.t ->
Ocgtk_gdk.Gdk.dragaction ->
unitTurns @icon_view into a drag source for automatic DND. Calling this method sets `GtkIconView`:reorderable to %FALSE.
val enable_model_drag_dest :
t ->
Ocgtk_gdk.Gdk.Wrappers.Content_formats.t ->
Ocgtk_gdk.Gdk.dragaction ->
unitTurns @icon_view into a drop destination for automatic DND. Calling this method sets `GtkIconView`:reorderable to %FALSE.
val create_drag_icon :
t ->
[ `tree_path ] Gobject.obj ->
Ocgtk_gdk.Gdk.Wrappers.Paintable.t optionCreates a `GdkPaintable` representation of the item at @path. This image is used for a drag icon.
val get_cell_area :
t ->
[ `cell_area | `initially_unowned | `object_ ] Gobject.objGet property: cell-area
val on_activate_cursor_item :
?after:bool ->
t ->
callback:(unit -> bool) ->
Gobject.Signal.handler_idval on_move_cursor :
?after:bool ->
t ->
callback:
(step:Gtk_enums.movementstep ->
count:int ->
extend:bool ->
modify:bool ->
bool) ->
Gobject.Signal.handler_idval on_select_all :
?after:bool ->
t ->
callback:(unit -> unit) ->
Gobject.Signal.handler_idval on_select_cursor_item :
?after:bool ->
t ->
callback:(unit -> unit) ->
Gobject.Signal.handler_idval on_selection_changed :
?after:bool ->
t ->
callback:(unit -> unit) ->
Gobject.Signal.handler_idval on_toggle_cursor_item :
?after:bool ->
t ->
callback:(unit -> unit) ->
Gobject.Signal.handler_idval on_unselect_all :
?after:bool ->
t ->
callback:(unit -> unit) ->
Gobject.Signal.handler_id