Gtk2HsContentsIndex
Graphics.UI.Gtk.Buttons.Button
Description
Synopsis
data Button
class BinClass o => ButtonClass o
castToButton :: GObjectClass obj => obj -> Button
buttonNew :: IO Button
buttonNewWithLabel :: String -> IO Button
buttonNewWithMnemonic :: String -> IO Button
buttonNewFromStock :: String -> IO Button
buttonPressed :: ButtonClass b => b -> IO ()
buttonReleased :: ButtonClass b => b -> IO ()
buttonClicked :: ButtonClass b => b -> IO ()
buttonEnter :: ButtonClass b => b -> IO ()
buttonLeave :: ButtonClass b => b -> IO ()
data ReliefStyle
= ReliefNormal
| ReliefHalf
| ReliefNone
buttonSetRelief :: ButtonClass b => b -> ReliefStyle -> IO ()
buttonGetRelief :: ButtonClass b => b -> IO ReliefStyle
buttonSetLabel :: ButtonClass b => b -> String -> IO ()
buttonGetLabel :: ButtonClass b => b -> IO String
buttonSetUseStock :: ButtonClass b => b -> Bool -> IO ()
buttonGetUseStock :: ButtonClass b => b -> IO Bool
buttonSetUseUnderline :: ButtonClass b => b -> Bool -> IO ()
buttonGetUseUnderline :: ButtonClass b => b -> IO Bool
buttonSetFocusOnClick :: ButtonClass b => b -> Bool -> IO ()
buttonGetFocusOnClick :: ButtonClass b => b -> IO Bool
buttonSetAlignment :: ButtonClass b => b -> (Float, Float) -> IO ()
buttonGetAlignment :: ButtonClass b => b -> IO (Float, Float)
onButtonActivate :: ButtonClass b => b -> IO () -> IO (ConnectId b)
afterButtonActivate :: ButtonClass b => b -> IO () -> IO (ConnectId b)
onClicked :: ButtonClass b => b -> IO () -> IO (ConnectId b)
afterClicked :: ButtonClass b => b -> IO () -> IO (ConnectId b)
onEnter :: ButtonClass b => b -> IO () -> IO (ConnectId b)
afterEnter :: ButtonClass b => b -> IO () -> IO (ConnectId b)
onLeave :: ButtonClass b => b -> IO () -> IO (ConnectId b)
afterLeave :: ButtonClass b => b -> IO () -> IO (ConnectId b)
onPressed :: ButtonClass b => b -> IO () -> IO (ConnectId b)
afterPressed :: ButtonClass b => b -> IO () -> IO (ConnectId b)
onReleased :: ButtonClass b => b -> IO () -> IO (ConnectId b)
afterReleased :: ButtonClass b => b -> IO () -> IO (ConnectId b)
Documentation
data Button
Instances
ButtonClass Button
BinClass Button
ContainerClass Button
WidgetClass Button
ObjectClass Button
GObjectClass Button
class BinClass o => ButtonClass o
Instances
ButtonClass Button
ButtonClass ToggleButton
ButtonClass CheckButton
ButtonClass RadioButton
ButtonClass OptionMenu
castToButton :: GObjectClass obj => obj -> Button
buttonNew :: IO Button
Create a new Button widget.
buttonNewWithLabel :: String -> IO Button
Create a button with a label in it.
buttonNewWithMnemonic :: String -> IO Button

Create a button with an accelerator key.

  • Like buttonNewWithLabel but turns every underscore in the label to a underlined character which then acts as a mnemonic (keyboard shortcut).
buttonNewFromStock :: String -> IO Button
Create a stock (predefined appearance) button.
buttonPressed :: ButtonClass b => b -> IO ()
Depress the button, i.e. emit the pressed signal.
buttonReleased :: ButtonClass b => b -> IO ()
Release the button, i.e. emit the released signal.
buttonClicked :: ButtonClass b => b -> IO ()

Emit the clicked signal on the button.

buttonEnter :: ButtonClass b => b -> IO ()
Emit the cursor enters signal to the button.
buttonLeave :: ButtonClass b => b -> IO ()
Emit the cursor leaves signal to the button.
data ReliefStyle
I don't have a clue.
Constructors
ReliefNormal
ReliefHalf
ReliefNone
Instances
Enum ReliefStyle
buttonSetRelief :: ButtonClass b => b -> ReliefStyle -> IO ()
Set the style of the button edges.
buttonGetRelief :: ButtonClass b => b -> IO ReliefStyle
Get the current relief style.
buttonSetLabel :: ButtonClass b => b -> String -> IO ()
Set the text of the button.
buttonGetLabel :: ButtonClass b => b -> IO String

Get the current text on the button.

  • The method returns the empty string in case the button does not have a label (e.g. it was created with buttonNew.
buttonSetUseStock :: ButtonClass b => b -> Bool -> IO ()

Set if the label is a stock identifier.

  • Setting this property to True will make the button lookup its label in the table of stock items. If there is a match, the button will use the stock item instead of the label. You need to set this flag before you change the label.
buttonGetUseStock :: ButtonClass b => b -> IO Bool
Get the current flag for stock lookups.
buttonSetUseUnderline :: ButtonClass b => b -> Bool -> IO ()

Set if the label has accelerators.

  • Setting this property will make the button join any underline character into the following letter and inserting this letter as a keyboard shortcut. You need to set this flag before you change the label.
buttonGetUseUnderline :: ButtonClass b => b -> IO Bool
Query if the underlines are mnemonics.
buttonSetFocusOnClick :: ButtonClass b => b -> Bool -> IO ()
Sets whether the button will grab focus when it is clicked with the mouse.
buttonGetFocusOnClick :: ButtonClass b => b -> IO Bool
Gets whether the button grabs focus when it is clicked with the mouse.
buttonSetAlignment :: ButtonClass b => b -> (Float, Float) -> IO ()
Sets the alignment of the child. This has no effect unless the child derives from Misc Aligment.
buttonGetAlignment :: ButtonClass b => b -> IO (Float, Float)
Gets the alignment of the child in the button.
onButtonActivate :: ButtonClass b => b -> IO () -> IO (ConnectId b)
The button has been depressed (but not necessarily released yet). See clicked signal.
afterButtonActivate :: ButtonClass b => b -> IO () -> IO (ConnectId b)
onClicked :: ButtonClass b => b -> IO () -> IO (ConnectId b)
The button was clicked. This is only emitted if the mouse cursor was over the button when it was released.
afterClicked :: ButtonClass b => b -> IO () -> IO (ConnectId b)
onEnter :: ButtonClass b => b -> IO () -> IO (ConnectId b)
The cursor enters the button box.
afterEnter :: ButtonClass b => b -> IO () -> IO (ConnectId b)
onLeave :: ButtonClass b => b -> IO () -> IO (ConnectId b)
The cursor leaves the button box.
afterLeave :: ButtonClass b => b -> IO () -> IO (ConnectId b)
onPressed :: ButtonClass b => b -> IO () -> IO (ConnectId b)
The button is pressed.
afterPressed :: ButtonClass b => b -> IO () -> IO (ConnectId b)
onReleased :: ButtonClass b => b -> IO () -> IO (ConnectId b)
The button is released.
afterReleased :: ButtonClass b => b -> IO () -> IO (ConnectId b)
Produced by Haddock version 0.6