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 |
Dropdown widget, allowing selection of a single item from a collapsable list.
Both header and list content is text based. In case a customizable version is
is needed, Dropdown
can be used.
Synopsis
- type TextDropdownItem a = DropdownItem a
- textDropdown :: (WidgetModel s, WidgetEvent e, Traversable t, TextDropdownItem a, TextShow a) => ALens' s a -> t a -> WidgetNode s e
- textDropdown_ :: (WidgetModel s, WidgetEvent e, Traversable t, TextDropdownItem a) => ALens' s a -> t a -> (a -> Text) -> [DropdownCfg s e a] -> WidgetNode s e
- textDropdownV :: (WidgetModel s, WidgetEvent e, Traversable t, TextDropdownItem a, TextShow a) => a -> (a -> e) -> t a -> WidgetNode s e
- textDropdownV_ :: (WidgetModel s, WidgetEvent e, Traversable t, TextDropdownItem a) => a -> (a -> e) -> t a -> (a -> Text) -> [DropdownCfg s e a] -> WidgetNode s e
- textDropdownS :: (WidgetModel s, WidgetEvent e, Traversable t, TextDropdownItem a, Show a) => ALens' s a -> t a -> WidgetNode s e
- textDropdownS_ :: (WidgetModel s, WidgetEvent e, Traversable t, TextDropdownItem a, Show a) => ALens' s a -> t a -> [DropdownCfg s e a] -> WidgetNode s e
- textDropdownSV :: (WidgetModel s, WidgetEvent e, Traversable t, TextDropdownItem a, Show a) => a -> (a -> e) -> t a -> WidgetNode s e
- textDropdownSV_ :: (WidgetModel s, WidgetEvent e, Traversable t, TextDropdownItem a, Show a) => a -> (a -> e) -> t a -> [DropdownCfg s e a] -> WidgetNode s e
Configuratiom
type TextDropdownItem a = DropdownItem a Source #
Constraints for an item handled by textDropdown.
Constructors
textDropdown :: (WidgetModel s, WidgetEvent e, Traversable t, TextDropdownItem a, TextShow a) => ALens' s a -> t a -> WidgetNode s e Source #
Creates a text dropdown using the given lens. The type must be have a TextShow
instance.
textDropdown_ :: (WidgetModel s, WidgetEvent e, Traversable t, TextDropdownItem a) => ALens' s a -> t a -> (a -> Text) -> [DropdownCfg s e a] -> WidgetNode s e Source #
Creates a text dropdown using the given lens. Takes a function for converting the type to Text. Accepts config.
textDropdownV :: (WidgetModel s, WidgetEvent e, Traversable t, TextDropdownItem a, TextShow a) => a -> (a -> e) -> t a -> WidgetNode s e Source #
Creates a text dropdown using the given value and onChange
event handler.
Takes a function for converting the type to Text.
textDropdownV_ :: (WidgetModel s, WidgetEvent e, Traversable t, TextDropdownItem a) => a -> (a -> e) -> t a -> (a -> Text) -> [DropdownCfg s e a] -> WidgetNode s e Source #
Creates a text dropdown using the given value and onChange
event handler.
Takes a function for converting the type to Text. Accepts config.
textDropdownS :: (WidgetModel s, WidgetEvent e, Traversable t, TextDropdownItem a, Show a) => ALens' s a -> t a -> WidgetNode s e Source #
Creates a text dropdown using the given lens. The type must be have a Show
instance.
textDropdownS_ :: (WidgetModel s, WidgetEvent e, Traversable t, TextDropdownItem a, Show a) => ALens' s a -> t a -> [DropdownCfg s e a] -> WidgetNode s e Source #
Creates a text dropdown using the given lens. The type must be have a Show
instance. Accepts config.
textDropdownSV :: (WidgetModel s, WidgetEvent e, Traversable t, TextDropdownItem a, Show a) => a -> (a -> e) -> t a -> WidgetNode s e Source #
textDropdownSV_ :: (WidgetModel s, WidgetEvent e, Traversable t, TextDropdownItem a, Show a) => a -> (a -> e) -> t a -> [DropdownCfg s e a] -> WidgetNode s e Source #