<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
                      "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html  xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Style-Type" content="text/css" />
<meta http-equiv="Content-type" content="text/html; charset=ISO-8859-1" />
<link rel="stylesheet" href="./robodoc.css" type="text/css" />
<title>./src/utils.ads</title>
<!-- Source: ./src/utils.ads -->
<!-- Generated with ROBODoc Version 4.99.43 (Feb  8 2020) -->
</head>
<body>
<div id="logo">
<a name="robo_top_of_doc">Hunter v1.6 code documentation</a>
</div> <!-- logo -->
<div id="navigation">
<a class="menuitem" href="./toc_index.html#top">Table of Contents</a>
<a class="menuitem" href="./sources.html#top">Source files</a>
<a class="menuitem" href="./index.html#top">Index</a>
<a class="menuitem" href="./robo_tasks.html#top">Tasks</a>
<a class="menuitem" href="./robo_constants.html#top">Constants</a>
<a class="menuitem" href="./robo_exceptions.html#top">Exceptions</a>
<a class="menuitem" href="./robo_subprograms.html#top">Subprograms</a>
<a class="menuitem" href="./robo_packages.html#top">Packages</a>
<a class="menuitem" href="./robo_commands.html#top">Commands</a>
<a class="menuitem" href="./robo_records.html#top">Records</a>
<a class="menuitem" href="./robo_types.html#top">Types</a>
<a class="menuitem" href="./robo_variables.html#top">Variables</a>
</div> <!-- navigation -->
<div id="content">
<h3>TABLE OF CONTENTS</h3>
<ul>
<li>1. <a href="#robo49">Utils/Utils</a></li>
<ul>
<li>1.1. <a href="./tui/utils-ui_ads.html#robo50">Utils/UtilsTUI</a></li>
<ul>
<li>1.1.1. <a href="./tui/utils-ui_adb.html#robo153">UtilsTUI/UtilsTUI.ProgressIndex</a></li>
<li>1.1.2. <a href="./tui/utils-ui_ads.html#robo307">UtilsTUI/UtilsTUI.Add_Command</a></li>
<li>1.1.3. <a href="./tui/utils-ui_ads.html#robo308">UtilsTUI/UtilsTUI.Find_Executable</a></li>
<li>1.1.4. <a href="./tui/utils-ui_ads.html#robo309">UtilsTUI/UtilsTUI.Set_ProgressBar</a></li>
<li>1.1.5. <a href="./tui/utils-ui_ads.html#robo310">UtilsTUI/UtilsTUI.Toggle_Tool_Buttons</a></li>
<li>1.1.6. <a href="./tui/utils-ui_ads.html#robo311">UtilsTUI/UtilsTUI.Update_Progress_Bar</a></li>
</ul>
<li>1.2. <a href="./gui/utils-ui_ads.html#robo51">Utils/UtilsUI</a></li>
<ul>
<li>1.2.1. <a href="./gui/utils-ui_ads.html#robo312">UtilsUI/UtilsUI.Add_Command</a></li>
<li>1.2.2. <a href="./gui/utils-ui_ads.html#robo313">UtilsUI/UtilsUI.Find_Executable</a></li>
<li>1.2.3. <a href="./gui/utils-ui_ads.html#robo314">UtilsUI/UtilsUI.Set_Dialog</a></li>
<li>1.2.4. <a href="./gui/utils-ui_ads.html#robo315">UtilsUI/UtilsUI.Toggle_Tool_Buttons</a></li>
<li>1.2.5. <a href="./gui/utils-ui_ads.html#robo316">UtilsUI/UtilsUI.Update_Progress_Bar</a></li>
</ul>
<li>1.3. <a href="#robo73">Utils/Utils.CreateCommands</a></li>
<li>1.4. <a href="#robo74">Utils/Utils.Width_Range</a></li>
<li>1.5. <a href="#robo89">Utils/Utils.No_Height</a></li>
<li>1.6. <a href="#robo90">Utils/Utils.No_Width</a></li>
<li>1.7. <a href="./gui/utils-ui_adb.html#robo152">Utils/Utils.Progress_Index</a></li>
<li>1.8. <a href="#robo302">Utils/Utils.Can_Be_Opened</a></li>
<li>1.9. <a href="#robo303">Utils/Utils.Count_File_Size</a></li>
<li>1.10. <a href="#robo304">Utils/Utils.Get_Mime_Type</a></li>
<li>1.11. <a href="#robo305">Utils/Utils.Height_Range</a></li>
<li>1.12. <a href="#robo306">Utils/Utils.Is_Text</a></li>
</ul>
</ul>
<hr />
<a name="Utils2fUtils"></a>
<a name="robo49"></a><h2>Utils/Utils [ Packages ]</h2>

