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 |
Button widget, with support for multiline text. At the most basic level, a button consists of a caption and an event to raise when clicked.
Synopsis
- data ButtonCfg s e
- button :: WidgetEvent e => Text -> e -> WidgetNode s e
- button_ :: WidgetEvent e => Text -> e -> [ButtonCfg s e] -> WidgetNode s e
- mainButton :: WidgetEvent e => Text -> e -> WidgetNode s e
- mainButton_ :: WidgetEvent e => Text -> e -> [ButtonCfg s e] -> WidgetNode s e
Configuration
Configuration options for button:
trimSpaces
: whether to remove leading/trailing spaces in the caption.ellipsis
: if ellipsis should be used for overflown text.multiline
: if text may be split in multiple lines.maxLines
: maximum number of text lines to show.onFocus
: event to raise when focus is received.onFocusReq
:WidgetRequest
to generate when focus is received.onBlur
: event to raise when focus is lost.onBlurReq
:WidgetRequest
to generate when focus is lost.onClick
: event to raise when button is clicked.onClickReq
:WidgetRequest
to generate when button is clicked.resizeFactor
: flexibility to have more or less spaced assigned.resizeFactorW
: flexibility to have more or less horizontal spaced assigned.resizeFactorH
: flexibility to have more or less vertical spaced assigned.
Instances
Constructors
button :: WidgetEvent e => Text -> e -> WidgetNode s e Source #
Creates a button with normal styling.
button_ :: WidgetEvent e => Text -> e -> [ButtonCfg s e] -> WidgetNode s e Source #
Creates a button with normal styling. Accepts config.
mainButton :: WidgetEvent e => Text -> e -> WidgetNode s e Source #
Creates a button with main styling. Useful for dialogs.
mainButton_ :: WidgetEvent e => Text -> e -> [ButtonCfg s e] -> WidgetNode s e Source #
Creates a button with main styling. Useful for dialogs. Accepts config.