hsfm-gtk

Safe HaskellNone
LanguageHaskell2010

HSFM.GUI.Gtk.MyView

Synopsis

Documentation

newTab :: MyGUI -> IO FMView -> Path Abs -> IO MyView Source #

Creates a new tab with its own view and refreshes the view.

createMyView :: MyGUI -> IO FMView -> IO MyView Source #

Constructs the initial MyView object with a few dummy models. It also initializes the callbacks.

switchView :: MyGUI -> MyView -> IO FMView -> IO () Source #

Switch the existing view in MyView with the one that the io action returns.

destroyView :: MyGUI -> MyView -> IO Int Source #

Destroys the current view by disconnecting the watcher and destroying the active FMView container.

Everything that needs to be done in order to forget about a view needs to be done here.

Returns the page in the tab list this view corresponds to.

createIconView :: IO FMView Source #

Createss an IconView.

createTreeView :: IO FMView Source #

Creates a TreeView.

refreshView :: MyGUI -> MyView -> Maybe (Path Abs) -> IO () Source #

Re-reads the current directory or the given one and updates the View. This is more or less a wrapper around refreshView'

If the third argument is Nothing, it tries to re-read the current directory. If that fails, it reads "/" instead.

If the third argument is (Just path) it tries to read "path". If that fails, it reads "/" instead.

refreshView' :: MyGUI -> MyView -> Item -> IO () Source #

Refreshes the View based on the given directory.

If the directory is not a Dir or a Symlink pointing to a Dir, then calls refreshView with the 3rd argument being Nothing.

constructView :: MyGUI -> MyView -> IO () Source #

Constructs the visible View with the current underlying mutable models, which are retrieved from MyGUI.

This sort of merges the components mygui and myview and fires up the actual models.