<p>[ <a href="#robo_top_of_doc">Top</a> ] [ <a href="./robo_packages.html#robo_top_of_doc">Packages</a> ]</p>
<p class="item_name">FUNCTION</p>
<pre> Various utility subprograms.
</pre>
<p class="item_name">SOURCE</p>
<pre class="source"><span class="keyword">package</span> <strong>Utils</strong> <span class="keyword">is</span>
</pre>

<hr />
<a name="Utils2fUtils2eCreateCommands"></a>
<a name="robo73"></a><h2>Utils/Utils.CreateCommands [ Types ]</h2>

<p>[ <a href="#robo_top_of_doc">Top</a> ] [ <a href="#robo49">Utils</a> ] [ <a href="./robo_types.html#robo_top_of_doc">Types</a> ]</p>
<p class="item_name">FUNCTION</p>
<pre> Used to add new commands to Tcl
</pre>
<p class="item_name">SOURCE</p>
<pre class="source">   <span class="keyword">package</span> CreateCommands <span class="keyword">is</span> <span class="keyword">new</span> Tcl<span class="sign">.</span>Ada<span class="sign">.</span>Generic_Command
     <span class="sign">(</span>ClientData <span class="sign">=</span><span class="sign">&gt;</span> Integer<span class="sign">)</span><span class="sign">;</span>
</pre>

<hr />
<a name="Utils2fUtils2eWidth5fRange"></a>
<a name="robo74"></a><h2>Utils/Utils.Width_Range [ Types ]</h2>

<p>[ <a href="#robo_top_of_doc">Top</a> ] [ <a href="#robo49">Utils</a> ] [ <a href="./robo_types.html#robo_top_of_doc">Types</a> ]</p>
<p class="item_name">FUNCTION</p>
<pre> Used to store the width of the widgets
</pre>
<p class="item_name">SOURCE</p>
<pre class="source">   <span class="keyword">type</span> Width_Range <span class="keyword">is</span> <span class="keyword">new</span> Integer<span class="sign">;</span>
</pre>

<hr />
<a name="Utils2fUtils2eNo5fHeight"></a>
<a name="robo89"></a><h2>Utils/Utils.No_Height [ Constants ]</h2>

<p>[ <a href="#robo_top_of_doc">Top</a> ] [ <a href="#robo49">Utils</a> ] [ <a href="./robo_constants.html#robo_top_of_doc">Constants</a> ]</p>
<p class="item_name">FUNCTION</p>
<pre> Zero value fo the widgets height
</pre>
<p class="item_name">SOURCE</p>
<pre class="source">   No_Height<span class="sign">:</span> <span class="keyword">constant</span> Height_Range <span class="sign">:</span><span class="sign">=</span> 0<span class="sign">;</span>
</pre>

<hr />
<a name="Utils2fUtils2eNo5fWidth"></a>
<a name="robo90"></a><h2>Utils/Utils.No_Width [ Constants ]</h2>

<p>[ <a href="#robo_top_of_doc">Top</a> ] [ <a href="#robo49">Utils</a> ] [ <a href="./robo_constants.html#robo_top_of_doc">Constants</a> ]</p>
<p class="item_name">FUNCTION</p>
<pre> Zero value for the widgets width
</pre>
<p class="item_name">SOURCE</p>
<pre class="source">   No_Width<span class="sign">:</span> <span class="keyword">constant</span> Width_Range <span class="sign">:</span><span class="sign">=</span> 0<span class="sign">;</span>
</pre>

<hr />
<a name="Utils2fUtils2eCan5fBe5fOpened"></a>
<a name="robo302"></a><h2>Utils/Utils.Can_Be_Opened [ Subprograms ]</h2>

<p>[ <a href="#robo_top_of_doc">Top</a> ] [ <a href="#robo49">Utils</a> ] [ <a href="./robo_subprograms.html#robo_top_of_doc">Subprograms</a> ]</p>
<p class="item_name">FUNCTION</p>
<pre> Check if there is application associated to open selected MIME Type
</pre>
<p class="item_name">SOURCE</p>
<pre class="source">   <span class="keyword">function</span> Can_Be_Opened<span class="sign">(</span>Mime_Type<span class="sign">:</span> String<span class="sign">)</span> <span class="keyword">return</span> Boolean<span class="sign">;</span>
</pre>
<p class="item_name">PARAMETERS</p>
<pre> Mime_Type - MIME Type to check
</pre>
<p class="item_name">RESULT</p>
<pre> Return True if there is application associated with selected MIME Type, otherwise False
</pre>

