monomer-1.0.0.0: A GUI library for writing native Haskell applications.
Copyright(c) 2018 Francisco Vallarino
LicenseBSD-3-Clause (see the LICENSE file)
Maintainerfjvallarino@gmail.com
Stabilityexperimental
Portabilitynon-portable
Safe HaskellNone
LanguageHaskell2010

Monomer.Widgets.Containers.DropTarget

Description

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

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.