Copyright | (c) Thiemo Wiedemeyer Uni Bremen 2008 |
---|---|
License | GPLv2 or higher, see LICENSE.txt |
Maintainer | raider@informatik.uni-bremen.de |
Stability | provisional |
Portability | non-portable |
Safe Haskell | None |
This module provides the ability to store xml stings in a temporary file to load it with gtk2hs. This is needed, because gtk2hs needs glade files for input, but we want to distribute them within the binary.
Synopsis
- getGTKBuilder :: (String, String) -> IO Builder
- startMainLoop :: IO ()
- stopMainLoop :: IO ()
- forkIO_ :: IO () -> IO ()
- forkIOWithPostProcessing :: IO a -> (a -> IO ()) -> IO ()
- infoDialog :: String -> String -> IO ()
- errorDialog :: String -> String -> IO ()
- warningDialog :: String -> String -> IO Bool
- questionDialog :: String -> String -> IO Bool
- fileOpenDialog :: FilePath -> [(String, [String])] -> Maybe (FilePath -> IO ()) -> IO (Maybe FilePath)
- fileSaveDialog :: FilePath -> [(String, [String])] -> Maybe (FilePath -> IO ()) -> IO (Maybe FilePath)
- listChoiceAux :: String -> (a -> String) -> [a] -> IO (Maybe (Int, a))
- listChoice :: String -> [String] -> IO (Maybe Int)
- progressBar :: String -> String -> IO (Double -> String -> IO (), IO ())
- pulseBar :: String -> String -> IO (String -> IO (), IO ())
- textView :: String -> String -> Maybe FilePath -> IO ()
- displayTheoryWithWarning :: String -> String -> String -> G_theory -> IO ()
- infoDialogExt :: String -> String -> IO ()
- errorDialogExt :: String -> String -> IO ()
- warningDialogExt :: String -> String -> IO Bool
- questionDialogExt :: String -> String -> IO Bool
- fileOpenDialogExt :: FilePath -> [(String, [String])] -> Maybe (FilePath -> IO ()) -> IO (Maybe FilePath)
- fileSaveDialogExt :: FilePath -> [(String, [String])] -> Maybe (FilePath -> IO ()) -> IO (Maybe FilePath)
- listChoiceExt :: String -> [String] -> IO (Maybe Int)
- progressBarExt :: String -> String -> IO (Double -> String -> IO (), IO ())
- pulseBarExt :: String -> String -> IO (String -> IO (), IO ())
- textViewExt :: String -> String -> Maybe FilePath -> IO ()
- displayTheoryWithWarningExt :: String -> String -> String -> G_theory -> IO ()
- setListData :: TreeView -> (a -> String) -> [a] -> IO (ListStore a)
- updateListData :: ListStore a -> [a] -> IO ()
- setListSelectorSingle :: TreeView -> IO () -> IO (ConnectId TreeSelection)
- setListSelectorMultiple :: TreeView -> Button -> Button -> Button -> IO () -> IO (ConnectId TreeSelection)
- selectFirst :: TreeView -> IO ()
- getSelectedSingle :: TreeView -> ListStore a -> IO (Maybe (Int, a))
- getSelectedMultiple :: TreeView -> ListStore a -> IO [(Int, a)]
- selectAllRows :: TreeView -> IO ()
- activate :: [Widget] -> Bool -> IO ()
- escapeGtkMarkup :: String -> String
- type ComboBoxText = Text
- toComboBoxText :: Show a => [a] -> [ComboBoxText]
Documentation
getGTKBuilder :: (String, String) -> IO Builder Source #
Returns a GladeXML Object of a xmlstring.
startMainLoop :: IO () Source #
Starts the gtk main event loop in a thread
stopMainLoop :: IO () Source #
forkIOWithPostProcessing :: IO a -> (a -> IO ()) -> IO () Source #
Windows for use inside Gtk thread
:: String | Title |
-> String | Message |
-> IO () |
create a window which displays a given text
:: String | Title |
-> String | Message |
-> IO () |
create a window which displays a given error
:: String | Title |
-> String | Message |
-> IO Bool |
create a window which displays a given warning and ask for continue
:: String | Title |
-> String | Message |
-> IO Bool |
create a window which displays a given question
:: FilePath | Defaultname for file |
-> [(String, [String])] | Filter (name, pattern list) |
-> Maybe (FilePath -> IO ()) | Action on open |
-> IO (Maybe FilePath) |
:: FilePath | Defaultname for file |
-> [(String, [String])] | Filter (name, pattern list) |
-> Maybe (FilePath -> IO ()) | Action on save |
-> IO (Maybe FilePath) |
:: String | Title |
-> (a -> String) | Name of element |
-> [a] | Rows to display |
-> IO (Maybe (Int, a)) | Selected row |
create a window with title and list of options, return selected option
:: String | Title |
-> [String] | Rows to display |
-> IO (Maybe Int) | Selected row |
create a window with title and list of options, return selected option
:: String | Title |
-> String | Description |
-> IO (Double -> String -> IO (), IO ()) |
:: String | Title |
-> String | Message |
-> Maybe FilePath | Filename |
-> IO () |
Display text in an uneditable, scrollable editor. Not blocking!
displayTheoryWithWarning Source #
:: String | Kind of theory |
-> String | Name of theory |
-> String | Warning |
-> G_theory | Theory |
-> IO () |
displays a theory with warning in a window
Windows for use in Gtk windows
:: String | Title |
-> String | Message |
-> IO () |
create a window which displays a given text
:: String | Title |
-> String | Message |
-> IO () |
create a window which displays a given error
:: String | Title |
-> String | Message |
-> IO Bool |
create a window which displays a given warning and ask for continue
:: String | Title |
-> String | Message |
-> IO Bool |
create a window which displays a given question
:: FilePath | Defaultname for file |
-> [(String, [String])] | Filter (name, pattern list) |
-> Maybe (FilePath -> IO ()) | Action on open |
-> IO (Maybe FilePath) |
:: FilePath | Defaultname for file |
-> [(String, [String])] | Filter (name, pattern list) |
-> Maybe (FilePath -> IO ()) | Action on save |
-> IO (Maybe FilePath) |
:: String | Title |
-> [String] | Rows to display |
-> IO (Maybe Int) | Selected row |
create a window with title and list of options, return selected option
:: String | Title |
-> String | Description |
-> IO (Double -> String -> IO (), IO ()) |
:: String | Title |
-> String | Description |
-> IO (String -> IO (), IO ()) |
:: String | Title |
-> String | Message |
-> Maybe FilePath | Filename |
-> IO () |
Display text in an uneditable, scrollable editor. Not blocking!
displayTheoryWithWarningExt Source #
:: String | Kind of theory |
-> String | Name of theory |
-> String | Warning |
-> G_theory | Theory |
-> IO () |
displays a theory with warning in a window
Frequently used functions inside Gtk thread
setListData :: TreeView -> (a -> String) -> [a] -> IO (ListStore a) Source #
Sets data of list
updateListData :: ListStore a -> [a] -> IO () Source #
Updates data of list
setListSelectorSingle :: TreeView -> IO () -> IO (ConnectId TreeSelection) Source #
Setup list with single selection
setListSelectorMultiple :: TreeView -> Button -> Button -> Button -> IO () -> IO (ConnectId TreeSelection) Source #
Setup list with multiple selection
selectFirst :: TreeView -> IO () Source #
Selects the first item if possible
getSelectedSingle :: TreeView -> ListStore a -> IO (Maybe (Int, a)) Source #
Get selected item
getSelectedMultiple :: TreeView -> ListStore a -> IO [(Int, a)] Source #
Get selected items and row number
selectAllRows :: TreeView -> IO () Source #
Select all rows
escapeGtkMarkup :: String -> String Source #
type ComboBoxText = Text #
toComboBoxText :: Show a => [a] -> [ComboBoxText] Source #