monomer-1.0.0.1: 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.Util.Types

Description

Common types for widget related functions.

Synopsis

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.

Instances

Instances details
Default (CurrentStyleCfg s e) Source # 
Instance details

Defined in Monomer.Widgets.Util.Style

Methods

def :: CurrentStyleCfg s e #

HasIsHovered (CurrentStyleCfg s e) (IsHovered s e) Source # 
Instance details

Defined in Monomer.Widgets.Util.Lens

HasIsFocused (CurrentStyleCfg s e) (IsFocused s e) Source # 
Instance details

Defined in Monomer.Widgets.Util.Lens

HasIsActive (CurrentStyleCfg s e) (IsActive s e) Source # 
Instance details

Defined in Monomer.Widgets.Util.Lens