Dialog —
A dialog is a smaller window that is used to ask the user for input.
type
IconSize |
data
ResponseId |
type
XID |
dialogNew:: IO Dialog |
dialogAddActionWidget:: (DialogClass dc, WidgetClass w) => dc -> w -> ResponseId -> IO () |
dialogAddButton:: DialogClass dc => dc -> String -> ResponseId -> IO Button |
dialogGetActionArea:: DialogClass dc => dc -> IO HBox |
dialogGetHasSeparator:: DialogClass dc => dc -> IO Bool |
dialogGetUpper:: DialogClass dc => dc -> IO VBox |
dialogResponse:: DialogClass dc => dc -> ResponseId -> IO () |
dialogRun:: DialogClass dc => dc -> IO ResponseId |
dialogSetDefaultResponse:: DialogClass dc => dc -> ResponseId -> IO () |
dialogSetHasSeparator:: DialogClass dc => dc -> Bool -> IO () |
dialogSetResponseSensitive:: DialogClass dc => dc -> ResponseId -> Bool -> IO () |
onResponse:: DialogClass dc => dc -> (ResponseId -> IO ()) -> IO (ConnectId dc) |
Add a widget to the action area. If the widget is put into the activated state resId will be transmitted by the response signal.
| dialogAddActionWidget | :: dc | :: w | :: ResponseId | :: IO () |
| dc | child | resId |
A widget that cannot be activated and therefore has to emit the response signal manually must be added by packing it into the action area.
Add a button with a label to the action area.
| dialogAddButton | :: dc | :: String | :: ResponseId | :: IO Button |
| dc | button | resId |
The text may as well refer to a stock object. If such an object exists it is taken as widget.
The function returns the Button that resulted from the call.
Extract the action area of a dialog box.
| dialogGetActionArea | :: dc | :: IO HBox |
| dc |
This is useful to add some special widgets that cannot be added with dialogAddActionWidget.
Query if the dialog has a visible horizontal separator.
| dialogGetHasSeparator | :: dc | :: IO Bool |
| dc |
Get the upper part of a dialog.
| dialogGetUpper | :: dc | :: IO VBox |
| dc |
The upper part of a dialog window consists of a VBox. Add the required widgets into this box.
Emit the response signal on the dialog.
| dialogResponse | :: dc | :: ResponseId | :: IO () |
| dc | resId |
This function can be used to add a custom widget to the action area that should close the dialog when activated or to close the dialog otherwise.
Run the dialog by entering a new main loop.
| dialogRun | :: dc | :: IO ResponseId |
| dc |
The dialog is run until it is either forced to quit (-1 will be returned) or until the user clicks a button (or other widget) in the action area that makes the dialog emit the response signal (the response id of the pressed button will be returned).
To force a dialog to quit, call dialogResponse on it.
If this function returns the dialog still needs to be destroyed.
Set the default widget that is to be activated if the user pressed enter. The object is specified by the ResponseId.
| dialogSetDefaultResponse | :: dc | :: ResponseId | :: IO () |
| dc | resId |