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 |
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 spaced assigned.resizeFactorW
: flexibility to have more or less horizontal spaced assigned.resizeFactorH
: flexibility to have more or less vertical spaced 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
externalLink :: WidgetEvent e => Text -> Text -> WidgetNode s e Source #
Creates an external link with the given caption and url.
externalLink_ :: WidgetEvent e => Text -> Text -> [ExternalLinkCfg s e] -> WidgetNode s e Source #
Creates an external link with the given caption and url. Accepts config.