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 |
Common types for widget related functions.
Synopsis
- type IsHovered s e = WidgetEnv s e -> WidgetNode s e -> Bool
- type IsFocused s e = WidgetEnv s e -> WidgetNode s e -> Bool
- type IsActive s e = WidgetEnv s e -> WidgetNode s e -> Bool
- type GetBaseStyle s e = WidgetEnv s e -> WidgetNode s e -> Maybe Style
- data CurrentStyleCfg s e = CurrentStyleCfg {
- _ascIsHovered :: IsHovered s e
- _ascIsFocused :: IsFocused s e
- _ascIsActive :: IsActive s e
Documentation
type IsHovered s e = WidgetEnv s e -> WidgetNode s e -> Bool Source #
Indicates whether the mouse pointer is over a valid region the given node.
type IsFocused s e = WidgetEnv s e -> WidgetNode s e -> Bool Source #
Indicates whether the given node has keyboard focus.
type IsActive s e = WidgetEnv s e -> WidgetNode s e -> Bool Source #
Indicates whether the given node is clicked on a valid region.
type GetBaseStyle s e = WidgetEnv s e -> WidgetNode s e -> Maybe Style Source #
Returns the base style for a given node, if any. This is widget dependent.
Usually this style comes from the active theme.
data CurrentStyleCfg s e Source #
Configuration for style related functions. It allows to override how each of the states (hovered, focused and active) is defined for a given widget type.
A usage example can be found in Monomer.Widgets.Radio.
CurrentStyleCfg | |
|
Instances
Default (CurrentStyleCfg s e) Source # | |
Defined in Monomer.Widgets.Util.Style def :: CurrentStyleCfg s e # | |
HasIsHovered (CurrentStyleCfg s e) (IsHovered s e) Source # | |
Defined in Monomer.Widgets.Util.Lens | |
HasIsFocused (CurrentStyleCfg s e) (IsFocused s e) Source # | |
Defined in Monomer.Widgets.Util.Lens | |
HasIsActive (CurrentStyleCfg s e) (IsActive s e) Source # | |
Defined in Monomer.Widgets.Util.Lens |