Copyright | (c) 2018 Francisco Vallarino |
---|---|
License | BSD-3-Clause (see the LICENSE file) |
Maintainer | fjvallarino@gmail.com |
Stability | experimental |
Portability | non-portable |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Provides a clickable link that is opened by the host OS. Since it relies on the OS to open the content, it is possible to open URIs other than urls.
externalLink "Open Wikipedia" "https://en.wikipedia.org"
Synopsis
- data ExternalLinkCfg s e
- externalLink :: WidgetEvent e => Text -> Text -> WidgetNode s e
- externalLink_ :: WidgetEvent e => Text -> Text -> [ExternalLinkCfg s e] -> WidgetNode s e
Configuration
data ExternalLinkCfg s e Source #
Configuration options for externalLink:
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.resizeFactor
: flexibility to have more or less space assigned.resizeFactorW
: flexibility to have more or less horizontal space assigned.resizeFactorH
: flexibility to have more or less vertical space assigned.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.
Instances
Constructors
:: WidgetEvent e | |
=> Text | The caption. |
-> Text | The url. |
-> WidgetNode s e | The created external link. |
Creates an external link with the given caption and url.
:: WidgetEvent e | |
=> Text | The caption. |
-> Text | The url. |
-> [ExternalLinkCfg s e] | The config options. |
-> WidgetNode s e | The created external link. |
Creates an external link with the given caption and url. Accepts config.