Gtk2HsContentsIndex
Graphics.UI.Gtk.Display.Label
Description
A label is a piece of static text in a user interface.
Synopsis
data Label
class MiscClass o => LabelClass o
castToLabel :: GObjectClass obj => obj -> Label
labelNew :: Maybe String -> IO Label
labelNewWithMnemonic :: String -> IO Label
labelSetText :: LabelClass l => l -> String -> IO ()
labelSetLabel :: LabelClass l => l -> String -> IO ()
labelSetTextWithMnemonic :: LabelClass l => l -> String -> IO ()
labelSetMarkup :: LabelClass l => l -> Markup -> IO ()
labelSetMarkupWithMnemonic :: LabelClass l => l -> Markup -> IO ()
labelSetMnemonicWidget :: (LabelClass l, WidgetClass w) => l -> w -> IO ()
labelGetMnemonicWidget :: LabelClass l => l -> IO (Maybe Widget)
type KeyVal = CUInt
labelGetMnemonicKeyval :: LabelClass l => l -> IO KeyVal
labelSetUseMarkup :: LabelClass l => l -> Bool -> IO ()
labelGetUseMarkup :: LabelClass l => l -> IO Bool
labelSetUseUnderline :: LabelClass l => l -> Bool -> IO ()
labelGetUseUnderline :: LabelClass l => l -> IO Bool
labelGetText :: LabelClass l => l -> IO String
labelGetLabel :: LabelClass l => l -> IO String
labelSetPattern :: LabelClass l => l -> [Int] -> IO ()
data Justification
= JustifyLeft
| JustifyRight
| JustifyCenter
| JustifyFill
labelSetJustify :: LabelClass l => l -> Justification -> IO ()
labelGetJustify :: LabelClass l => l -> IO Justification
labelGetLayout :: LabelClass l => l -> IO PangoLayout
labelSetLineWrap :: LabelClass l => l -> Bool -> IO ()
labelGetLineWrap :: LabelClass l => l -> IO Bool
labelSetSelectable :: LabelClass l => l -> Bool -> IO ()
labelGetSelectable :: LabelClass l => l -> IO Bool
labelSelectRegion :: LabelClass l => l -> Int -> Int -> IO ()
labelGetSelectionBounds :: LabelClass l => l -> IO (Maybe (Int, Int))
labelGetLayoutOffsets :: LabelClass l => l -> IO (Int, Int)
Documentation
data Label
Instances
LabelClass Label
MiscClass Label
WidgetClass Label
ObjectClass Label
GObjectClass Label
class MiscClass o => LabelClass o
Instances
LabelClass Label
LabelClass AccelLabel
LabelClass TipsQuery
castToLabel :: GObjectClass obj => obj -> Label
labelNew :: Maybe String -> IO Label
Create a new label widget.
labelNewWithMnemonic :: String -> IO Label

Create a new label widget with accelerator key.

  • Each underscore in str is converted into an underlined character in the label. Entering this character will activate the label widget or any other widget set with labelSetMnemonicWidget.
labelSetText :: LabelClass l => l -> String -> IO ()
Set the text the label widget shows.
labelSetLabel :: LabelClass l => l -> String -> IO ()
The label is interpreted as including embedded underlines and/or Pango markup depending on the markup and underline properties.
labelSetTextWithMnemonic :: LabelClass l => l -> String -> IO ()
Set the label to a markup string and interpret keyboard accelerators.
labelSetMarkup :: LabelClass l => l -> Markup -> IO ()
Set the label to a markup string.
labelSetMarkupWithMnemonic :: LabelClass l => l -> Markup -> IO ()
Set the label to a markup string and interpret keyboard accelerators.
labelSetMnemonicWidget :: (LabelClass l, WidgetClass w) => l -> w -> IO ()
Set an explicit widget for which to emit the "mnemonic_activate" signal if an underlined character is pressed.
labelGetMnemonicWidget :: LabelClass l => l -> IO (Maybe Widget)
Retrieves the target of the mnemonic (keyboard shortcut) of this label, or Nothing if none has been set and the default algorithm will be used.
type KeyVal = CUInt
KeyVal is a synonym for a hot key number.
labelGetMnemonicKeyval :: LabelClass l => l -> IO KeyVal
Get the keyval for the underlined character in the label.
labelSetUseMarkup :: LabelClass l => l -> Bool -> IO ()
Sets whether the text of the label contains markup in Pango's text markup language.
labelGetUseMarkup :: LabelClass l => l -> IO Bool
Returns whether the label's text is interpreted as marked up with the Pango text markup language.
labelSetUseUnderline :: LabelClass l => l -> Bool -> IO ()
If True, an underline in the text indicates the next character should be used for the mnemonic accelerator key.
labelGetUseUnderline :: LabelClass l => l -> IO Bool
Returns whether an embedded underline in the label indicates a mnemonic.
labelGetText :: LabelClass l => l -> IO String
Get the text stored in the label. This does not include any embedded underlines indicating mnemonics or Pango markup.
labelGetLabel :: LabelClass l => l -> IO String
Get the text from a label widget including any embedded underlines indicating mnemonics and Pango markup.
labelSetPattern :: LabelClass l => l -> [Int] -> IO ()
Underline parts of the text, odd indices of the list represent underlined parts.
data Justification
Justification for label and maybe other widgets (text?)
Constructors
JustifyLeft
JustifyRight
JustifyCenter
JustifyFill
Instances
Enum Justification
labelSetJustify :: LabelClass l => l -> Justification -> IO ()
Set the justification of the label.
labelGetJustify :: LabelClass l => l -> IO Justification
Get the justification of the label.
labelGetLayout :: LabelClass l => l -> IO PangoLayout
Gets the PangoLayout used to display the label.
labelSetLineWrap :: LabelClass l => l -> Bool -> IO ()
Set wether lines should be wrapped (True) or truncated (False).
labelGetLineWrap :: LabelClass l => l -> IO Bool
Returns whether lines in the label are automatically wrapped.
labelSetSelectable :: LabelClass l => l -> Bool -> IO ()
Make a label text selectable.
labelGetSelectable :: LabelClass l => l -> IO Bool
Get whether the text selectable.
labelSelectRegion :: LabelClass l => l -> Int -> Int -> IO ()
Select a region in the label.
labelGetSelectionBounds :: LabelClass l => l -> IO (Maybe (Int, Int))
Gets the selected range of characters in the label, if any. If there is a range selected the result is the start and end of the selection as character offsets.
labelGetLayoutOffsets :: LabelClass l => l -> IO (Int, Int)
Get starting cooridinates of text rendering.
Produced by Haddock version 0.6