Safe Haskell | None |
---|
This module provides a simple ''dialog'' interface with an ''OK'' button and a ''Cancel'' button. The dialog itself is capable of embedding an arbitrary interface and it exposes ''accept'' and ''cancel'' events which are triggered by the dialog's buttons.
- data Dialog
- newDialog :: Show a => Widget a -> Text -> IO (Dialog, Widget FocusGroup)
- onDialogAccept :: Dialog -> (Dialog -> IO ()) -> IO ()
- onDialogCancel :: Dialog -> (Dialog -> IO ()) -> IO ()
- acceptDialog :: Dialog -> IO ()
- cancelDialog :: Dialog -> IO ()
Documentation
newDialog :: Show a => Widget a -> Text -> IO (Dialog, Widget FocusGroup)Source
Create a new dialog with the specified embedded interface and
title. Returns the dialog itself and the FocusGroup
to which its
buttons were added, for use in your application.
onDialogAccept :: Dialog -> (Dialog -> IO ()) -> IO ()Source
Register an event handler for the dialog's acceptance event.
onDialogCancel :: Dialog -> (Dialog -> IO ()) -> IO ()Source
Register an event handler for the dialog's cancellation event.
acceptDialog :: Dialog -> IO ()Source
Programmatically accept the dialog.
cancelDialog :: Dialog -> IO ()Source
Programmatically cancel the dialog.