monomer-1.0.0.0: 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.Singles.Button

Description

Button widget, with support for multiline text. At the most basic level, a button consists of a caption and an event to raised when clicked.

Configs:

  • 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.
Synopsis

Documentation

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.