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 |
Displays a text message above its child node when the pointer is on top and the delay, if any, has ellapsed.
Tooltip styling is a bit unusual, since it only applies to the overlaid element. This means, padding will not be shown for the contained child element, but only on the message when the tooltip is active. If you need padding around the child element, you may want to use a box.
Synopsis
- data TooltipCfg
- tooltipDelay :: Int -> TooltipCfg
- tooltipFollow :: TooltipCfg
- tooltip :: Text -> WidgetNode s e -> WidgetNode s e
- tooltip_ :: Text -> [TooltipCfg] -> WidgetNode s e -> WidgetNode s e
Configuration
data TooltipCfg Source #
Configuration options for tooltip:
width
: the maximum width of the tooltip. Used for multiline.height
: the maximum height of the tooltip. Used for multiline.tooltipDelay
: the delay in ms before the tooltip is displayed.tooltipFollow
: if, after tooltip is displayed, it should follow the mouse.
Instances
Semigroup TooltipCfg Source # | |
Defined in Monomer.Widgets.Containers.Tooltip (<>) :: TooltipCfg -> TooltipCfg -> TooltipCfg # sconcat :: NonEmpty TooltipCfg -> TooltipCfg # stimes :: Integral b => b -> TooltipCfg -> TooltipCfg # | |
Monoid TooltipCfg Source # | |
Defined in Monomer.Widgets.Containers.Tooltip mempty :: TooltipCfg # mappend :: TooltipCfg -> TooltipCfg -> TooltipCfg # mconcat :: [TooltipCfg] -> TooltipCfg # | |
Default TooltipCfg Source # | |
Defined in Monomer.Widgets.Containers.Tooltip def :: TooltipCfg # | |
CmbMaxHeight TooltipCfg Source # | |
Defined in Monomer.Widgets.Containers.Tooltip maxHeight :: Double -> TooltipCfg Source # | |
CmbMaxWidth TooltipCfg Source # | |
Defined in Monomer.Widgets.Containers.Tooltip maxWidth :: Double -> TooltipCfg Source # |
tooltipDelay :: Int -> TooltipCfg Source #
Delay before the tooltip is displayed when child widget is hovered.
tooltipFollow :: TooltipCfg Source #
Whether the tooltip should move with the mouse after being displayed.
Constructors
tooltip :: Text -> WidgetNode s e -> WidgetNode s e Source #
Creates a tooltip for the child widget.
tooltip_ :: Text -> [TooltipCfg] -> WidgetNode s e -> WidgetNode s e Source #
Creates a tooltip for the child widget. Accepts config.