hsfm-gtk

Safe HaskellNone
LanguageHaskell2010

HSFM.GUI.Gtk.Utils

Synopsis

Documentation

getSelectedItems :: MyGUI -> MyView -> IO [Item] Source

Gets the currently selected item of the treeView, if any.

withItems Source

Arguments

:: MyGUI 
-> MyView 
-> ([Item] -> MyGUI -> MyView -> IO a)

action to carry out

-> IO a 

Carry out an action on the currently selected item.

If there is no item selected, does nothing.

fileListStore Source

Arguments

:: Item

current dir

-> MyView 
-> IO (ListStore Item) 

Create the ListStore of files/directories from the current directory. This is the function which maps the Data.DirTree data structures into the GTK+ data structures.

getFirstItem :: MyView -> IO Item Source

Currently unsafe. This is used to obtain any item, which will fail if there is none.

getCurrentDir :: MyView -> IO Item Source

Reads the current directory from MyView.

This reads the MVar and may block the main thread if it's empty.

pushStatusBar :: MyGUI -> String -> IO (ContextId, MessageId) Source

Push a message to the status bar.

popStatusbar :: MyGUI -> IO () Source

Pop a message from the status bar.

rawPathToIter :: MyView -> TreePath -> IO (Maybe TreeIter) Source

Turn a path on the rawModel into a path that we can use at the outermost model layer.

rawPathToItem :: MyView -> TreePath -> IO (Maybe Item) Source

Turn a path on the rawModel into the corresponding item that we can use at the outermost model layer.