<hr />
<a name="Utils2fUtils2eCount5fFile5fSize"></a>
<a name="robo303"></a><h2>Utils/Utils.Count_File_Size [ Subprograms ]</h2>

<p>[ <a href="#robo_top_of_doc">Top</a> ] [ <a href="#robo49">Utils</a> ] [ <a href="./robo_subprograms.html#robo_top_of_doc">Subprograms</a> ]</p>
<p class="item_name">FUNCTION</p>
<pre> Convert file size to human readable format
</pre>
<p class="item_name">SOURCE</p>
<pre class="source">   <span class="keyword">function</span> Count_File_Size<span class="sign">(</span>Size<span class="sign">:</span> File_Size<span class="sign">)</span> <span class="keyword">return</span> String<span class="sign">;</span>
</pre>
<p class="item_name">PARAMETERS</p>
<pre> Size - Size of file in bytes
</pre>
<p class="item_name">RESULT</p>
<pre> Return formated string with info about file size (in MiB, GiB, etc)
</pre>

<hr />
<a name="Utils2fUtils2eGet5fMime5fType"></a>
<a name="robo304"></a><h2>Utils/Utils.Get_Mime_Type [ Subprograms ]</h2>

<p>[ <a href="#robo_top_of_doc">Top</a> ] [ <a href="#robo49">Utils</a> ] [ <a href="./robo_subprograms.html#robo_top_of_doc">Subprograms</a> ]</p>
<p class="item_name">FUNCTION</p>
<pre> Check MIME Type of selected file
</pre>
<p class="item_name">SOURCE</p>
<pre class="source">   <span class="keyword">function</span> Get_Mime_Type<span class="sign">(</span>File_Name<span class="sign">:</span> String<span class="sign">)</span> <span class="keyword">return</span> String<span class="sign">;</span>
</pre>
<p class="item_name">PARAMETERS</p>
<pre> File_Name - full path to the selected file to check MIME Type
</pre>
<p class="item_name">RESULT</p>
<pre> String with MIME Type of selected file
</pre>

<hr />
<a name="Utils2fUtils2eHeight5fRange"></a>
<a name="robo305"></a><h2>Utils/Utils.Height_Range [ Subprograms ]</h2>

<p>[ <a href="#robo_top_of_doc">Top</a> ] [ <a href="#robo49">Utils</a> ] [ <a href="./robo_subprograms.html#robo_top_of_doc">Subprograms</a> ]</p>
<p class="item_name">FUNCTION</p>
<pre> Used to store the height of the widgets
</pre>
<p class="item_name">SOURCE</p>
<pre class="source">   <span class="keyword">type</span> Height_Range <span class="keyword">is</span> <span class="keyword">new</span> Integer<span class="sign">;</span>
</pre>

<hr />
<a name="Utils2fUtils2eIs5fText"></a>
<a name="robo306"></a><h2>Utils/Utils.Is_Text [ Subprograms ]</h2>

<p>[ <a href="#robo_top_of_doc">Top</a> ] [ <a href="#robo49">Utils</a> ] [ <a href="./robo_subprograms.html#robo_top_of_doc">Subprograms</a> ]</p>
<p class="item_name">FUNCTION</p>
<pre> Check if the selected MimeType is text so it can be previewed
 PARAMTERS
 Mime_Type - MIME Type to check
</pre>
<p class="item_name">SOURCE</p>
<pre class="source">   <span class="keyword">function</span> Is_Text<span class="sign">(</span>Mime_Type<span class="sign">:</span> String<span class="sign">)</span> <span class="keyword">return</span> Boolean<span class="sign">;</span>
</pre>
<p class="item_name">RESULT</p>
<pre> Return True if the selected MIME Type is text type, otherwise False
</pre>

</div> <!-- content -->
<div id="footer">
<p>Generated from ./src/utils.ads with <a href="http://www.xs4all.nl/~rfsber/Robo/robodoc.html">ROBODoc</a> V4.99.43 on Sun Aug 08 2021 07:39:39
</p>
</div> <!-- footer -->
</body>
</html>

