Skip to content

Commit

Permalink
deploy: db76d2a
Browse files Browse the repository at this point in the history
  • Loading branch information
forntoh committed Oct 7, 2024
1 parent bb76f97 commit 213a766
Show file tree
Hide file tree
Showing 15 changed files with 101 additions and 255 deletions.
2 changes: 1 addition & 1 deletion overview/control/button.html
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ <h1>Button Adapter<a class="headerlink" href="#button-adapter" title="Link to th
</span></code></pre></div>
</div>
<p>The ButtonAdapter will take care of translating the physical button presses into menu controls, allowing you to navigate through the menu system with ease.</p>
<p>For more information about the ButtonAdapter, check the <a class="reference internal" href="../../reference/api/input/ButtonAdapter.html"><span class="doc">API reference</span></a>.</p>
<p>For more information about the ButtonAdapter, check the <a class="reference internal" href="../../reference/api/input/ButtonAdapter.html#_CPPv413ButtonAdapter" title="ButtonAdapter"><code class="xref cpp cpp-class docutils literal notranslate"><span class="pre">API</span> <span class="pre">reference</span></code></a>.</p>
</section>
</div><div class="flex justify-between items-center pt-6 mt-12 border-t border-border gap-4">
<div class="mr-auto">
Expand Down
2 changes: 1 addition & 1 deletion overview/control/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ <h1>Controlling the menu<a class="headerlink" href="#controlling-the-menu" title
<p><strong>UP/DOWN</strong> and <strong>ENTER</strong> are the most commonly used controls, as they allow you to navigate through the menu structure and select items.
The other controls are used in specific scenarios, such as when you need to adjust a value in an input item or delete characters in an input field.
The back control can be bound to a menu item, allowing you to navigate back to the previous menu screen without having to use a dedicated “Back” button.</p>
<p>You can perform an action on the menu by calling the <code class="docutils literal notranslate"><span class="pre">process(cmd)</span></code> method on the menu object, where <code class="docutils literal notranslate"><span class="pre">cmd</span></code> is the control command you want to execute.
<p>You can perform an action on the menu by calling the <a class="reference internal" href="../../reference/api/LcdMenu.html#_CPPv4N7LcdMenu7processEKh" title="LcdMenu::process"><code class="xref cpp cpp-func docutils literal notranslate"><span class="pre">LcdMenu::process()</span></code></a> method on the menu object and pass the command you want to execute.
For example, to move the selection down in the menu, you can call <code class="docutils literal notranslate"><span class="pre">menu.process(DOWN)</span></code>.</p>
<p>Luckily, you don’t have to worry about implementing these controls yourself.
The menu system takes care of handling the controls and updating the menu state accordingly with the help of input adapters.
Expand Down
2 changes: 1 addition & 1 deletion overview/control/keyboard.html
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ <h1>Keyboard Adapter<a class="headerlink" href="#keyboard-adapter" title="Link t
</span></code></pre></div>
</div>
<p>The <code class="docutils literal notranslate"><span class="pre">KeyboardAdapter</span></code> will take care of translating the keyboard inputs into menu controls, allowing you to navigate through the menu system with ease.</p>
<p>For more information about the <code class="docutils literal notranslate"><span class="pre">KeyboardAdapter</span></code>, check the <a class="reference internal" href="../../reference/api/input/KeyboardAdapter.html"><span class="doc">API reference</span></a>.</p>
<p>For more information about the <code class="docutils literal notranslate"><span class="pre">KeyboardAdapter</span></code>, check the <a class="reference internal" href="../../reference/api/input/KeyboardAdapter.html#_CPPv415KeyboardAdapter" title="KeyboardAdapter"><code class="xref cpp cpp-class docutils literal notranslate"><span class="pre">API</span> <span class="pre">reference</span></code></a>.</p>
</section>
</div><div class="flex justify-between items-center pt-6 mt-12 border-t border-border gap-4">
<div class="mr-auto">
Expand Down
2 changes: 1 addition & 1 deletion overview/control/rotary-encoder.html
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ <h1>Rotary Encoder Adapter<a class="headerlink" href="#rotary-encoder-adapter" t
</span></code></pre></div>
</div>
<p>The <code class="docutils literal notranslate"><span class="pre">SimpleRotaryAdapter</span></code> will take care of translating the rotary encoder movements into menu controls, allowing you to navigate through the menu system with ease.</p>
<p>For more information about the <code class="docutils literal notranslate"><span class="pre">SimpleRotaryAdapter</span></code>, check the <a class="reference internal" href="../../reference/api/input/SimpleRotaryAdapter.html"><span class="doc">API reference</span></a>.</p>
<p>For more information about the <code class="docutils literal notranslate"><span class="pre">SimpleRotaryAdapter</span></code>, check the <a class="reference internal" href="../../reference/api/input/SimpleRotaryAdapter.html#_CPPv419SimpleRotaryAdapter" title="SimpleRotaryAdapter"><code class="xref cpp cpp-class docutils literal notranslate"><span class="pre">API</span> <span class="pre">reference</span></code></a>.</p>
</section>
</div><div class="flex justify-between items-center pt-6 mt-12 border-t border-border gap-4">
<div class="mr-auto">
Expand Down
2 changes: 1 addition & 1 deletion overview/items/basic.html
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ <h1>Basic menu item<a class="headerlink" href="#basic-menu-item" title="Link to
<p>This is how a basic menu item is rendered on a 16x2 LCD screen:</p>
<a class="reference internal image-reference" href="../../_images/item-basic.png"><img alt="Basic menu item" src="../../_images/item-basic.png" style="width: 400px;"/>
</a>
<p>Find more information about the basic menu item in the <a class="reference internal" href="../../reference/api/MenuItem.html"><span class="doc">API reference</span></a>.</p>
<p>Find more information about the basic menu item in the <a class="reference internal" href="../../reference/api/MenuItem.html#_CPPv48MenuItem" title="MenuItem"><code class="xref cpp cpp-class docutils literal notranslate"><span class="pre">API</span> <span class="pre">reference</span></code></a>.</p>
</section>
</div><div class="flex justify-between items-center pt-6 mt-12 border-t border-border gap-4">
<div class="mr-auto">
Expand Down
4 changes: 2 additions & 2 deletions overview/items/command.html
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ <h3>Example<a class="headerlink" href="#example" title="Link to this heading" x-
</span></code></pre></div>
</div>
<p>When the “Back” menu item is selected, the menu will navigate back to the previous screen.</p>
<p>Find more information about the command menu item <a class="reference internal" href="../../reference/api/ItemCommand.html"><span class="doc">here</span></a> and the back menu item <a class="reference internal" href="../../reference/api/ItemBack.html"><span class="doc">here</span></a>.</p>
<p>Find more information about the command menu item <a class="reference internal" href="../../reference/api/ItemCommand.html#_CPPv411ItemCommand" title="ItemCommand"><code class="xref cpp cpp-class docutils literal notranslate"><span class="pre">here</span></code></a> and the back menu item <a class="reference internal" href="../../reference/api/ItemBack.html#_CPPv48ItemBack" title="ItemBack"><code class="xref cpp cpp-class docutils literal notranslate"><span class="pre">here</span></code></a>.</p>
</section>
</section>
<section id="toggle-menu-item">
Expand All @@ -285,7 +285,7 @@ <h2>Toggle menu item<a class="headerlink" href="#toggle-menu-item" title="Link t
</span></code></pre></div>
</div>
<p>The toggle command menu item takes a lambda function that accepts a boolean parameter representing the current state of the item.
There are other ways to create a toggle command menu item, check the <a class="reference internal" href="../../reference/api/ItemToggle.html"><span class="doc">API reference</span></a> for more information.</p>
There are other ways to create a toggle command menu item, check the <a class="reference internal" href="../../reference/api/ItemToggle.html#_CPPv410ItemToggle" title="ItemToggle"><code class="xref cpp cpp-class docutils literal notranslate"><span class="pre">API</span> <span class="pre">reference</span></code></a> for more information.</p>
<section id="id1">
<h3>Example<a class="headerlink" href="#id1" title="Link to this heading" x-intersect.margin.0%.0%.-70%.0%="activeSection = '#id1'"><svg height="1em" viewbox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><path d="M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5z"></path></svg></a></h3>
<p>Let’s take a look at an example of a toggle command menu item that toggles an LED on and off when selected:</p>
Expand Down
2 changes: 1 addition & 1 deletion overview/items/input-charset.html
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ <h1>Charset input item<a class="headerlink" href="#charset-input-item" title="Li
<a class="reference internal image-reference" href="../../_images/item-charset-input.gif"><img alt="Example of a charset input menu item" src="../../_images/item-charset-input.gif" style="width: 400px;"/>
</a>
<p>You can create multiple charset input items in the same menu screen, each with its own label, default value, and charset.</p>
<p>For more information about the charset input item, check the <a class="reference internal" href="../../reference/api/ItemInputCharset.html"><span class="doc">API reference</span></a>.</p>
<p>For more information about the charset input item, check the <a class="reference internal" href="../../reference/api/ItemInputCharset.html#_CPPv416ItemInputCharset" title="ItemInputCharset"><code class="xref cpp cpp-class docutils literal notranslate"><span class="pre">API</span> <span class="pre">reference</span></code></a>.</p>
</section>
</div><div class="flex justify-between items-center pt-6 mt-12 border-t border-border gap-4">
<div class="mr-auto">
Expand Down
2 changes: 1 addition & 1 deletion overview/items/input.html
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ <h1>Input item<a class="headerlink" href="#input-item" title="Link to this headi
</span><span id="line-11"><span class="p">};</span>
</span></code></pre></div>
</div>
<p>For more information about the input item, check the <a class="reference internal" href="../../reference/api/ItemInput.html"><span class="doc">API reference</span></a>.</p>
<p>For more information about the input item, check the <a class="reference internal" href="../../reference/api/ItemInput.html#_CPPv49ItemInput" title="ItemInput"><code class="xref cpp cpp-class docutils literal notranslate"><span class="pre">API</span> <span class="pre">reference</span></code></a>.</p>
</section>
</div><div class="flex justify-between items-center pt-6 mt-12 border-t border-border gap-4">
<div class="mr-auto">
Expand Down
2 changes: 1 addition & 1 deletion overview/items/list.html
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ <h1>List menu item<a class="headerlink" href="#list-menu-item" title="Link to th
<a class="reference internal image-reference" href="../../_images/item-list.gif"><img alt="Example of a list menu item" src="../../_images/item-list.gif" style="width: 400px;"/>
</a>
<p>You can create multiple list menu items in the same menu screen, each with its own list of items.</p>
<p>Find more information about the list menu item in the <a class="reference internal" href="../../reference/api/ItemList.html"><span class="doc">API reference</span></a>.</p>
<p>Find more information about the list menu item in the <a class="reference internal" href="../../reference/api/ItemList.html#_CPPv48ItemList" title="ItemList"><code class="xref cpp cpp-class docutils literal notranslate"><span class="pre">API</span> <span class="pre">reference</span></code></a>.</p>
</section>
</div><div class="flex justify-between items-center pt-6 mt-12 border-t border-border gap-4">
<div class="mr-auto">
Expand Down
2 changes: 1 addition & 1 deletion overview/items/range.html
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ <h2>Float range<a class="headerlink" href="#float-range" title="Link to this hea
<p>The default behavior is to commit the value only when the user exits the item.
Check the API reference for more information on how to configure this behavior.</p>
</div>
<p>Find more information about the range menu item in the <a class="reference internal" href="../../reference/api/ItemFloatRange.html"><span class="doc">API reference</span></a>.</p>
<p>Find more information about the range menu item in the <a class="reference internal" href="../../reference/api/ItemFloatRange.html#_CPPv414ItemFloatRange" title="ItemFloatRange"><code class="xref cpp cpp-class docutils literal notranslate"><span class="pre">API</span> <span class="pre">reference</span></code></a>.</p>
</section>
</section>
</div><div class="flex justify-between items-center pt-6 mt-12 border-t border-border gap-4">
Expand Down
2 changes: 1 addition & 1 deletion overview/items/submenu.html
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ <h1>Sub-menu item<a class="headerlink" href="#sub-menu-item" title="Link to this
<a class="reference internal image-reference" href="../../_images/item-submenu.gif"><img alt="Example of a sub-menu item" src="../../_images/item-submenu.gif" style="width: 400px;"/>
</a>
<p>You can create multiple levels of sub-menus by nesting sub-menu items within other sub-menu screens.</p>
<p>Find more information about the sub-menu item in the <a class="reference internal" href="../../reference/api/ItemSubMenu.html"><span class="doc">API reference</span></a>.</p>
<p>Find more information about the sub-menu item in the <a class="reference internal" href="../../reference/api/ItemSubMenu.html#_CPPv411ItemSubMenu" title="ItemSubMenu"><code class="xref cpp cpp-class docutils literal notranslate"><span class="pre">API</span> <span class="pre">reference</span></code></a>.</p>
</section>
</div><div class="flex justify-between items-center pt-6 mt-12 border-t border-border gap-4">
<div class="mr-auto">
Expand Down
8 changes: 3 additions & 5 deletions overview/rendering/character-display.html
Original file line number Diff line number Diff line change
Expand Up @@ -230,8 +230,8 @@ <h1>Character display renderer<a class="headerlink" href="#character-display-ren
<p>The renderer is easy to use and provides a number of options for customizing the display.</p>
<section id="how-to-use-the-character-display-renderer">
<h2>How to use the character display renderer<a class="headerlink" href="#how-to-use-the-character-display-renderer" title="Link to this heading" x-intersect.margin.0%.0%.-70%.0%="activeSection = '#how-to-use-the-character-display-renderer'"><svg height="1em" viewbox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><path d="M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5z"></path></svg></a></h2>
<p>To use the character display renderer, you need to create an instance of the <code class="docutils literal notranslate"><span class="pre">CharacterDisplayRenderer</span></code> class and pass it
to the <code class="docutils literal notranslate"><span class="pre">LcdMenu</span></code> class when you create it. Here is an example:</p>
<p>To use the character display renderer, you need to create an instance of the <a class="reference internal" href="../../reference/api/renderer/CharacterDisplayRenderer.html#_CPPv424CharacterDisplayRenderer" title="CharacterDisplayRenderer"><code class="xref cpp cpp-class docutils literal notranslate"><span class="pre">CharacterDisplayRenderer</span></code></a> class and pass it
to the <a class="reference internal" href="../../reference/api/LcdMenu.html#_CPPv47LcdMenu" title="LcdMenu"><code class="xref cpp cpp-class docutils literal notranslate"><span class="pre">LcdMenu</span></code></a> class when you create it. Here is an example:</p>
<div class="sd-tab-set docutils">
<input checked="checked" id="sd-tab-item-0" name="sd-tab-set-0" type="radio"/>
<label class="sd-tab-label" data-sync-group="display" data-sync-id="lcd_i2c" for="sd-tab-item-0">
Expand Down Expand Up @@ -364,11 +364,9 @@ <h3>Hide both the cursor and arrows<a class="headerlink" href="#hide-both-the-cu
</span><span id="line-12"><span class="w"> </span><span class="c1">// You can append a cursor character to the text if the item is selected etc.</span>
</span><span id="line-13"><span class="w"> </span><span class="p">}</span>
</span><span id="line-14"><span class="p">};</span>
</span><span id="line-15">
</span><span id="line-16"><span class="n">MyCustomRenderer</span><span class="w"> </span><span class="nf">renderer</span><span class="p">(</span><span class="o">&amp;</span><span class="n">lcdAdapter</span><span class="p">,</span><span class="w"> </span><span class="n">LCD_COLS</span><span class="p">,</span><span class="w"> </span><span class="n">LCD_ROWS</span><span class="p">);</span>
</span></code></pre></div>
</div>
<p>Find more information about the character display renderer in the <a class="reference internal" href="../../reference/api/renderer/CharacterDisplayRenderer.html"><span class="doc">API reference</span></a>.</p>
<p>Find more information about the character display renderer in the <a class="reference internal" href="../../reference/api/renderer/CharacterDisplayRenderer.html#_CPPv424CharacterDisplayRenderer" title="CharacterDisplayRenderer"><code class="xref cpp cpp-class docutils literal notranslate"><span class="pre">API</span> <span class="pre">reference</span></code></a>.</p>
</section>
</section>
</section>
Expand Down
4 changes: 4 additions & 0 deletions overview/rendering/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,10 @@ <h1>Rendering the menu<a class="headerlink" href="#rendering-the-menu" title="Li
The renderers are responsible for drawing the menu items on the screen. They can be customized to suit your needs.</p>
<p>There are lots of opportunities to create your own custom renderer. You can create a renderer for any output device that you like.
For example, you could create a renderer for a TFT display, a touchscreen, or even a 3D printer 😄 (the frame rate would be atrocious)</p>
<div class="admonition hint">
<p class="admonition-title">Hint</p>
<p>Renderers can be helpful when you want to customize the appearance of the menu items, such as changing the font size, color, or layout.</p>
</div>
<div class="toctree-wrapper compound">
<p class="caption" role="heading"><span class="caption-text">The library comes with the following built-in renderers:</span></p>
<ul>
Expand Down
Loading

0 comments on commit 213a766

Please sign in to comment.