<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>
Class: Fox::FXSettings
— FXRuby API Documentation
</title>
<link rel="stylesheet" href="../css/style.css" type="text/css" />
<link rel="stylesheet" href="../css/common.css" type="text/css" />
<script type="text/javascript">
pathId = "Fox::FXSettings";
relpath = '../';
</script>
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
<script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
</head>
<body>
<div class="nav_wrap">
<iframe id="nav" src="../class_list.html?1"></iframe>
<div id="resizer"></div>
</div>
<div id="main" tabindex="-1">
<div id="header">
<div id="menu">
<a href="../_index.html">Index (F)</a> »
<span class='title'><span class='object_link'><a href="../Fox.html" title="Fox (module)">Fox</a></span></span>
»
<span class="title">FXSettings</span>
</div>
<div id="search">
<a class="full_list_link" id="class_list_link"
href="../class_list.html">
<svg width="24" height="24">
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
</svg>
</a>
</div>
<div class="clear"></div>
</div>
<div id="content"><h1>Class: Fox::FXSettings
</h1>
<div class="box_info">
<dl>
<dt>Inherits:</dt>
<dd>
<span class="inheritName"><span class='object_link'><a href="FXDict.html" title="Fox::FXDict (class)">FXDict</a></span></span>
<ul class="fullTree">
<li>Object</li>
<li class="next"><span class='object_link'><a href="FXObject.html" title="Fox::FXObject (class)">FXObject</a></span></li>
<li class="next"><span class='object_link'><a href="FXDict.html" title="Fox::FXDict (class)">FXDict</a></span></li>
<li class="next">Fox::FXSettings</li>
</ul>
<a href="#" class="inheritanceTree">show all</a>
</dd>
</dl>
<dl>
<dt>Defined in:</dt>
<dd>rdoc-sources/FXSettings.rb<span class="defines">,<br />
lib/fox16/core.rb,<br /> lib/fox16/settings.rb</span>
</dd>
</dl>
</div>
<h2>Overview</h2><div class="docstring">
<div class="discussion">
<p>The Settings class manages a key-value database. This is normally used as part of Registry, but can also be used separately in applications that need to maintain a key-value database in a file of their own. String values can contain any character, and will be escaped when written to the file.</p>
</div>
</div>
<div class="tags">
</div><div id="subclasses">
<h2>Direct Known Subclasses</h2>
<p class="children"><span class='object_link'><a href="FXRegistry.html" title="Fox::FXRegistry (class)">FXRegistry</a></span></p>
</div>
<h2>Instance Attribute Summary</h2>
<h3 class="inherited">Attributes inherited from <span class='object_link'><a href="FXDict.html" title="Fox::FXDict (class)">FXDict</a></span></h3>
<p class="inherited"><span class='object_link'><a href="FXDict.html#first-instance_method" title="Fox::FXDict#first (method)">#first</a></span>, <span class='object_link'><a href="FXDict.html#last-instance_method" title="Fox::FXDict#last (method)">#last</a></span>, <span class='object_link'><a href="FXDict.html#length-instance_method" title="Fox::FXDict#length (method)">#length</a></span></p>
<h2>
Instance Method Summary
<small><a href="#" class="summary_toggle">collapse</a></small>
</h2>
<ul class="summary">
<li class="public ">
<span class="summary_signature">
<a href="#data-instance_method" title="#data (instance method)">#<strong>data</strong>(pos) ⇒ Object </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>Obtain the string dictionary (an FXStringDict instance) for the requested section number.</p>
</div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#deleteEntry-instance_method" title="#deleteEntry (instance method)">#<strong>deleteEntry</strong>(section, key) ⇒ Object </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>Delete the registry entry for the specified <em>section</em> and <em>key</em>.</p>
</div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#deleteSection-instance_method" title="#deleteSection (instance method)">#<strong>deleteSection</strong>(section) ⇒ Object </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>Delete an entire section from this settings database.</p>
</div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#each_section-instance_method" title="#each_section (instance method)">#<strong>each_section</strong> ⇒ Object </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>Iterate over sections (where each section is a dictionary).</p>
</div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#existingEntry%3F-instance_method" title="#existingEntry? (instance method)">#<strong>existingEntry?</strong>(section, key) ⇒ Boolean </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>Returns <code>true</code> if a registry entry exists for the specified <em>section</em> and <em>key</em>.</p>
</div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#existingSection%3F-instance_method" title="#existingSection? (instance method)">#<strong>existingSection?</strong>(section) ⇒ Boolean </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>Returns <code>true</code> if the named <em>section</em> exists.</p>
</div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#find-instance_method" title="#find (instance method)">#<strong>find</strong>(section) ⇒ Object </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>Find a section given its name.</p>
</div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong> ⇒ FXSettings </a>
</span>
<span class="note title constructor">constructor</span>
<span class="summary_desc"><div class='inline'>
<p>Return an initialized FXSettings instance.</p>
</div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#modified=-instance_method" title="#modified= (instance method)">#<strong>modified=</strong>(mdfy = true) ⇒ Object </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>Mark as changed.</p>
</div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#modified%3F-instance_method" title="#modified? (instance method)">#<strong>modified?</strong> ⇒ Boolean </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>Returns <code>true</code> if this settings object has been modified.</p>
</div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#parseFile-instance_method" title="#parseFile (instance method)">#<strong>parseFile</strong>(filename, mark) ⇒ Object </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>Parse a file containing a settings database.</p>
</div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#readBoolEntry-instance_method" title="#readBoolEntry (instance method)">#<strong>readBoolEntry</strong>(section, key, default = false) ⇒ Object </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>Read a boolean registry entry from the specified <em>section</em> and <em>key</em>.</p>
</div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#readColorEntry-instance_method" title="#readColorEntry (instance method)">#<strong>readColorEntry</strong>(section, key, default = 0) ⇒ Object </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>Read a color value registry entry from the specified <em>section</em> and <em>key</em>.</p>
</div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#readIntEntry-instance_method" title="#readIntEntry (instance method)">#<strong>readIntEntry</strong>(section, key, default = 0) ⇒ Object </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>Read an integer registry entry from the specified <em>section</em> and <em>key</em>.</p>
</div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#readRealEntry-instance_method" title="#readRealEntry (instance method)">#<strong>readRealEntry</strong>(section, key, default = 0.0) ⇒ Object </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>Read a double-precision floating point registry entry from the specified <em>section</em> and <em>key</em>.</p>
</div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#readStringEntry-instance_method" title="#readStringEntry (instance method)">#<strong>readStringEntry</strong>(section, key, default = "") ⇒ Object </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>Read a string registry entry from the specified <em>section</em> and <em>key</em>.</p>
</div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#readUnsignedEntry-instance_method" title="#readUnsignedEntry (instance method)">#<strong>readUnsignedEntry</strong>(section, key, default = 0) ⇒ Object </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>Read an unsigned integer registry entry from the specified <em>section</em> and <em>key</em>.</p>
</div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#unparseFile-instance_method" title="#unparseFile (instance method)">#<strong>unparseFile</strong>(filename) ⇒ Object </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>Unparse settings database into given file.</p>
</div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#writeBoolEntry-instance_method" title="#writeBoolEntry (instance method)">#<strong>writeBoolEntry</strong>(section, key, value) ⇒ Object </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>Write a boolean registry <em>value</em> to the specified <em>section</em> and <em>key</em>.</p>
</div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#writeColorEntry-instance_method" title="#writeColorEntry (instance method)">#<strong>writeColorEntry</strong>(section, key, value) ⇒ Object </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>Write a color registry <em>value</em> to the specified <em>section</em> and <em>key</em>.</p>
</div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#writeIntEntry-instance_method" title="#writeIntEntry (instance method)">#<strong>writeIntEntry</strong>(section, key, value) ⇒ Object </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>Write an integer registry <em>value</em> to the specified <em>section</em> and <em>key</em>.</p>
</div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#writeRealEntry-instance_method" title="#writeRealEntry (instance method)">#<strong>writeRealEntry</strong>(section, key, value) ⇒ Object </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>Write a double-precision floating point registry <em>value</em> to the specified <em>section</em> and <em>key</em>.</p>
</div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#writeStringEntry-instance_method" title="#writeStringEntry (instance method)">#<strong>writeStringEntry</strong>(section, key, value) ⇒ Object </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>Write a string registry <em>value</em> to the specified <em>section</em> and <em>key</em>.</p>
</div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#writeUnsignedEntry-instance_method" title="#writeUnsignedEntry (instance method)">#<strong>writeUnsignedEntry</strong>(section, key, value) ⇒ Object </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>Write an unsigned integer registry <em>value</em> to the specified <em>section</em> and <em>key</em>.</p>
</div></span>
</li>
</ul>
<h3 class="inherited">Methods inherited from <span class='object_link'><a href="FXDict.html" title="Fox::FXDict (class)">FXDict</a></span></h3>
<p class="inherited"><span class='object_link'><a href="FXDict.html#clear-instance_method" title="Fox::FXDict#clear (method)">#clear</a></span>, <span class='object_link'><a href="FXDict.html#each_key-instance_method" title="Fox::FXDict#each_key (method)">#each_key</a></span>, <span class='object_link'><a href="FXDict.html#empty%3F-instance_method" title="Fox::FXDict#empty? (method)">#empty?</a></span>, <span class='object_link'><a href="FXDict.html#has_key%3F-instance_method" title="Fox::FXDict#has_key? (method)">#has_key?</a></span>, <span class='object_link'><a href="FXDict.html#key-instance_method" title="Fox::FXDict#key (method)">#key</a></span>, <span class='object_link'><a href="FXDict.html#keys-instance_method" title="Fox::FXDict#keys (method)">#keys</a></span>, <span class='object_link'><a href="FXDict.html#marked%3F-instance_method" title="Fox::FXDict#marked? (method)">#marked?</a></span>, <span class='object_link'><a href="FXDict.html#next-instance_method" title="Fox::FXDict#next (method)">#next</a></span>, <span class='object_link'><a href="FXDict.html#prev-instance_method" title="Fox::FXDict#prev (method)">#prev</a></span></p>
<h3 class="inherited">Methods inherited from <span class='object_link'><a href="FXObject.html" title="Fox::FXObject (class)">FXObject</a></span></h3>
<p class="inherited"><span class='object_link'><a href="FXObject.html#bind-instance_method" title="Fox::FXObject#bind (method)">#bind</a></span>, <span class='object_link'><a href="FXObject.html#handle-instance_method" title="Fox::FXObject#handle (method)">#handle</a></span>, <span class='object_link'><a href="FXObject.html#load-instance_method" title="Fox::FXObject#load (method)">#load</a></span>, <span class='object_link'><a href="FXObject.html#save-instance_method" title="Fox::FXObject#save (method)">#save</a></span>, <span class='object_link'><a href="FXObject.html#subclasses-class_method" title="Fox::FXObject.subclasses (method)">subclasses</a></span></p>
<div id="constructor_details" class="method_details_list">
<h2>Constructor Details</h2>
<div class="method_details first">
<h3 class="signature first" id="initialize-instance_method">
#<strong>initialize</strong> ⇒ <tt><span class='object_link'><a href="" title="Fox::FXSettings (class)">FXSettings</a></span></tt>
</h3><div class="docstring">
<div class="discussion">
<p>Return an initialized FXSettings instance.</p>
</div>
</div>
<div class="tags">
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
13
14</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'rdoc-sources/FXSettings.rb', line 13</span>
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span> <span class='comment'># :yields: theSettings
</span><span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
</div>
<div id="instance_method_details" class="method_details_list">
<h2>Instance Method Details</h2>
<div class="method_details first">
<h3 class="signature first" id="data-instance_method">
#<strong>data</strong>(pos) ⇒ <tt>Object</tt>
</h3><div class="docstring">
<div class="discussion">
<p>Obtain the string dictionary (an FXStringDict instance) for the requested section number.</p>
<h4 id="label-Parameters-3A">Parameters:</h4>
<dl class="rdoc-list note-list"><dt><code>pos</code>
<dd>
<p>the section number of interest [Integer]</p>
</dd></dl>
</div>
</div>
<div class="tags">
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
35</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'rdoc-sources/FXSettings.rb', line 35</span>
<span class='kw'>def</span> <span class='id identifier rubyid_data'>data</span><span class='lparen'>(</span><span class='id identifier rubyid_pos'>pos</span><span class='rparen'>)</span> <span class='semicolon'>;</span> <span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<div class="method_details ">
<h3 class="signature " id="deleteEntry-instance_method">
#<strong>deleteEntry</strong>(section, key) ⇒ <tt>Object</tt>
</h3><div class="docstring">
<div class="discussion">
<p>Delete the registry entry for the specified <em>section</em> and <em>key</em>. Returns true on success, false otherwise.</p>
<h4 id="label-Parameters-3A">Parameters:</h4>
<dl class="rdoc-list note-list"><dt><code>section</code>
<dd>
<p>the section containing the key to be deleted [String]</p>
</dd><dt><code>key</code>
<dd>
<p>the key to be deleted [String]</p>
</dd></dl>
</div>
</div>
<div class="tags">
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
207</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'rdoc-sources/FXSettings.rb', line 207</span>
<span class='kw'>def</span> <span class='id identifier rubyid_deleteEntry'>deleteEntry</span><span class='lparen'>(</span><span class='id identifier rubyid_section'>section</span><span class='comma'>,</span> <span class='id identifier rubyid_key'>key</span><span class='rparen'>)</span> <span class='semicolon'>;</span> <span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<div class="method_details ">
<h3 class="signature " id="deleteSection-instance_method">
#<strong>deleteSection</strong>(section) ⇒ <tt>Object</tt>
</h3><div class="docstring">
<div class="discussion">
<p>Delete an entire section from this settings database. Returns true on success, false otherwise.</p>
<h4 id="label-Parameters-3A">Parameters:</h4>
<dl class="rdoc-list note-list"><dt><code>section</code>
<dd>
<p>the name of the section to be deleted [String]</p>
</dd></dl>
</div>
</div>
<div class="tags">
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
227</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'rdoc-sources/FXSettings.rb', line 227</span>
<span class='kw'>def</span> <span class='id identifier rubyid_deleteSection'>deleteSection</span><span class='lparen'>(</span><span class='id identifier rubyid_section'>section</span><span class='rparen'>)</span> <span class='semicolon'>;</span> <span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<div class="method_details ">
<h3 class="signature " id="each_section-instance_method">
#<strong>each_section</strong> ⇒ <tt>Object</tt>
</h3><div class="docstring">
<div class="discussion">
<p>Iterate over sections (where each section is a dictionary).</p>
</div>
</div>
<div class="tags">
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
51
52</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'rdoc-sources/FXSettings.rb', line 51</span>
<span class='kw'>def</span> <span class='id identifier rubyid_each_section'>each_section</span> <span class='comment'># :yields: aStringDict
</span><span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<div class="method_details ">
<h3 class="signature " id="existingEntry?-instance_method">
#<strong>existingEntry?</strong>(section, key) ⇒ <tt>Boolean</tt>
</h3><div class="docstring">
<div class="discussion">
<p>Returns <code>true</code> if a registry entry exists for the specified <em>section</em> and <em>key</em>.</p>
<h4 id="label-Parameters-3A">Parameters:</h4>
<dl class="rdoc-list note-list"><dt><code>section</code>
<dd>
<p>the section containing the key of interest [String]</p>
</dd><dt><code>key</code>
<dd>
<p>the key of interest [String]</p>
</dd></dl>
</div>
</div>
<div class="tags">
<p class="tag_title">Returns:</p>
<ul class="return">
<li>
<span class='type'>(<tt>Boolean</tt>)</span>
</li>
</ul>
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
217</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'rdoc-sources/FXSettings.rb', line 217</span>
<span class='kw'>def</span> <span class='id identifier rubyid_existingEntry?'>existingEntry?</span><span class='lparen'>(</span><span class='id identifier rubyid_section'>section</span><span class='comma'>,</span> <span class='id identifier rubyid_key'>key</span><span class='rparen'>)</span> <span class='semicolon'>;</span> <span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<div class="method_details ">
<h3 class="signature " id="existingSection?-instance_method">
#<strong>existingSection?</strong>(section) ⇒ <tt>Boolean</tt>
</h3><div class="docstring">
<div class="discussion">
<p>Returns <code>true</code> if the named <em>section</em> exists.</p>
<h4 id="label-Parameters-3A">Parameters:</h4>
<dl class="rdoc-list note-list"><dt><code>section</code>
<dd>
<p>the name of the section of interest [String]</p>
</dd></dl>
</div>
</div>
<div class="tags">
<p class="tag_title">Returns:</p>
<ul class="return">
<li>
<span class='type'>(<tt>Boolean</tt>)</span>
</li>
</ul>
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
236</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'rdoc-sources/FXSettings.rb', line 236</span>
<span class='kw'>def</span> <span class='id identifier rubyid_existingSection?'>existingSection?</span><span class='lparen'>(</span><span class='id identifier rubyid_section'>section</span><span class='rparen'>)</span> <span class='semicolon'>;</span> <span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<div class="method_details ">
<h3 class="signature " id="find-instance_method">
#<strong>find</strong>(section) ⇒ <tt>Object</tt>
</h3><div class="docstring">
<div class="discussion">
<p>Find a section given its name. Returns the section (an FXStringDict instance) if found, otherwise returns nil.</p>
<h4 id="label-Parameters-3A">Parameters:</h4>
<dl class="rdoc-list note-list"><dt><code>section</code>
<dd>
<p>the section name of interest [String]</p>
</dd></dl>
</div>
</div>
<div class="tags">
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
46</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'rdoc-sources/FXSettings.rb', line 46</span>
<span class='kw'>def</span> <span class='id identifier rubyid_find'>find</span><span class='lparen'>(</span><span class='id identifier rubyid_section'>section</span><span class='rparen'>)</span> <span class='semicolon'>;</span> <span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<div class="method_details ">
<h3 class="signature " id="modified=-instance_method">
#<strong>modified=</strong>(mdfy = true) ⇒ <tt>Object</tt>
</h3><div class="docstring">
<div class="discussion">
<p>Mark as changed.</p>
</div>
</div>
<div class="tags">
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
241</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'rdoc-sources/FXSettings.rb', line 241</span>
<span class='kw'>def</span> <span class='id identifier rubyid_modified='>modified=</span><span class='lparen'>(</span><span class='id identifier rubyid_mdfy'>mdfy</span><span class='op'>=</span><span class='kw'>true</span><span class='rparen'>)</span> <span class='semicolon'>;</span> <span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<div class="method_details ">
<h3 class="signature " id="modified?-instance_method">
#<strong>modified?</strong> ⇒ <tt>Boolean</tt>
</h3><div class="docstring">
<div class="discussion">
<p>Returns <code>true</code> if this settings object has been modified.</p>
</div>
</div>
<div class="tags">
<p class="tag_title">Returns:</p>
<ul class="return">
<li>
<span class='type'>(<tt>Boolean</tt>)</span>
</li>
</ul>
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
246</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'rdoc-sources/FXSettings.rb', line 246</span>
<span class='kw'>def</span> <span class='id identifier rubyid_modified?'>modified?</span> <span class='semicolon'>;</span> <span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<div class="method_details ">
<h3 class="signature " id="parseFile-instance_method">
#<strong>parseFile</strong>(filename, mark) ⇒ <tt>Object</tt>
</h3><div class="docstring">
<div class="discussion">
<p>Parse a file containing a settings database. Returns true on success, false otherwise.</p>
</div>
</div>
<div class="tags">
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
20</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'rdoc-sources/FXSettings.rb', line 20</span>
<span class='kw'>def</span> <span class='id identifier rubyid_parseFile'>parseFile</span><span class='lparen'>(</span><span class='id identifier rubyid_filename'>filename</span><span class='comma'>,</span> <span class='id identifier rubyid_mark'>mark</span><span class='rparen'>)</span><span class='semicolon'>;</span> <span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<div class="method_details ">
<h3 class="signature " id="readBoolEntry-instance_method">
#<strong>readBoolEntry</strong>(section, key, default = false) ⇒ <tt>Object</tt>
</h3><div class="docstring">
<div class="discussion">
<p>Read a boolean registry entry from the specified <em>section</em> and <em>key</em>. If no value is found, the <em>default</em> value is returned.</p>
</div>
</div>
<div class="tags">
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
124</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'rdoc-sources/FXSettings.rb', line 124</span>
<span class='kw'>def</span> <span class='id identifier rubyid_readBoolEntry'>readBoolEntry</span><span class='lparen'>(</span><span class='id identifier rubyid_section'>section</span><span class='comma'>,</span> <span class='id identifier rubyid_key'>key</span><span class='comma'>,</span> <span class='id identifier rubyid_default'>default</span><span class='op'>=</span><span class='kw'>false</span><span class='rparen'>)</span> <span class='semicolon'>;</span> <span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<div class="method_details ">
<h3 class="signature " id="readColorEntry-instance_method">
#<strong>readColorEntry</strong>(section, key, default = 0) ⇒ <tt>Object</tt>
</h3><div class="docstring">
<div class="discussion">
<p>Read a color value registry entry from the specified <em>section</em> and <em>key</em>. If no value is found, the <em>default</em> value is returned.</p>
<h4 id="label-Parameters-3A">Parameters:</h4>
<dl class="rdoc-list note-list"><dt><code>section</code>
<dd>
<p>the section name [String]</p>
</dd><dt><code>key</code>
<dd>
<p>the key for the setting of interest [String]</p>
</dd><dt><code>default</code>
<dd>
<p>the default value to return if <em>key</em> is not found <span class='object_link'><a href="FXColor.html" title="Fox::FXColor (class)">Fox::FXColor</a></span></p>
</dd></dl>
</div>
</div>
<div class="tags">
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
112</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'rdoc-sources/FXSettings.rb', line 112</span>
<span class='kw'>def</span> <span class='id identifier rubyid_readColorEntry'>readColorEntry</span><span class='lparen'>(</span><span class='id identifier rubyid_section'>section</span><span class='comma'>,</span> <span class='id identifier rubyid_key'>key</span><span class='comma'>,</span> <span class='id identifier rubyid_default'>default</span><span class='op'>=</span><span class='int'>0</span><span class='rparen'>)</span> <span class='semicolon'>;</span> <span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<div class="method_details ">
<h3 class="signature " id="readIntEntry-instance_method">
#<strong>readIntEntry</strong>(section, key, default = 0) ⇒ <tt>Object</tt>
</h3><div class="docstring">
<div class="discussion">
<p>Read an integer registry entry from the specified <em>section</em> and <em>key</em>. If no value is found, the <em>default</em> value is returned.</p>
<h4 id="label-Parameters-3A">Parameters:</h4>
<dl class="rdoc-list note-list"><dt><code>section</code>
<dd>
<p>the section name [String]</p>
</dd><dt><code>key</code>
<dd>
<p>the key for the setting of interest [String]</p>
</dd><dt><code>default</code>
<dd>
<p>the default value to return if <em>key</em> is not found [Integer]</p>
</dd></dl>
</div>
</div>
<div class="tags">
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
76</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'rdoc-sources/FXSettings.rb', line 76</span>
<span class='kw'>def</span> <span class='id identifier rubyid_readIntEntry'>readIntEntry</span><span class='lparen'>(</span><span class='id identifier rubyid_section'>section</span><span class='comma'>,</span> <span class='id identifier rubyid_key'>key</span><span class='comma'>,</span> <span class='id identifier rubyid_default'>default</span><span class='op'>=</span><span class='int'>0</span><span class='rparen'>)</span> <span class='semicolon'>;</span> <span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<div class="method_details ">
<h3 class="signature " id="readRealEntry-instance_method">
#<strong>readRealEntry</strong>(section, key, default = 0.0) ⇒ <tt>Object</tt>
</h3><div class="docstring">
<div class="discussion">
<p>Read a double-precision floating point registry entry from the specified <em>section</em> and <em>key</em>. If no value is found, the <em>default</em> value is returned.</p>
<h4 id="label-Parameters-3A">Parameters:</h4>
<dl class="rdoc-list note-list"><dt><code>section</code>
<dd>
<p>the section name [String]</p>
</dd><dt><code>key</code>
<dd>
<p>the key for the setting of interest [String]</p>
</dd><dt><code>default</code>
<dd>
<p>the default value to return if <em>key</em> is not found [Float]</p>
</dd></dl>
</div>
</div>
<div class="tags">
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
100</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'rdoc-sources/FXSettings.rb', line 100</span>
<span class='kw'>def</span> <span class='id identifier rubyid_readRealEntry'>readRealEntry</span><span class='lparen'>(</span><span class='id identifier rubyid_section'>section</span><span class='comma'>,</span> <span class='id identifier rubyid_key'>key</span><span class='comma'>,</span> <span class='id identifier rubyid_default'>default</span><span class='op'>=</span><span class='float'>0.0</span><span class='rparen'>)</span> <span class='semicolon'>;</span> <span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<div class="method_details ">
<h3 class="signature " id="readStringEntry-instance_method">
#<strong>readStringEntry</strong>(section, key, default = "") ⇒ <tt>Object</tt>
</h3><div class="docstring">
<div class="discussion">
<p>Read a string registry entry from the specified <em>section</em> and <em>key</em>. If no value is found, the <em>default</em> value is returned.</p>
<h4 id="label-Parameters-3A">Parameters:</h4>
<dl class="rdoc-list note-list"><dt><code>section</code>
<dd>
<p>the section name [String]</p>
</dd><dt><code>key</code>
<dd>
<p>the key for the setting of interest [String]</p>
</dd><dt><code>default</code>
<dd>
<p>the default value to return if <em>key</em> is not found [String]</p>
</dd></dl>
</div>
</div>
<div class="tags">
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
64</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'rdoc-sources/FXSettings.rb', line 64</span>
<span class='kw'>def</span> <span class='id identifier rubyid_readStringEntry'>readStringEntry</span><span class='lparen'>(</span><span class='id identifier rubyid_section'>section</span><span class='comma'>,</span> <span class='id identifier rubyid_key'>key</span><span class='comma'>,</span> <span class='id identifier rubyid_default'>default</span><span class='op'>=</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span> <span class='semicolon'>;</span> <span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<div class="method_details ">
<h3 class="signature " id="readUnsignedEntry-instance_method">
#<strong>readUnsignedEntry</strong>(section, key, default = 0) ⇒ <tt>Object</tt>
</h3><div class="docstring">
<div class="discussion">
<p>Read an unsigned integer registry entry from the specified <em>section</em> and <em>key</em>. If no value is found, the <em>default</em> value is returned.</p>
<h4 id="label-Parameters-3A">Parameters:</h4>
<dl class="rdoc-list note-list"><dt><code>section</code>
<dd>
<p>the section name [String]</p>
</dd><dt><code>key</code>
<dd>
<p>the key for the setting of interest [String]</p>
</dd><dt><code>default</code>
<dd>
<p>the default value to return if <em>key</em> is not found [Integer]</p>
</dd></dl>
</div>
</div>
<div class="tags">
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
88</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'rdoc-sources/FXSettings.rb', line 88</span>
<span class='kw'>def</span> <span class='id identifier rubyid_readUnsignedEntry'>readUnsignedEntry</span><span class='lparen'>(</span><span class='id identifier rubyid_section'>section</span><span class='comma'>,</span> <span class='id identifier rubyid_key'>key</span><span class='comma'>,</span> <span class='id identifier rubyid_default'>default</span><span class='op'>=</span><span class='int'>0</span><span class='rparen'>)</span> <span class='semicolon'>;</span> <span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<div class="method_details ">
<h3 class="signature " id="unparseFile-instance_method">
#<strong>unparseFile</strong>(filename) ⇒ <tt>Object</tt>
</h3><div class="docstring">
<div class="discussion">
<p>Unparse settings database into given file. Returns true on success, false otherwise.</p>
</div>
</div>
<div class="tags">
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
26</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'rdoc-sources/FXSettings.rb', line 26</span>
<span class='kw'>def</span> <span class='id identifier rubyid_unparseFile'>unparseFile</span><span class='lparen'>(</span><span class='id identifier rubyid_filename'>filename</span><span class='rparen'>)</span> <span class='semicolon'>;</span> <span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<div class="method_details ">
<h3 class="signature " id="writeBoolEntry-instance_method">
#<strong>writeBoolEntry</strong>(section, key, value) ⇒ <tt>Object</tt>
</h3><div class="docstring">
<div class="discussion">
<p>Write a boolean registry <em>value</em> to the specified <em>section</em> and <em>key</em>.</p>
</div>
</div>
<div class="tags">
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
196</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'rdoc-sources/FXSettings.rb', line 196</span>
<span class='kw'>def</span> <span class='id identifier rubyid_writeBoolEntry'>writeBoolEntry</span><span class='lparen'>(</span><span class='id identifier rubyid_section'>section</span><span class='comma'>,</span> <span class='id identifier rubyid_key'>key</span><span class='comma'>,</span> <span class='id identifier rubyid_value'>value</span><span class='rparen'>)</span> <span class='semicolon'>;</span> <span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<div class="method_details ">
<h3 class="signature " id="writeColorEntry-instance_method">
#<strong>writeColorEntry</strong>(section, key, value) ⇒ <tt>Object</tt>
</h3><div class="docstring">
<div class="discussion">
<p>Write a color registry <em>value</em> to the specified <em>section</em> and <em>key</em>. Returns true on success, false otherwise.</p>
<h4 id="label-Parameters-3A">Parameters:</h4>
<dl class="rdoc-list note-list"><dt><code>section</code>
<dd>
<p>the section name [String]</p>
</dd><dt><code>key</code>
<dd>
<p>the key for this setting [String]</p>
</dd><dt><code>value</code>
<dd>
<p>the value for this setting <span class='object_link'><a href="FXColor.html" title="Fox::FXColor (class)">Fox::FXColor</a></span></p>
</dd></dl>
</div>
</div>
<div class="tags">
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
184</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'rdoc-sources/FXSettings.rb', line 184</span>
<span class='kw'>def</span> <span class='id identifier rubyid_writeColorEntry'>writeColorEntry</span><span class='lparen'>(</span><span class='id identifier rubyid_section'>section</span><span class='comma'>,</span> <span class='id identifier rubyid_key'>key</span><span class='comma'>,</span> <span class='id identifier rubyid_value'>value</span><span class='rparen'>)</span> <span class='semicolon'>;</span> <span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<div class="method_details ">
<h3 class="signature " id="writeIntEntry-instance_method">
#<strong>writeIntEntry</strong>(section, key, value) ⇒ <tt>Object</tt>
</h3><div class="docstring">
<div class="discussion">
<p>Write an integer registry <em>value</em> to the specified <em>section</em> and <em>key</em>. Returns true on success, false otherwise.</p>
<h4 id="label-Parameters-3A">Parameters:</h4>
<dl class="rdoc-list note-list"><dt><code>section</code>
<dd>
<p>the section name [String]</p>
</dd><dt><code>key</code>
<dd>
<p>the key for this setting [String]</p>
</dd><dt><code>value</code>
<dd>
<p>the value for this setting [Integer]</p>
</dd></dl>
</div>
</div>
<div class="tags">
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
148</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'rdoc-sources/FXSettings.rb', line 148</span>
<span class='kw'>def</span> <span class='id identifier rubyid_writeIntEntry'>writeIntEntry</span><span class='lparen'>(</span><span class='id identifier rubyid_section'>section</span><span class='comma'>,</span> <span class='id identifier rubyid_key'>key</span><span class='comma'>,</span> <span class='id identifier rubyid_value'>value</span><span class='rparen'>)</span> <span class='semicolon'>;</span> <span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<div class="method_details ">
<h3 class="signature " id="writeRealEntry-instance_method">
#<strong>writeRealEntry</strong>(section, key, value) ⇒ <tt>Object</tt>
</h3><div class="docstring">
<div class="discussion">
<p>Write a double-precision floating point registry <em>value</em> to the specified <em>section</em> and <em>key</em>. Returns true on success, false otherwise.</p>
<h4 id="label-Parameters-3A">Parameters:</h4>
<dl class="rdoc-list note-list"><dt><code>section</code>
<dd>
<p>the section name [String]</p>
</dd><dt><code>key</code>
<dd>
<p>the key for this setting [String]</p>
</dd><dt><code>value</code>
<dd>
<p>the value for this setting [Float]</p>
</dd></dl>
</div>
</div>
<div class="tags">
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
172</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'rdoc-sources/FXSettings.rb', line 172</span>
<span class='kw'>def</span> <span class='id identifier rubyid_writeRealEntry'>writeRealEntry</span><span class='lparen'>(</span><span class='id identifier rubyid_section'>section</span><span class='comma'>,</span> <span class='id identifier rubyid_key'>key</span><span class='comma'>,</span> <span class='id identifier rubyid_value'>value</span><span class='rparen'>)</span> <span class='semicolon'>;</span> <span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<div class="method_details ">
<h3 class="signature " id="writeStringEntry-instance_method">
#<strong>writeStringEntry</strong>(section, key, value) ⇒ <tt>Object</tt>
</h3><div class="docstring">
<div class="discussion">
<p>Write a string registry <em>value</em> to the specified <em>section</em> and <em>key</em>. Returns true on success, false otherwise.</p>
<h4 id="label-Parameters-3A">Parameters:</h4>
<dl class="rdoc-list note-list"><dt><code>section</code>
<dd>
<p>the section name [String]</p>
</dd><dt><code>key</code>
<dd>
<p>the key for this setting [String]</p>
</dd><dt><code>value</code>
<dd>
<p>the value for this setting [String]</p>
</dd></dl>
</div>
</div>
<div class="tags">
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
136</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'rdoc-sources/FXSettings.rb', line 136</span>
<span class='kw'>def</span> <span class='id identifier rubyid_writeStringEntry'>writeStringEntry</span><span class='lparen'>(</span><span class='id identifier rubyid_section'>section</span><span class='comma'>,</span> <span class='id identifier rubyid_key'>key</span><span class='comma'>,</span> <span class='id identifier rubyid_value'>value</span><span class='rparen'>)</span> <span class='semicolon'>;</span> <span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<div class="method_details ">
<h3 class="signature " id="writeUnsignedEntry-instance_method">
#<strong>writeUnsignedEntry</strong>(section, key, value) ⇒ <tt>Object</tt>
</h3><div class="docstring">
<div class="discussion">
<p>Write an unsigned integer registry <em>value</em> to the specified <em>section</em> and <em>key</em>. Returns true on success, false otherwise.</p>
<h4 id="label-Parameters-3A">Parameters:</h4>
<dl class="rdoc-list note-list"><dt><code>section</code>
<dd>
<p>the section name [String]</p>
</dd><dt><code>key</code>
<dd>
<p>the key for this setting [String]</p>
</dd><dt><code>value</code>
<dd>
<p>the value for this setting [Integer]</p>
</dd></dl>
</div>
</div>
<div class="tags">
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
160</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'rdoc-sources/FXSettings.rb', line 160</span>
<span class='kw'>def</span> <span class='id identifier rubyid_writeUnsignedEntry'>writeUnsignedEntry</span><span class='lparen'>(</span><span class='id identifier rubyid_section'>section</span><span class='comma'>,</span> <span class='id identifier rubyid_key'>key</span><span class='comma'>,</span> <span class='id identifier rubyid_value'>value</span><span class='rparen'>)</span> <span class='semicolon'>;</span> <span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
</div>
</div>
<div id="footer">
Generated on Mon Jan 2 11:47:44 2023 by
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.9.28 (ruby-3.1.2).
</div>
</div>
</body>
</html>