gtk3-0.15.10: Binding to the Gtk+ 3 graphical user interface library

Maintainer | gtk2hs-users@lists.sourceforge.net
Stability | provisional
Portability | portable (depends on GHC)
Safe Haskell | None
Language | Haskell98

Graphics.UI.Gtk.Buttons.LinkButton

Contents

- Detail
- Class Hierarchy
- Types
- Constructors
- Methods
- Attributes

Description

Create buttons bound to a URL

- Module available since Gtk+ version 2.10

Synopsis

- data LinkButton
- class ButtonClass o => LinkButtonClass o
- castToLinkButton :: GObjectClass obj => obj -> LinkButton
- toLinkButton :: LinkButtonClass o => o -> LinkButton
- linkButtonNew :: GlibString string => string -> IO LinkButton
- linkButtonNewWithLabel :: GlibString string => string -> string -> IO LinkButton
- linkButtonURI :: (LinkButtonClass self, GlibString string) => Attr self string
- linkButtonVisited :: LinkButtonClass self => Attr self Bool

# Detail

A `LinkButton` is a `Button` with a hyperlink, similar to the one used by web browsers, which triggers an action when clicked. It is useful to show quick links to resources.

A link button is created by calling either `linkButtonNew` or `linkButtonNewWithLabel`. If using the former, the URI you pass to the constructor is used as a label for the widget.

The URI bound to a `LinkButton` can be set specifically using "set linkButton [linkButtonURI := uri]", and retrieved using "uri <- get linkButton linkButtonURI".

`LinkButton` offers a global hook, which is called when the used clicks on it: see `linkButtonSetURIHook`.

`LinkButton` was added in Gtk+ 2.10.

# Class Hierarchy

    | GObject
    | +----Object
    | +----Widget
    | +----Container
    | +----Bin
    | +----Button
    | +----LinkButton

# Types

data LinkButton Source #

#### Instances

Instances details

Eq LinkButton Source # |
Instance details Defined in Graphics.UI.Gtk.Types Methods (==) :: LinkButton -> LinkButton -> Bool Source # (/=) :: LinkButton -> LinkButton -> Bool Source #
Ord LinkButton Source # |

Instance details

Defined in Graphics.UI.Gtk.Types

Methods

compare :: LinkButton -> LinkButton -> Ordering Source #

(<) :: LinkButton -> LinkButton -> Bool Source #

(<=) :: LinkButton -> LinkButton -> Bool Source #

(>) :: LinkButton -> LinkButton -> Bool Source #

(>=) :: LinkButton -> LinkButton -> Bool Source #

max :: LinkButton -> LinkButton -> LinkButton Source #

min :: LinkButton -> LinkButton -> LinkButton Source #

GObjectClass LinkButton Source # |
Instance details Defined in Graphics.UI.Gtk.Types Methods toGObject :: LinkButton -> GObject Source # unsafeCastGObject :: GObject -> LinkButton Source #
BinClass LinkButton Source # |
Instance details Defined in Graphics.UI.Gtk.Types
ButtonClass LinkButton Source # |
Instance details Defined in Graphics.UI.Gtk.Types
ContainerClass LinkButton Source # |
Instance details Defined in Graphics.UI.Gtk.Types
LinkButtonClass LinkButton Source # |
Instance details Defined in Graphics.UI.Gtk.Types
WidgetClass LinkButton Source # |
Instance details Defined in Graphics.UI.Gtk.Types

class ButtonClass o => LinkButtonClass o Source #

#### Instances

Instances details

LinkButtonClass LinkButton Source # |
Instance details Defined in Graphics.UI.Gtk.Types

castToLinkButton :: GObjectClass obj => obj -> LinkButton Source #

toLinkButton :: LinkButtonClass o => o -> LinkButton Source #

# Constructors

linkButtonNew Source #

Arguments

:: GlibString string |
=> string | `uri` - a valid URI
-> IO LinkButton |

Creates a new `LinkButton` with the URI as its text.

linkButtonNewWithLabel Source #

Arguments

:: GlibString string |
=> string | `uri` - a valid URI
-> string | `label` - the text of the button
-> IO LinkButton |

Creates a new `LinkButton` containing a label.

# Methods

# Attributes

linkButtonURI :: (LinkButtonClass self, GlibString string) => Attr self string Source #

The URI bound to this button.

Default value: ""

- Available since Gtk+ version 2.10

linkButtonVisited :: LinkButtonClass self => Attr self Bool Source #

The `visited` state of this button. A visited link is drawn in a different color.

Default value: `False`

- Available since Gtk+ version 2.14