Class IconView
- All Implemented Interfaces:
Proxy
,Accessible
,Buildable
,CellLayout
,ConstraintTarget
,Scrollable
GtkIconView
is a widget which displays data in a grid of icons.
GtkIconView
provides an alternative view on a GtkTreeModel
.
It displays the model as a grid of icons with labels. Like
TreeView
, it allows to select one or multiple items
(depending on the selection mode, see setSelectionMode(org.gnome.gtk.SelectionMode)
).
In addition to selection with the arrow keys, GtkIconView
supports
rubberband selection, which is controlled by dragging the pointer.
Note that if the tree model is backed by an actual tree store (as
opposed to a flat list where the mapping to icons is obvious),
GtkIconView
will only display the first level of the tree and
ignore the tree’s branches.
CSS nodes
iconview.view
╰── [rubberband]
GtkIconView
has a single CSS node with name iconview and style class .view.
For rubberband selection, a subnode with name rubberband is used.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
Deprecated.Functional interface declaration of theActivateCursorItemCallback
callback.static class
IconView.Builder<B extends IconView.Builder<B>>
Deprecated.Inner class implementing a builder pattern to construct a GObject with properties.static interface
Deprecated.Functional interface declaration of theItemActivatedCallback
callback.static interface
Deprecated.Functional interface declaration of theMoveCursorCallback
callback.static interface
Deprecated.Functional interface declaration of theSelectAllCallback
callback.static interface
Deprecated.Functional interface declaration of theSelectCursorItemCallback
callback.static interface
Deprecated.Functional interface declaration of theSelectionChangedCallback
callback.static interface
Deprecated.Functional interface declaration of theToggleCursorItemCallback
callback.static interface
Deprecated.Functional interface declaration of theUnselectAllCallback
callback.Nested classes/interfaces inherited from class org.gnome.gtk.Widget
Widget.DestroyCallback, Widget.DirectionChangedCallback, Widget.HideCallback, Widget.KeynavFailedCallback, Widget.MapCallback, Widget.MnemonicActivateCallback, Widget.MoveFocusCallback, Widget.QueryTooltipCallback, Widget.RealizeCallback, Widget.ShowCallback, Widget.StateFlagsChangedCallback, Widget.UnmapCallback, Widget.UnrealizeCallback, Widget.WidgetClass, Widget.WidgetImpl
Nested classes/interfaces inherited from class org.gnome.gobject.InitiallyUnowned
InitiallyUnowned.InitiallyUnownedClass
Nested classes/interfaces inherited from class org.gnome.gobject.GObject
GObject.NotifyCallback, GObject.ObjectClass
Nested classes/interfaces inherited from interface org.gnome.gtk.Accessible
Accessible.AccessibleImpl, Accessible.AccessibleInterface
Nested classes/interfaces inherited from interface org.gnome.gtk.Buildable
Buildable.BuildableIface, Buildable.BuildableImpl
Nested classes/interfaces inherited from interface org.gnome.gtk.CellLayout
CellLayout.CellLayoutIface, CellLayout.CellLayoutImpl
Nested classes/interfaces inherited from interface org.gnome.gtk.ConstraintTarget
ConstraintTarget.ConstraintTargetImpl, ConstraintTarget.ConstraintTargetInterface
Nested classes/interfaces inherited from interface org.gnome.gtk.Scrollable
Scrollable.ScrollableImpl, Scrollable.ScrollableInterface
-
Constructor Summary
ConstructorDescriptionIconView()
Deprecated.IconView
(MemorySegment address) Deprecated.Create a IconView proxy instance for the provided memory address. -
Method Summary
Modifier and TypeMethodDescriptionprotected IconView
asParent()
Deprecated.Returns this instance as if it were its parent type.static IconView.Builder
<? extends IconView.Builder> builder()
Deprecated.AIconView.Builder
object constructs aIconView
with the specified properties.createDragIcon
(TreePath path) Deprecated.UseGridView
insteadboolean
Deprecated.Emits the "activate-cursor-item" signal.void
emitItemActivated
(TreePath path) Deprecated.Emits the "item-activated" signal.boolean
emitMoveCursor
(MovementStep step, int count, boolean extend, boolean modify) Deprecated.Emits the "move-cursor" signal.void
Deprecated.Emits the "select-all" signal.void
Deprecated.Emits the "select-cursor-item" signal.void
Deprecated.Emits the "selection-changed" signal.void
Deprecated.Emits the "toggle-cursor-item" signal.void
Deprecated.Emits the "unselect-all" signal.void
enableModelDragDest
(ContentFormats formats, Set<DragAction> actions) Deprecated.UseGridView
insteadvoid
enableModelDragDest
(ContentFormats formats, DragAction... actions) Deprecated.UseGridView
insteadvoid
enableModelDragSource
(Set<ModifierType> startButtonMask, ContentFormats formats, Set<DragAction> actions) Deprecated.UseGridView
insteadvoid
enableModelDragSource
(ModifierType startButtonMask, ContentFormats formats, DragAction... actions) Deprecated.UseGridView
insteadboolean
Deprecated.UseGridView
insteadboolean
getCellRect
(TreePath path, @Nullable CellRenderer cell, Rectangle rect) Deprecated.UseGridView
insteadint
Deprecated.UseGridView
insteadint
Deprecated.UseGridView
insteadboolean
getCursor
(@Nullable Out<TreePath> path, @Nullable Out<CellRenderer> cell) Deprecated.UseGridView
insteadboolean
getDestItemAtPos
(int dragX, int dragY, @Nullable Out<TreePath> path, @Nullable Out<IconViewDropPosition> pos) Deprecated.UseGridView
insteadvoid
getDragDestItem
(@Nullable Out<TreePath> path, @Nullable Out<IconViewDropPosition> pos) Deprecated.UseGridView
insteadboolean
getItemAtPos
(int x, int y, @Nullable Out<TreePath> path, @Nullable Out<CellRenderer> cell) Deprecated.UseGridView
insteadint
getItemColumn
(TreePath path) Deprecated.UseGridView
insteadDeprecated.UseGridView
insteadint
Deprecated.UseGridView
insteadint
getItemRow
(TreePath path) Deprecated.UseGridView
insteadint
Deprecated.UseGridView
insteadint
Deprecated.UseGridView
insteadint
Deprecated.UseGridView
insteadgetModel()
Deprecated.UseGridView
insteadgetPathAtPos
(int x, int y) Deprecated.UseGridView
insteadint
Deprecated.UseGridView
insteadboolean
Deprecated.UseGridView
insteadint
Deprecated.UseGridView
insteadDeprecated.UseGridView
insteadDeprecated.UseGridView
insteadint
Deprecated.UseGridView
insteadint
Deprecated.UseGridView
insteadint
Deprecated.UseGridView
insteadboolean
getTooltipContext
(int x, int y, boolean keyboardTip, @Nullable Out<TreeModel> model, @Nullable Out<TreePath> path, @Nullable TreeIter iter) Deprecated.UseGridView
insteadstatic Type
getType()
Deprecated.Get the GType of the IconView classboolean
getVisibleRange
(@Nullable Out<TreePath> startPath, @Nullable Out<TreePath> endPath) Deprecated.UseGridView
insteadvoid
itemActivated
(TreePath path) Deprecated.UseGridView
insteadDeprecated.AGtk.SignalAction
which gets emitted when the user activates the currently focused item.Deprecated.The ::item-activated signal is emitted when the method gtk_icon_view_item_activated() is called, when the user double clicks an item with the "activate-on-single-click" property set tofalse
, or when the user single clicks an item when the "activate-on-single-click" property set totrue
.onMoveCursor
(IconView.MoveCursorCallback handler) Deprecated.The ::move-cursor signal is aGtk.SignalAction
which gets emitted when the user initiates a cursor movement.onSelectAll
(IconView.SelectAllCallback handler) Deprecated.AGtk.SignalAction
which gets emitted when the user selects all items.Deprecated.AGtk.SignalAction
which gets emitted when the user selects the item that is currently focused.Deprecated.The ::selection-changed signal is emitted when the selection (i.e.Deprecated.AGtk.SignalAction
which gets emitted when the user toggles whether the currently focused item is selected or not.Deprecated.AGtk.SignalAction
which gets emitted when the user unselects all items.boolean
pathIsSelected
(TreePath path) Deprecated.UseGridView
insteadvoid
scrollToPath
(TreePath path, boolean useAlign, float rowAlign, float colAlign) Deprecated.UseGridView
insteadvoid
Deprecated.UseGridView
insteadvoid
Deprecated.UseGridView
insteadvoid
selectPath
(TreePath path) Deprecated.UseGridView
insteadvoid
setActivateOnSingleClick
(boolean single) Deprecated.UseGridView
insteadvoid
setColumns
(int columns) Deprecated.UseGridView
insteadvoid
setColumnSpacing
(int columnSpacing) Deprecated.UseGridView
insteadvoid
setCursor
(TreePath path, @Nullable CellRenderer cell, boolean startEditing) Deprecated.UseGridView
insteadvoid
setDragDestItem
(@Nullable TreePath path, IconViewDropPosition pos) Deprecated.UseGridView
insteadvoid
setItemOrientation
(Orientation orientation) Deprecated.UseGridView
insteadvoid
setItemPadding
(int itemPadding) Deprecated.UseGridView
insteadvoid
setItemWidth
(int itemWidth) Deprecated.UseGridView
insteadvoid
setMargin
(int margin) Deprecated.UseGridView
insteadvoid
setMarkupColumn
(int column) Deprecated.UseGridView
insteadvoid
Deprecated.UseGridView
insteadvoid
setPixbufColumn
(int column) Deprecated.UseGridView
insteadvoid
setReorderable
(boolean reorderable) Deprecated.UseGridView
insteadvoid
setRowSpacing
(int rowSpacing) Deprecated.UseGridView
insteadvoid
Deprecated.UseGridView
insteadvoid
setSpacing
(int spacing) Deprecated.UseGridView
insteadvoid
setTextColumn
(int column) Deprecated.UseGridView
insteadvoid
setTooltipCell
(Tooltip tooltip, TreePath path, @Nullable CellRenderer cell) Deprecated.UseGridView
insteadvoid
setTooltipColumn
(int column) Deprecated.UseGridView
insteadvoid
setTooltipItem
(Tooltip tooltip, TreePath path) Deprecated.UseGridView
insteadvoid
Deprecated.UseGridView
insteadvoid
unselectPath
(TreePath path) Deprecated.UseGridView
insteadvoid
Deprecated.UseGridView
insteadvoid
Deprecated.UseGridView
insteadstatic IconView
Deprecated.UseGridView
insteadstatic IconView
Deprecated.UseGridView
insteadMethods inherited from class org.gnome.gtk.Widget
actionSetEnabled, activateActionIfExists, activateDefault, activateWidget, addController, addCssClass, addMnemonicLabel, addTickCallback, allocate, childFocus, computeBounds, computeExpand, computeExpand, computePoint, computeTransform, contains, createPangoContext, createPangoLayout, cssChanged, directionChanged, disposeTemplate, dragCheckThreshold, emitDestroy, emitDirectionChanged, emitHide, emitKeynavFailed, emitMap, emitMnemonicActivate, emitMoveFocus, emitQueryTooltip, emitRealize, emitShow, emitStateFlagsChanged, emitUnmap, emitUnrealize, errorBell, focus, getAllocatedBaseline, getAllocatedHeight, getAllocatedWidth, getAllocation, getAncestor, getBaseline, getCanFocus, getCanTarget, getChildVisible, getClipboard, getColor, getCssClasses, getCssName, getCursor, getDefaultDirection, getDirection, getDisplay, getFirstChild, getFocusable, getFocusChild, getFocusOnClick, getFontMap, getFontOptions, getFrameClock, getHalign, getHasTooltip, getHeight, getHexpand, getHexpandSet, getLastChild, getLayoutManager, getMapped, getMarginBottom, getMarginEnd, getMarginStart, getMarginTop, getMemoryLayout, getName, getNative, getNextSibling, getOpacity, getOverflow, getPangoContext, getParent, getPreferredSize, getPrevSibling, getPrimaryClipboard, getRealized, getReceivesDefault, getRequestMode, getRoot, getScaleFactor, getSensitive, getSettings, getSize, getSizeRequest, getStateFlags, getStyleContext, getTemplateChild, getTooltipMarkup, getTooltipText, getValign, getVexpand, getVexpandSet, getVisible, getWidth, grabFocus, hasCssClass, hasDefault, hasFocus, hasVisibleFocus, hide, inDestruction, initTemplate, insertActionGroup, insertAfter, insertBefore, isAncestor, isDrawable, isFocus, isSensitive, isVisible, keynavFailed, listMnemonicLabels, map, measure, mnemonicActivate, moveFocus, observeChildren, observeControllers, onDestroy, onDirectionChanged, onHide, onKeynavFailed, onMap, onMnemonicActivate, onMoveFocus, onQueryTooltip, onRealize, onShow, onStateFlagsChanged, onUnmap, onUnrealize, pick, pick, queryTooltip, queueAllocate, queueDraw, queueResize, realize, removeController, removeCssClass, removeMnemonicLabel, removeTickCallback, root, setCanFocus, setCanTarget, setChildVisible, setCssClasses, setCursor, setCursorFromName, setDefaultDirection, setDirection, setFocusable, setFocusChild, setFocusOnClick, setFontMap, setFontOptions, setHalign, setHasTooltip, setHexpand, setHexpandSet, setLayoutManager, setMarginBottom, setMarginEnd, setMarginStart, setMarginTop, setName, setOpacity, setOverflow, setParent, setReceivesDefault, setSensitive, setSizeRequest, setStateFlags, setStateFlags, setTooltipMarkup, setTooltipText, setValign, setVexpand, setVexpandSet, setVisible, shouldLayout, show, sizeAllocate, sizeAllocate, snapshot, snapshotChild, stateFlagsChanged, systemSettingChanged, translateCoordinates, triggerTooltipQuery, unmap, unparent, unrealize, unroot, unsetStateFlags, unsetStateFlags
Methods inherited from class org.gnome.gobject.GObject
addToggleRef, addWeakPointer, bindProperty, bindProperty, bindProperty, bindPropertyFull, bindPropertyFull, bindPropertyWithClosures, bindPropertyWithClosures, compatControl, connect, connect, connect, constructed, disconnect, dispatchPropertiesChanged, dispose, dupData, dupQdata, emit, emitNotify, finalize_, forceFloating, freezeNotify, get, getData, getProperty, getProperty, getProperty, getQdata, getv, interfaceFindProperty, interfaceInstallProperty, interfaceListProperties, isFloating, newInstance, newInstance, newInstance, newInstance, newv, notify_, notify_, notifyByPspec, onNotify, ref, refSink, removeToggleRef, removeWeakPointer, replaceData, replaceQdata, runDispose, set, setData, setDataFull, setProperty, setProperty, setProperty, setQdata, setQdataFull, setv, stealData, stealQdata, takeRef, thawNotify, unref, watchClosure, weakRef, weakUnref, withProperties
Methods inherited from class org.gnome.gobject.TypeInstance
callParent, callParent, getPrivate, readGClass, writeGClass
Methods inherited from class io.github.jwharm.javagi.base.ProxyInstance
equals, handle, hashCode
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.gnome.gtk.Accessible
announce, getAccessibleParent, getAccessibleRole, getAtContext, getBounds, getFirstAccessibleChild, getNextAccessibleSibling, getPlatformState, resetProperty, resetRelation, resetState, setAccessibleParent, updateNextAccessibleSibling, updateProperty, updateRelation, updateState
Methods inherited from interface org.gnome.gtk.Buildable
getBuildableId
Methods inherited from interface org.gnome.gtk.CellLayout
addAttribute, clear, clearAttributes, getArea, getCells, packEnd, packStart, reorder, setAttributes, setCellDataFunc
Methods inherited from interface org.gnome.gtk.Scrollable
getBorder, getHadjustment, getHscrollPolicy, getVadjustment, getVscrollPolicy, setHadjustment, setHscrollPolicy, setVadjustment, setVscrollPolicy
-
Constructor Details
-
IconView
Deprecated.Create a IconView proxy instance for the provided memory address.- Parameters:
address
- the memory address of the native object
-
IconView
-
-
Method Details
-
getType
-
asParent
Deprecated.Returns this instance as if it were its parent type. This is mostly synonymous to the Javasuper
keyword, but will set the native typeclass function pointers to the parent type. When overriding a native virtual method in Java, "chaining up" withsuper.methodName()
doesn't work, because it invokes the overridden function pointer again. To chain up, callasParent().methodName()
. This will call the native function pointer of this virtual method in the typeclass of the parent type. -
withArea
Deprecated.UseGridView
insteadCreates a newGtkIconView
widget using the specifiedarea
to layout cells inside the icons.- Parameters:
area
- theGtkCellArea
to use to layout cells- Returns:
- A newly created
GtkIconView
widget
-
withModel
Deprecated.UseGridView
insteadCreates a newGtkIconView
widget with the modelmodel
.- Parameters:
model
- The model.- Returns:
- A newly created
GtkIconView
widget.
-
createDragIcon
Deprecated.UseGridView
insteadCreates aGdkPaintable
representation of the item atpath
. This image is used for a drag icon.- Parameters:
path
- aGtkTreePath
in this IconView- Returns:
- a newly-allocated
GdkPaintable
of the drag icon.
-
enableModelDragDest
Deprecated.UseGridView
insteadTurns this IconView into a drop destination for automatic DND. Calling this method setsGtkIconView
:reorderable tofalse
.- Parameters:
formats
- the formats that the drag will supportactions
- the bitmask of possible actions for a drag to this widget
-
enableModelDragDest
Deprecated.UseGridView
insteadTurns this IconView into a drop destination for automatic DND. Calling this method setsGtkIconView
:reorderable tofalse
.- Parameters:
formats
- the formats that the drag will supportactions
- the bitmask of possible actions for a drag to this widget
-
enableModelDragSource
@Deprecated public void enableModelDragSource(Set<ModifierType> startButtonMask, ContentFormats formats, Set<DragAction> actions) Deprecated.UseGridView
insteadTurns this IconView into a drag source for automatic DND. Calling this method setsGtkIconView
:reorderable tofalse
.- Parameters:
startButtonMask
- Mask of allowed buttons to start dragformats
- the formats that the drag will supportactions
- the bitmask of possible actions for a drag from this widget
-
enableModelDragSource
@Deprecated public void enableModelDragSource(ModifierType startButtonMask, ContentFormats formats, DragAction... actions) Deprecated.UseGridView
insteadTurns this IconView into a drag source for automatic DND. Calling this method setsGtkIconView
:reorderable tofalse
.- Parameters:
startButtonMask
- Mask of allowed buttons to start dragformats
- the formats that the drag will supportactions
- the bitmask of possible actions for a drag from this widget
-
getActivateOnSingleClick
Deprecated.UseGridView
insteadGets the setting set by gtk_icon_view_set_activate_on_single_click().- Returns:
true
if item-activated will be emitted on a single click
-
getCellRect
@Deprecated public boolean getCellRect(TreePath path, @Nullable @Nullable CellRenderer cell, Rectangle rect) Deprecated.UseGridView
insteadFills the bounding rectangle in widget coordinates for the cell specified bypath
andcell
. Ifcell
isnull
the main cell area is used.This function is only valid if this IconView is realized.
- Parameters:
path
- aGtkTreePath
cell
- aGtkCellRenderer
rect
- rectangle to fill with cell rect- Returns:
false
if there is no such item,true
otherwise
-
getColumnSpacing
Deprecated.UseGridView
insteadReturns the value of the ::column-spacing property.- Returns:
- the space between columns
-
getColumns
Deprecated.UseGridView
insteadReturns the value of the ::columns property.- Returns:
- the number of columns, or -1
-
getCursor
@Deprecated public boolean getCursor(@Nullable @Nullable Out<TreePath> path, @Nullable @Nullable Out<CellRenderer> cell) Deprecated.UseGridView
insteadFills inpath
andcell
with the current cursor path and cell. If the cursor isn’t currently set, then *path
will benull
. If no cell currently has focus, then *cell
will benull
.The returned
GtkTreePath
must be freed with gtk_tree_path_free().- Parameters:
path
- Return location for the current cursor pathcell
- Return location the current focus cell- Returns:
true
if the cursor is set.
-
getDestItemAtPos
@Deprecated public boolean getDestItemAtPos(int dragX, int dragY, @Nullable @Nullable Out<TreePath> path, @Nullable @Nullable Out<IconViewDropPosition> pos) Deprecated.UseGridView
insteadDetermines the destination item for a given position.- Parameters:
dragX
- the position to determine the destination item fordragY
- the position to determine the destination item forpath
- Return location for the path of the itempos
- Return location for the drop position- Returns:
- whether there is an item at the given position.
-
getDragDestItem
@Deprecated public void getDragDestItem(@Nullable @Nullable Out<TreePath> path, @Nullable @Nullable Out<IconViewDropPosition> pos) Deprecated.UseGridView
insteadGets information about the item that is highlighted for feedback.- Parameters:
path
- Return location for the path of the highlighted itempos
- Return location for the drop position
-
getItemAtPos
@Deprecated public boolean getItemAtPos(int x, int y, @Nullable @Nullable Out<TreePath> path, @Nullable @Nullable Out<CellRenderer> cell) Deprecated.UseGridView
insteadGets the path and cell for the icon at the given position.- Parameters:
x
- The x position to be identifiedy
- The y position to be identifiedpath
- Return location for the pathcell
- Return location for the renderer responsible for the cell at (x
,y
)- Returns:
true
if an item exists at the specified position
-
getItemColumn
Deprecated.UseGridView
insteadGets the column in which the itempath
is currently displayed. Column numbers start at 0.- Parameters:
path
- theGtkTreePath
of the item- Returns:
- The column in which the item is displayed
-
getItemOrientation
Deprecated.UseGridView
insteadReturns the value of the ::item-orientation property which determines whether the labels are drawn beside the icons instead of below.- Returns:
- the relative position of texts and icons
-
getItemPadding
Deprecated.UseGridView
insteadReturns the value of the ::item-padding property.- Returns:
- the padding around items
-
getItemRow
Deprecated.UseGridView
insteadGets the row in which the itempath
is currently displayed. Row numbers start at 0.- Parameters:
path
- theGtkTreePath
of the item- Returns:
- The row in which the item is displayed
-
getItemWidth
Deprecated.UseGridView
insteadReturns the value of the ::item-width property.- Returns:
- the width of a single item, or -1
-
getMargin
Deprecated.UseGridView
insteadReturns the value of the ::margin property.- Returns:
- the space at the borders
-
getMarkupColumn
Deprecated.UseGridView
insteadReturns the column with markup text for this IconView.- Returns:
- the markup column, or -1 if it’s unset.
-
getModel
Deprecated.UseGridView
insteadReturns the model theGtkIconView
is based on. Returnsnull
if the model is unset.- Returns:
- The currently used
GtkTreeModel
-
getPathAtPos
Deprecated.UseGridView
insteadGets the path for the icon at the given position.- Parameters:
x
- The x position to be identifiedy
- The y position to be identified- Returns:
- The
GtkTreePath
corresponding to the icon ornull
if no icon exists at that position.
-
getPixbufColumn
Deprecated.UseGridView
insteadReturns the column with pixbufs for this IconView.- Returns:
- the pixbuf column, or -1 if it’s unset.
-
getReorderable
Deprecated.UseGridView
insteadRetrieves whether the user can reorder the list via drag-and-drop. See gtk_icon_view_set_reorderable().- Returns:
true
if the list can be reordered.
-
getRowSpacing
Deprecated.UseGridView
insteadReturns the value of the ::row-spacing property.- Returns:
- the space between rows
-
getSelectedItems
Deprecated.UseGridView
insteadCreates 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 ofGtkTreeRowReferences
. To do this, you can use gtk_tree_row_reference_new().To free the return value, use
g_list_free_full
: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);
- Returns:
- A
GList
containing aGtkTreePath
for each selected row.
-
getSelectionMode
Deprecated.UseGridView
insteadGets the selection mode of the this IconView.- Returns:
- the current selection mode
-
getSpacing
Deprecated.UseGridView
insteadReturns the value of the ::spacing property.- Returns:
- the space between cells
-
getTextColumn
Deprecated.UseGridView
insteadReturns the column with text for this IconView.- Returns:
- the text column, or -1 if it’s unset.
-
getTooltipColumn
Deprecated.UseGridView
insteadReturns the column of this IconView’s model which is being used for displaying tooltips on this IconView’s rows.- Returns:
- the index of the tooltip column that is currently being used, or -1 if this is disabled.
-
getTooltipContext
@Deprecated public boolean getTooltipContext(int x, int y, boolean keyboardTip, @Nullable @Nullable Out<TreeModel> model, @Nullable @Nullable Out<TreePath> path, @Nullable @Nullable TreeIter iter) Deprecated.UseGridView
insteadThis function is supposed to be used in aGtkWidget::query-tooltip
signal handler forGtkIconView
. Thex
,y
andkeyboardTip
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. Whentrue
, then any ofmodel
,path
anditer
which have been provided will be set to point to that row and the corresponding model.- Parameters:
x
- the x coordinate (relative to widget coordinates)y
- the y coordinate (relative to widget coordinates)keyboardTip
- whether this is a keyboard tooltip or notmodel
- a pointer to receive aGtkTreeModel
path
- a pointer to receive aGtkTreePath
iter
- a pointer to receive aGtkTreeIter
- Returns:
- whether or not the given tooltip context points to an item
-
getVisibleRange
@Deprecated public boolean getVisibleRange(@Nullable @Nullable Out<TreePath> startPath, @Nullable @Nullable Out<TreePath> endPath) Deprecated.UseGridView
insteadSetsstartPath
andendPath
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.
- Parameters:
startPath
- Return location for start of regionendPath
- Return location for end of region- Returns:
true
, if valid paths were placed instartPath
andendPath
-
itemActivated
Deprecated.UseGridView
insteadActivates the item determined bypath
.- Parameters:
path
- TheGtkTreePath
to be activated
-
pathIsSelected
Deprecated.UseGridView
insteadReturnstrue
if the icon pointed to bypath
is currently selected. Ifpath
does not point to a valid location,false
is returned.- Parameters:
path
- AGtkTreePath
to check selection on.- Returns:
true
ifpath
is selected.
-
scrollToPath
@Deprecated public void scrollToPath(TreePath path, boolean useAlign, float rowAlign, float colAlign) Deprecated.UseGridView
insteadMoves the alignments of this IconView to the position specified bypath
.rowAlign
determines where the row is placed, andcolAlign
determines wherecolumn
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
useAlign
isfalse
, 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 this IconView is realized, the centered path will be modified to reflect this change.- Parameters:
path
- The path of the item to move to.useAlign
- whether to use alignment arguments, orfalse
.rowAlign
- The vertical alignment of the item specified bypath
.colAlign
- The horizontal alignment of the item specified bypath
.
-
selectAll
Deprecated.UseGridView
insteadSelects all the icons. this IconView must has its selection mode set toSelectionMode.MULTIPLE
. -
selectPath
Deprecated.UseGridView
insteadSelects the row atpath
.- Parameters:
path
- TheGtkTreePath
to be selected.
-
selectedForeach
Deprecated.UseGridView
insteadCalls a function for each selected icon. Note that the model or selection cannot be modified from within this function.- Parameters:
func
- The function to call for each selected icon.
-
setActivateOnSingleClick
Deprecated.UseGridView
insteadCauses theGtkIconView
::item-activated signal to be emitted on a single click instead of a double click.- Parameters:
single
-true
to emit item-activated on a single click
-
setColumnSpacing
Deprecated.UseGridView
insteadSets the ::column-spacing property which specifies the space which is inserted between the columns of the icon view.- Parameters:
columnSpacing
- the column spacing
-
setColumns
Deprecated.UseGridView
insteadSets the ::columns property which determines in how many columns the icons are arranged. Ifcolumns
is -1, the number of columns will be chosen automatically to fill the available area.- Parameters:
columns
- the number of columns
-
setCursor
@Deprecated public void setCursor(TreePath path, @Nullable @Nullable CellRenderer cell, boolean startEditing) Deprecated.UseGridView
insteadSets the current keyboard focus to be atpath
, and selects it. This is useful when you want to focus the user’s attention on a particular item. Ifcell
is notnull
, then focus is given to the cell specified by it. Additionally, ifstartEditing
istrue
, 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.- Parameters:
path
- AGtkTreePath
cell
- One of the cell renderers of this IconViewstartEditing
-true
if the specified cell should start being edited.
-
setDragDestItem
@Deprecated public void setDragDestItem(@Nullable @Nullable TreePath path, IconViewDropPosition pos) Deprecated.UseGridView
insteadSets the item that is highlighted for feedback.- Parameters:
path
- The path of the item to highlightpos
- Specifies where to drop, relative to the item
-
setItemOrientation
Deprecated.UseGridView
insteadSets the ::item-orientation property which determines whether the labels are drawn beside the icons instead of below.- Parameters:
orientation
- the relative position of texts and icons
-
setItemPadding
Deprecated.UseGridView
insteadSets theGtkIconView
:item-padding property which specifies the padding around each of the icon view’s items.- Parameters:
itemPadding
- the item padding
-
setItemWidth
Deprecated.UseGridView
insteadSets 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.- Parameters:
itemWidth
- the width for each item
-
setMargin
Deprecated.UseGridView
insteadSets the ::margin property which specifies the space which is inserted at the top, bottom, left and right of the icon view.- Parameters:
margin
- the margin
-
setMarkupColumn
Deprecated.UseGridView
insteadSets the column with markup information for this IconView to becolumn
. The markup column must be of typeG_TYPE_STRING
. If the markup column is set to something, it overrides the text column set by gtk_icon_view_set_text_column().- Parameters:
column
- A column in the currently used model, or -1 to display no text
-
setModel
Deprecated.UseGridView
insteadSets the model for aGtkIconView
. If the this IconView already has a model set, it will remove it before setting the new model. Ifmodel
isnull
, then it will unset the old model.- Parameters:
model
- The model.
-
setPixbufColumn
Deprecated.UseGridView
insteadSets the column with pixbufs for this IconView to becolumn
. The pixbuf column must be of typeGDK_TYPE_PIXBUF
- Parameters:
column
- A column in the currently used model, or -1 to disable
-
setReorderable
Deprecated.UseGridView
insteadThis function is a convenience function to allow you to reorder models that support theGtkTreeDragSourceIface
and theGtkTreeDragDestIface
. BothGtkTreeStore
andGtkListStore
support these. Ifreorderable
istrue
, 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.
- Parameters:
reorderable
-true
, if the list of items can be reordered.
-
setRowSpacing
Deprecated.UseGridView
insteadSets the ::row-spacing property which specifies the space which is inserted between the rows of the icon view.- Parameters:
rowSpacing
- the row spacing
-
setSelectionMode
Deprecated.UseGridView
insteadSets the selection mode of the this IconView.- Parameters:
mode
- The selection mode
-
setSpacing
Deprecated.UseGridView
insteadSets the ::spacing property which specifies the space which is inserted between the cells (i.e. the icon and the text) of an item.- Parameters:
spacing
- the spacing
-
setTextColumn
Deprecated.UseGridView
insteadSets the column with text for this IconView to becolumn
. The text column must be of typeG_TYPE_STRING
.- Parameters:
column
- A column in the currently used model, or -1 to display no text
-
setTooltipCell
@Deprecated public void setTooltipCell(Tooltip tooltip, TreePath path, @Nullable @Nullable CellRenderer cell) Deprecated.UseGridView
insteadSets the tip area oftooltip
to the area whichcell
occupies in the item pointed to bypath
. See also gtk_tooltip_set_tip_area().See also gtk_icon_view_set_tooltip_column() for a simpler alternative.
- Parameters:
tooltip
- aGtkTooltip
path
- aGtkTreePath
cell
- aGtkCellRenderer
-
setTooltipColumn
Deprecated.UseGridView
insteadIf you only plan to have simple (text-only) tooltips on full items, you can use this function to haveGtkIconView
handle these automatically for you.column
should be set to the column in this IconView’s model containing the tooltip texts, or -1 to disable this feature.When enabled,
GtkWidget:has-tooltip
will be set totrue
and this IconView will connect aGtkWidget::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.
- Parameters:
column
- an integer, which is a valid column number for this IconView’s model
-
setTooltipItem
Deprecated.UseGridView
insteadSets the tip area oftooltip
to be the area covered by the item atpath
. See also gtk_icon_view_set_tooltip_column() for a simpler alternative. See also gtk_tooltip_set_tip_area().- Parameters:
tooltip
- aGtkTooltip
path
- aGtkTreePath
-
unselectAll
-
unselectPath
Deprecated.UseGridView
insteadUnselects the row atpath
.- Parameters:
path
- TheGtkTreePath
to be unselected.
-
unsetModelDragDest
Deprecated.UseGridView
insteadUndoes the effect of gtk_icon_view_enable_model_drag_dest(). Calling this method setsGtkIconView
:reorderable tofalse
. -
unsetModelDragSource
Deprecated.UseGridView
insteadUndoes the effect of gtk_icon_view_enable_model_drag_source(). Calling this method setsGtkIconView
:reorderable tofalse
. -
onActivateCursorItem
public SignalConnection<IconView.ActivateCursorItemCallback> onActivateCursorItem(IconView.ActivateCursorItemCallback handler) Deprecated.AGtk.SignalAction
which gets emitted when the user activates the currently focused item.Applications should not connect to it, but may emit it with g_signal_emit_by_name() if they need to control activation programmatically.
The default bindings for this signal are Space, Return and Enter.
- Parameters:
handler
- the signal handler- Returns:
- a signal handler ID to keep track of the signal connection
- See Also:
-
emitActivateCursorItem
public boolean emitActivateCursorItem()Deprecated.Emits the "activate-cursor-item" signal. SeeonActivateCursorItem(org.gnome.gtk.IconView.ActivateCursorItemCallback)
. -
onItemActivated
public SignalConnection<IconView.ItemActivatedCallback> onItemActivated(IconView.ItemActivatedCallback handler) Deprecated.The ::item-activated signal is emitted when the method gtk_icon_view_item_activated() is called, when the user double clicks an item with the "activate-on-single-click" property set tofalse
, or when the user single clicks an item when the "activate-on-single-click" property set totrue
. It is also emitted when a non-editable item is selected and one of the keys: Space, Return or Enter is pressed.- Parameters:
handler
- the signal handler- Returns:
- a signal handler ID to keep track of the signal connection
- See Also:
-
emitItemActivated
Deprecated.Emits the "item-activated" signal. SeeonItemActivated(org.gnome.gtk.IconView.ItemActivatedCallback)
. -
onMoveCursor
public SignalConnection<IconView.MoveCursorCallback> onMoveCursor(IconView.MoveCursorCallback handler) Deprecated.The ::move-cursor signal is aGtk.SignalAction
which gets emitted when the user initiates a cursor movement.Applications should not connect to it, but may emit it with g_signal_emit_by_name() if they need to control the cursor programmatically.
The default bindings for this signal include
- Arrow keys which move by individual steps
- Home/End keys which move to the first/last item
- PageUp/PageDown which move by "pages" All of these will extend the selection when combined with the Shift modifier.
- Parameters:
handler
- the signal handler- Returns:
- a signal handler ID to keep track of the signal connection
- See Also:
-
emitMoveCursor
Deprecated.Emits the "move-cursor" signal. SeeonMoveCursor(org.gnome.gtk.IconView.MoveCursorCallback)
. -
onSelectAll
Deprecated.AGtk.SignalAction
which gets emitted when the user selects all items.Applications should not connect to it, but may emit it with g_signal_emit_by_name() if they need to control selection programmatically.
The default binding for this signal is Ctrl-a.
- Parameters:
handler
- the signal handler- Returns:
- a signal handler ID to keep track of the signal connection
- See Also:
-
emitSelectAll
public void emitSelectAll()Deprecated.Emits the "select-all" signal. SeeonSelectAll(org.gnome.gtk.IconView.SelectAllCallback)
. -
onSelectCursorItem
public SignalConnection<IconView.SelectCursorItemCallback> onSelectCursorItem(IconView.SelectCursorItemCallback handler) Deprecated.AGtk.SignalAction
which gets emitted when the user selects the item that is currently focused.Applications should not connect to it, but may emit it with g_signal_emit_by_name() if they need to control selection programmatically.
There is no default binding for this signal.
- Parameters:
handler
- the signal handler- Returns:
- a signal handler ID to keep track of the signal connection
- See Also:
-
emitSelectCursorItem
public void emitSelectCursorItem()Deprecated.Emits the "select-cursor-item" signal. SeeonSelectCursorItem(org.gnome.gtk.IconView.SelectCursorItemCallback)
. -
onSelectionChanged
public SignalConnection<IconView.SelectionChangedCallback> onSelectionChanged(IconView.SelectionChangedCallback handler) Deprecated.The ::selection-changed signal is emitted when the selection (i.e. the set of selected items) changes.- Parameters:
handler
- the signal handler- Returns:
- a signal handler ID to keep track of the signal connection
- See Also:
-
emitSelectionChanged
public void emitSelectionChanged()Deprecated.Emits the "selection-changed" signal. SeeonSelectionChanged(org.gnome.gtk.IconView.SelectionChangedCallback)
. -
onToggleCursorItem
public SignalConnection<IconView.ToggleCursorItemCallback> onToggleCursorItem(IconView.ToggleCursorItemCallback handler) Deprecated.AGtk.SignalAction
which gets emitted when the user toggles whether the currently focused item is selected or not. The exact effect of this depend on the selection mode.Applications should not connect to it, but may emit it with g_signal_emit_by_name() if they need to control selection programmatically.
There is no default binding for this signal is Ctrl-Space.
- Parameters:
handler
- the signal handler- Returns:
- a signal handler ID to keep track of the signal connection
- See Also:
-
emitToggleCursorItem
public void emitToggleCursorItem()Deprecated.Emits the "toggle-cursor-item" signal. SeeonToggleCursorItem(org.gnome.gtk.IconView.ToggleCursorItemCallback)
. -
onUnselectAll
public SignalConnection<IconView.UnselectAllCallback> onUnselectAll(IconView.UnselectAllCallback handler) Deprecated.AGtk.SignalAction
which gets emitted when the user unselects all items.Applications should not connect to it, but may emit it with g_signal_emit_by_name() if they need to control selection programmatically.
The default binding for this signal is Ctrl-Shift-a.
- Parameters:
handler
- the signal handler- Returns:
- a signal handler ID to keep track of the signal connection
- See Also:
-
emitUnselectAll
public void emitUnselectAll()Deprecated.Emits the "unselect-all" signal. SeeonUnselectAll(org.gnome.gtk.IconView.UnselectAllCallback)
. -
builder
Deprecated.AIconView.Builder
object constructs aIconView
with the specified properties. Use the variousset...()
methods to set properties, and finish construction withIconView.Builder.build()
.
-
GridView
instead