gi-gtk4-4.0.12: Gtk 4.x bindings

Copyright | Will Thompson and Iñaki García Etxebarria
License | LGPL-2.1
Maintainer | Iñaki García Etxebarria
Safe Haskell | None
Language | Haskell2010

GI.Gtk.Interfaces.TreeDragDest

Contents

- Exported types
- Methods
  - dragDataReceived
  - rowDropPossible

Description

Interface for Drag-and-Drop destinations in `GtkTreeView`.

Synopsis

- newtype TreeDragDest = TreeDragDest (ManagedPtr TreeDragDest)
- class (ManagedPtrNewtype o, IsDescendantOf TreeDragDest o) => IsTreeDragDest o
- treeDragDestDragDataReceived :: (HasCallStack, MonadIO m, IsTreeDragDest a) => a -> TreePath -> GValue -> m Bool
- treeDragDestRowDropPossible :: (HasCallStack, MonadIO m, IsTreeDragDest a) => a -> TreePath -> GValue -> m Bool

# Exported types

newtype TreeDragDest Source #

Deprecated: (Since version 4.10)List views use widgets to display their contents.You can use `DropTarget` to implement a drop destination

Memory-managed wrapper type.

Constructors

TreeDragDest (ManagedPtr TreeDragDest) | Deprecated: (Since version 4.10)List views use widgets to display their contents.You can use `DropTarget` to implement a drop destination

#### Instances

Instances details

Eq TreeDragDest Source # |
Instance details Defined in GI.Gtk.Interfaces.TreeDragDest Methods (==) :: TreeDragDest -> TreeDragDest -> Bool Source # (/=) :: TreeDragDest -> TreeDragDest -> Bool Source #
BoxedPtr TreeDragDest Source # |
Instance details Defined in GI.Gtk.Interfaces.TreeDragDest Methods boxedPtrCopy :: TreeDragDest -> IO TreeDragDest Source # boxedPtrFree :: TreeDragDest -> IO () Source #
ManagedPtrNewtype TreeDragDest Source # |
Instance details Defined in GI.Gtk.Interfaces.TreeDragDest Methods toManagedPtr :: TreeDragDest -> ManagedPtr TreeDragDest Source #

class (ManagedPtrNewtype o, IsDescendantOf TreeDragDest o) => IsTreeDragDest o Source #

Type class for types which implement `TreeDragDest`.

#### Instances

Instances details

(ManagedPtrNewtype o, IsDescendantOf TreeDragDest o) => IsTreeDragDest o Source # |
Instance details Defined in GI.Gtk.Interfaces.TreeDragDest

# Methods

### Click to display all available methods, including inherited ones

Expand

#### Methods

dragDataReceived, rowDropPossible.

#### Getters

None.

#### Setters

None.

## dragDataReceived

treeDragDestDragDataReceived Source #

Arguments

:: (HasCallStack, MonadIO m, IsTreeDragDest a) |
=> a | `dragDest`: a `GtkTreeDragDest`
-> TreePath | `dest`: row to drop in front of
-> GValue | `value`: data to drop
-> m Bool | Returns: whether a new row was created before position `dest`

Deprecated: (Since version 4.10)Use list models instead

Asks the `GtkTreeDragDest` to insert a row before the path `dest`, deriving the contents of the row from `value`. If `dest` is outside the tree so that inserting before it is impossible, `False` will be returned. Also, `False` may be returned if the new row is not created for some model-specific reason. Should robustly handle a `dest` no longer found in the model!

## rowDropPossible

treeDragDestRowDropPossible Source #

Arguments

:: (HasCallStack, MonadIO m, IsTreeDragDest a) |
=> a | `dragDest`: a `GtkTreeDragDest`
-> TreePath | `destPath`: destination row
-> GValue | `value`: the data being dropped
-> m Bool | Returns: `True` if a drop is possible before `destPath`

Deprecated: (Since version 4.10)Use list models instead

Determines whether a drop is possible before the given `destPath`, at the same depth as `destPath`. i.e., can we drop the data in `value` at that location. `destPath` does not have to exist; the return value will almost certainly be `False` if the parent of `destPath` doesn’t exist, though.