gi-gtk-3.0.43: Gtk 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.TreeDragSource

Contents

- Exported types
- Methods
  - dragDataDelete
  - dragDataGet
  - rowDraggable

Description

No description available in the introspection data.

Synopsis

- newtype TreeDragSource = TreeDragSource (ManagedPtr TreeDragSource)
- class (ManagedPtrNewtype o, IsDescendantOf TreeDragSource o) => IsTreeDragSource o
- treeDragSourceDragDataDelete :: (HasCallStack, MonadIO m, IsTreeDragSource a) => a -> TreePath -> m Bool
- treeDragSourceDragDataGet :: (HasCallStack, MonadIO m, IsTreeDragSource a) => a -> TreePath -> SelectionData -> m Bool
- treeDragSourceRowDraggable :: (HasCallStack, MonadIO m, IsTreeDragSource a) => a -> TreePath -> m Bool

# Exported types

newtype TreeDragSource Source #

Memory-managed wrapper type.

Constructors

TreeDragSource (ManagedPtr TreeDragSource) |

#### Instances

Instances details

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

class (ManagedPtrNewtype o, IsDescendantOf TreeDragSource o) => IsTreeDragSource o Source #

Type class for types which implement `TreeDragSource`.

#### Instances

Instances details

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

# Methods

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

Expand

#### Methods

dragDataDelete, dragDataGet, rowDraggable.

#### Getters

None.

#### Setters

None.

## dragDataDelete

treeDragSourceDragDataDelete Source #

Arguments

:: (HasCallStack, MonadIO m, IsTreeDragSource a) |
=> a | `dragSource`: a `TreeDragSource`
-> TreePath | `path`: row that was being dragged
-> m Bool | Returns: `True` if the row was successfully deleted

Asks the `TreeDragSource` to delete the row at `path`, because it was moved somewhere else via drag-and-drop. Returns `False` if the deletion fails because `path` no longer exists, or for some model-specific reason. Should robustly handle a `path` no longer found in the model!

## dragDataGet

treeDragSourceDragDataGet Source #

Arguments

:: (HasCallStack, MonadIO m, IsTreeDragSource a) |
=> a | `dragSource`: a `TreeDragSource`
-> TreePath | `path`: row that was dragged
-> SelectionData | `selectionData`: a `SelectionData` to fill with data from the dragged row
-> m Bool | Returns: `True` if data of the required type was provided

Asks the `TreeDragSource` to fill in `selectionData` with a representation of the row at `path`. `selectionData`->target gives the required type of the data. Should robustly handle a `path` no longer found in the model!

## rowDraggable

treeDragSourceRowDraggable Source #

Arguments

:: (HasCallStack, MonadIO m, IsTreeDragSource a) |
=> a | `dragSource`: a `TreeDragSource`
-> TreePath | `path`: row on which user is initiating a drag
-> m Bool | Returns: `True` if the row can be dragged

Asks the `TreeDragSource` whether a particular row can be used as the source of a DND operation. If the source doesn’t implement this interface, the row is assumed draggable.