hsfm/HSFM-GUI-Gtk-Utils.html
travis-ci 48f6a2afc2 Lastest docs updated
travis build: 33
commit: f6ec802898
auto-pushed to gh-pages
2016-06-05 18:11:29 +00:00

10 lines
11 KiB
HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>HSFM.GUI.Gtk.Utils</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
window.onload = function () {pageLoad();setSynopsis("mini_HSFM-GUI-Gtk-Utils.html");};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/HSFM-GUI-Gtk-Utils.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">hsfm-gtk</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Safe Haskell</th><td>None</td></tr><tr><th>Language</th><td>Haskell2010</td></tr></table><p class="caption">HSFM.GUI.Gtk.Utils</p></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><a href="#v:getSelectedTreePaths">getSelectedTreePaths</a> :: <a href="HSFM-GUI-Gtk-Data.html#t:MyGUI">MyGUI</a> -&gt; <a href="HSFM-GUI-Gtk-Data.html#t:MyView">MyView</a> -&gt; <a href="https://hackage.haskell.org/package/base-4.8.1.0/docs/System-IO.html#t:IO">IO</a> [TreePath]</li><li class="src short"><a href="#v:getSelectedItems">getSelectedItems</a> :: <a href="HSFM-GUI-Gtk-Data.html#t:MyGUI">MyGUI</a> -&gt; <a href="HSFM-GUI-Gtk-Data.html#t:MyView">MyView</a> -&gt; <a href="https://hackage.haskell.org/package/base-4.8.1.0/docs/System-IO.html#t:IO">IO</a> [<a href="HSFM-GUI-Gtk-Data.html#t:Item">Item</a>]</li><li class="src short"><a href="#v:withItems">withItems</a> :: <a href="HSFM-GUI-Gtk-Data.html#t:MyGUI">MyGUI</a> -&gt; <a href="HSFM-GUI-Gtk-Data.html#t:MyView">MyView</a> -&gt; ([<a href="HSFM-GUI-Gtk-Data.html#t:Item">Item</a>] -&gt; <a href="HSFM-GUI-Gtk-Data.html#t:MyGUI">MyGUI</a> -&gt; <a href="HSFM-GUI-Gtk-Data.html#t:MyView">MyView</a> -&gt; <a href="https://hackage.haskell.org/package/base-4.8.1.0/docs/System-IO.html#t:IO">IO</a> ()) -&gt; <a href="https://hackage.haskell.org/package/base-4.8.1.0/docs/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:fileListStore">fileListStore</a> :: <a href="HSFM-GUI-Gtk-Data.html#t:Item">Item</a> -&gt; <a href="HSFM-GUI-Gtk-Data.html#t:MyView">MyView</a> -&gt; <a href="https://hackage.haskell.org/package/base-4.8.1.0/docs/System-IO.html#t:IO">IO</a> (ListStore <a href="HSFM-GUI-Gtk-Data.html#t:Item">Item</a>)</li><li class="src short"><a href="#v:getFirstItem">getFirstItem</a> :: <a href="HSFM-GUI-Gtk-Data.html#t:MyView">MyView</a> -&gt; <a href="https://hackage.haskell.org/package/base-4.8.1.0/docs/System-IO.html#t:IO">IO</a> <a href="HSFM-GUI-Gtk-Data.html#t:Item">Item</a></li><li class="src short"><a href="#v:getCurrentDir">getCurrentDir</a> :: <a href="HSFM-GUI-Gtk-Data.html#t:MyView">MyView</a> -&gt; <a href="https://hackage.haskell.org/package/base-4.8.1.0/docs/System-IO.html#t:IO">IO</a> <a href="HSFM-GUI-Gtk-Data.html#t:Item">Item</a></li><li class="src short"><a href="#v:pushStatusBar">pushStatusBar</a> :: <a href="HSFM-GUI-Gtk-Data.html#t:MyGUI">MyGUI</a> -&gt; <a href="https://hackage.haskell.org/package/base-4.8.1.0/docs/Data-String.html#t:String">String</a> -&gt; <a href="https://hackage.haskell.org/package/base-4.8.1.0/docs/System-IO.html#t:IO">IO</a> (ContextId, MessageId)</li><li class="src short"><a href="#v:popStatusbar">popStatusbar</a> :: <a href="HSFM-GUI-Gtk-Data.html#t:MyGUI">MyGUI</a> -&gt; <a href="https://hackage.haskell.org/package/base-4.8.1.0/docs/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:rawPathToIter">rawPathToIter</a> :: <a href="HSFM-GUI-Gtk-Data.html#t:MyView">MyView</a> -&gt; TreePath -&gt; <a href="https://hackage.haskell.org/package/base-4.8.1.0/docs/System-IO.html#t:IO">IO</a> (<a href="https://hackage.haskell.org/package/base-4.8.1.0/docs/Data-Maybe.html#t:Maybe">Maybe</a> TreeIter)</li><li class="src short"><a href="#v:rawPathToItem">rawPathToItem</a> :: <a href="HSFM-GUI-Gtk-Data.html#t:MyView">MyView</a> -&gt; TreePath -&gt; <a href="https://hackage.haskell.org/package/base-4.8.1.0/docs/System-IO.html#t:IO">IO</a> (<a href="https://hackage.haskell.org/package/base-4.8.1.0/docs/Data-Maybe.html#t:Maybe">Maybe</a> <a href="HSFM-GUI-Gtk-Data.html#t:Item">Item</a>)</li></ul></div><div id="interface"><h1>Documentation</h1><div class="top"><p class="src"><a name="v:getSelectedTreePaths" class="def">getSelectedTreePaths</a> :: <a href="HSFM-GUI-Gtk-Data.html#t:MyGUI">MyGUI</a> -&gt; <a href="HSFM-GUI-Gtk-Data.html#t:MyView">MyView</a> -&gt; <a href="https://hackage.haskell.org/package/base-4.8.1.0/docs/System-IO.html#t:IO">IO</a> [TreePath] <a href="src/HSFM-GUI-Gtk-Utils.html#getSelectedTreePaths" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:getSelectedItems" class="def">getSelectedItems</a> :: <a href="HSFM-GUI-Gtk-Data.html#t:MyGUI">MyGUI</a> -&gt; <a href="HSFM-GUI-Gtk-Data.html#t:MyView">MyView</a> -&gt; <a href="https://hackage.haskell.org/package/base-4.8.1.0/docs/System-IO.html#t:IO">IO</a> [<a href="HSFM-GUI-Gtk-Data.html#t:Item">Item</a>] <a href="src/HSFM-GUI-Gtk-Utils.html#getSelectedItems" class="link">Source</a></p><div class="doc"><p>Gets the currently selected item of the treeView, if any.</p></div></div><div class="top"><p class="src"><a name="v:withItems" class="def">withItems</a> <a href="src/HSFM-GUI-Gtk-Utils.html#withItems" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="HSFM-GUI-Gtk-Data.html#t:MyGUI">MyGUI</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">-&gt; <a href="HSFM-GUI-Gtk-Data.html#t:MyView">MyView</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">-&gt; ([<a href="HSFM-GUI-Gtk-Data.html#t:Item">Item</a>] -&gt; <a href="HSFM-GUI-Gtk-Data.html#t:MyGUI">MyGUI</a> -&gt; <a href="HSFM-GUI-Gtk-Data.html#t:MyView">MyView</a> -&gt; <a href="https://hackage.haskell.org/package/base-4.8.1.0/docs/System-IO.html#t:IO">IO</a> ())</td><td class="doc"><p>action to carry out</p></td></tr><tr><td class="src">-&gt; <a href="https://hackage.haskell.org/package/base-4.8.1.0/docs/System-IO.html#t:IO">IO</a> ()</td><td class="doc empty">&nbsp;</td></tr></table></div><div class="doc"><p>Carry out an action on the currently selected item.</p><p>If there is no item selected, does nothing.</p></div></div><div class="top"><p class="src"><a name="v:fileListStore" class="def">fileListStore</a> <a href="src/HSFM-GUI-Gtk-Utils.html#fileListStore" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="HSFM-GUI-Gtk-Data.html#t:Item">Item</a></td><td class="doc"><p>current dir</p></td></tr><tr><td class="src">-&gt; <a href="HSFM-GUI-Gtk-Data.html#t:MyView">MyView</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">-&gt; <a href="https://hackage.haskell.org/package/base-4.8.1.0/docs/System-IO.html#t:IO">IO</a> (ListStore <a href="HSFM-GUI-Gtk-Data.html#t:Item">Item</a>)</td><td class="doc empty">&nbsp;</td></tr></table></div><div class="doc"><p>Create the <code>ListStore</code> of files/directories from the current directory.
This is the function which maps the Data.DirTree data structures
into the GTK+ data structures.</p></div></div><div class="top"><p class="src"><a name="v:getFirstItem" class="def">getFirstItem</a> :: <a href="HSFM-GUI-Gtk-Data.html#t:MyView">MyView</a> -&gt; <a href="https://hackage.haskell.org/package/base-4.8.1.0/docs/System-IO.html#t:IO">IO</a> <a href="HSFM-GUI-Gtk-Data.html#t:Item">Item</a> <a href="src/HSFM-GUI-Gtk-Utils.html#getFirstItem" class="link">Source</a></p><div class="doc"><p>Currently unsafe. This is used to obtain any item, which will
fail if there is none.</p></div></div><div class="top"><p class="src"><a name="v:getCurrentDir" class="def">getCurrentDir</a> :: <a href="HSFM-GUI-Gtk-Data.html#t:MyView">MyView</a> -&gt; <a href="https://hackage.haskell.org/package/base-4.8.1.0/docs/System-IO.html#t:IO">IO</a> <a href="HSFM-GUI-Gtk-Data.html#t:Item">Item</a> <a href="src/HSFM-GUI-Gtk-Utils.html#getCurrentDir" class="link">Source</a></p><div class="doc"><p>Reads the current directory from MyView.</p><p>This reads the MVar and may block the main thread if it's
empty.</p></div></div><div class="top"><p class="src"><a name="v:pushStatusBar" class="def">pushStatusBar</a> :: <a href="HSFM-GUI-Gtk-Data.html#t:MyGUI">MyGUI</a> -&gt; <a href="https://hackage.haskell.org/package/base-4.8.1.0/docs/Data-String.html#t:String">String</a> -&gt; <a href="https://hackage.haskell.org/package/base-4.8.1.0/docs/System-IO.html#t:IO">IO</a> (ContextId, MessageId) <a href="src/HSFM-GUI-Gtk-Utils.html#pushStatusBar" class="link">Source</a></p><div class="doc"><p>Push a message to the status bar.</p></div></div><div class="top"><p class="src"><a name="v:popStatusbar" class="def">popStatusbar</a> :: <a href="HSFM-GUI-Gtk-Data.html#t:MyGUI">MyGUI</a> -&gt; <a href="https://hackage.haskell.org/package/base-4.8.1.0/docs/System-IO.html#t:IO">IO</a> () <a href="src/HSFM-GUI-Gtk-Utils.html#popStatusbar" class="link">Source</a></p><div class="doc"><p>Pop a message from the status bar.</p></div></div><div class="top"><p class="src"><a name="v:rawPathToIter" class="def">rawPathToIter</a> :: <a href="HSFM-GUI-Gtk-Data.html#t:MyView">MyView</a> -&gt; TreePath -&gt; <a href="https://hackage.haskell.org/package/base-4.8.1.0/docs/System-IO.html#t:IO">IO</a> (<a href="https://hackage.haskell.org/package/base-4.8.1.0/docs/Data-Maybe.html#t:Maybe">Maybe</a> TreeIter) <a href="src/HSFM-GUI-Gtk-Utils.html#rawPathToIter" class="link">Source</a></p><div class="doc"><p>Turn a path on the rawModel into a path that we can
use at the outermost model layer.</p></div></div><div class="top"><p class="src"><a name="v:rawPathToItem" class="def">rawPathToItem</a> :: <a href="HSFM-GUI-Gtk-Data.html#t:MyView">MyView</a> -&gt; TreePath -&gt; <a href="https://hackage.haskell.org/package/base-4.8.1.0/docs/System-IO.html#t:IO">IO</a> (<a href="https://hackage.haskell.org/package/base-4.8.1.0/docs/Data-Maybe.html#t:Maybe">Maybe</a> <a href="HSFM-GUI-Gtk-Data.html#t:Item">Item</a>) <a href="src/HSFM-GUI-Gtk-Utils.html#rawPathToItem" class="link">Source</a></p><div class="doc"><p>Turn a path on the rawModel into the corresponding item
that we can use at the outermost model layer.</p></div></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.16.1</p></div></body></html>