Copyright | (c) 2018 Francisco Vallarino |
---|---|
License | BSD-3-Clause (see the LICENSE file) |
Maintainer | fjvallarino@gmail.com |
Stability | experimental |
Portability | non-portable |
Safe Haskell | None |
Language | Haskell2010 |
Drop target container for a single element. Useful for adding drag support
without having to implement a custom widget. Usually works in tandem with
Draggable
.
Raises a user provided event when an item is dropped. The type must match with the dragged message, otherwise it will not be raised.
Configs:
- dropTargetStyle: The style to apply to the container when a dragged item is on top.
Synopsis
- dropTarget :: (DragMsg a, WidgetEvent e) => (a -> e) -> WidgetNode s e -> WidgetNode s e
- dropTarget_ :: (DragMsg a, WidgetEvent e) => (a -> e) -> [DropTargetCfg] -> WidgetNode s e -> WidgetNode s e
- dropTargetStyle :: [StyleState] -> DropTargetCfg
Documentation
dropTarget :: (DragMsg a, WidgetEvent e) => (a -> e) -> WidgetNode s e -> WidgetNode s e Source #
Creates a drop target container with a single node as child.
dropTarget_ :: (DragMsg a, WidgetEvent e) => (a -> e) -> [DropTargetCfg] -> WidgetNode s e -> WidgetNode s e Source #
Creates a drop target container with a single node as child. Accepts config.
dropTargetStyle :: [StyleState] -> DropTargetCfg Source #
The style to apply to the container when a dragged item is on top.