hsfm/HSFM-GUI-Gtk-Utils.html

11 lines
9.2 KiB
HTML
Raw Normal View History

2016-06-01 17:32:51 +00:00
<!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 src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML" 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; IO [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; IO [<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; IO ()) -&gt; IO ()</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; IO (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; IO <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; IO <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; String -&gt; IO (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; IO ()</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; IO (Maybe 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; IO (Maybe <a href="HSFM-GUI-Gtk-Data.html#t:Item">Item</a>)</li><li class="src short"><a href="#v:addHistory">addHistory</a> :: Eq a =&gt; a -&gt; [a] -&gt; [a]</li></ul></div><div id="interface"><h1>Documentation</h1><div class="top"><p class="src"><a id="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; IO [TreePath] <a href="src/HSFM-GUI-Gtk-Utils.html#getSelectedTreePaths" class="link">Source</a> <a href="#v:getSelectedTreePaths" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="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; IO [<a href="HSFM-GUI-Gtk-Data.html#t:Item">Item</a>] <a href="src/HSFM-GUI-Gtk-Utils.html#getSelectedItems" class="link">Source</a> <a href="#v:getSelectedItems" class="selflink">#</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 id="v:withItems" class="def">withItems</a> <a href="src/HSFM-GUI-Gtk-Utils.html#withItems" class="link">Source</a> <a href="#v:withItems" class="selflink">#</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class=
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 id="v:getFirstItem" class="def">getFirstItem</a> :: <a href="HSFM-GUI-Gtk-Data.html#t:MyView">MyView</a> -&gt; IO <a href="HSFM-GUI-Gtk-Data.html#t:Item">Item</a> <a href="src/HSFM-GUI-Gtk-Utils.html#getFirstItem" class="link">Source</a> <a href="#v:getFirstItem" class="selflink">#</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 id="v:getCurrentDir" class="def">getCurrentDir</a> :: <a href="HSFM-GUI-Gtk-Data.html#t:MyView">MyView</a> -&gt; IO <a href="HSFM-GUI-Gtk-Data.html#t:Item">Item</a> <a href="src/HSFM-GUI-Gtk-Utils.html#getCurrentDir" class="link">Source</a> <a href="#v:getCurrentDir" class="selflink">#</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 id="v:pushStatusBar" class="def">pushStatusBar</a> :: <a href="HSFM-GUI-Gtk-Data.html#t:MyGUI">MyGUI</a> -&gt; String -&gt; IO (ContextId, MessageId) <a href="src/HSFM-GUI-Gtk-Utils.html#pushStatusBar" class="link">Source</a> <a href="#v:pushStatusBar" class="selflink">#</a></p><div class="doc"><p>Push a message to the status bar.</p></div></div><div class="top"><p class="src"><a id="v:popStatusbar" class="def">popStatusbar</a> :: <a href="HSFM-GUI-Gtk-Data.html#t:MyGUI">MyGUI</a> -&gt; IO () <a href="src/HSFM-GUI-Gtk-Utils.html#popStatusbar" class="link">Source</a> <a href="#v:popStatusbar" class="selflink">#</a></p><div class="doc"><p>Pop a message from the status bar.</p></div></div><div class="top"><p class="src"><a id="v:rawPathToIter" class="def">rawPathToIter</a> :: <a href="HSFM-GUI-Gtk-Data.html#t:MyView">MyView</a> -&gt; TreePath -&gt; IO (Maybe TreeIter) <a href="src/HSFM-GUI-Gtk-Utils.html#rawPathToIter" class="link">Source</a> <a href="#v:rawPathToIter" class="selflink">#</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 id="v:rawPathToItem" class="def">rawPathToItem</a> :: <a href="HSFM-GUI-Gtk-Data.html#t:MyView">MyView</a> -&gt; TreePath -&gt; IO (Maybe <a href="HSFM-GUI-Gtk-Data.html#t:Item">Item</a>) <a href="src/HSFM-GUI-Gtk-Utils.html#rawPathToItem" class="link">Source</a> <a href="#v:rawPathToItem" class="selflink">#</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 class="top"><p class="src"><a id="v:addHistory" class="def">addHistory</a> :: Eq a =&gt; a -&gt; [a] -&gt; [a] <a href="src/HSFM-GUI-Gtk-Utils.html#addHistory" class="link">Source</a> <a href="#v:addHistory" class="selflink">#</a></p><div class="doc"><p>Makes sure the list is max 5. This is probably not very efficient
but we don't care, since it's a small list anyway.</p></div></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.17.2</p></div></body></html>