Skip to content

Commit

Permalink
Update API references to use C++ syntax for better clarity and consis…
Browse files Browse the repository at this point in the history
…tency (#237)

- Updated references to API classes in various documentation files to
use C++ syntax for clarity and consistency.
- Replaced references using `:doc:` with `:cpp:class:` for API classes
in the documentation.
  • Loading branch information
forntoh authored Oct 7, 2024
2 parents 7f36658 + 1c9bc82 commit 00053e6
Show file tree
Hide file tree
Showing 13 changed files with 19 additions and 17 deletions.
2 changes: 1 addition & 1 deletion docs/source/overview/control/button.rst
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,4 @@ Finally, you need to observe the ButtonAdapter object in the loop function:
The ButtonAdapter will take care of translating the physical button presses into menu controls, allowing you to navigate through the menu system with ease.

For more information about the ButtonAdapter, check the :doc:`API reference </reference/api/input/ButtonAdapter>`.
For more information about the ButtonAdapter, check the :cpp:class:`API reference <ButtonAdapter>`.
2 changes: 1 addition & 1 deletion docs/source/overview/control/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Here are some of the built-in controls that you can use to navigate through the
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.

You can perform an action on the menu by calling the ``process(cmd)`` method on the menu object, where ``cmd`` is the control command you want to execute.
You can perform an action on the menu by calling the :cpp:func:`LcdMenu::process` 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 ``menu.process(DOWN)``.

Luckily, you don't have to worry about implementing these controls yourself.
Expand Down
2 changes: 1 addition & 1 deletion docs/source/overview/control/keyboard.rst
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,4 @@ Finally, you need to observe the KeyboardAdapter object in the loop function:
The ``KeyboardAdapter`` will take care of translating the keyboard inputs into menu controls, allowing you to navigate through the menu system with ease.

For more information about the ``KeyboardAdapter``, check the :doc:`API reference </reference/api/input/KeyboardAdapter>`.
For more information about the ``KeyboardAdapter``, check the :cpp:class:`API reference <KeyboardAdapter>`.
2 changes: 1 addition & 1 deletion docs/source/overview/control/rotary-encoder.rst
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,4 @@ Finally, you need to observe the SimpleRotaryAdapter object in the loop function
The ``SimpleRotaryAdapter`` will take care of translating the rotary encoder movements into menu controls, allowing you to navigate through the menu system with ease.

For more information about the ``SimpleRotaryAdapter``, check the :doc:`API reference </reference/api/input/SimpleRotaryAdapter>`.
For more information about the ``SimpleRotaryAdapter``, check the :cpp:class:`API reference <SimpleRotaryAdapter>`.
2 changes: 1 addition & 1 deletion docs/source/overview/items/basic.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ This is how a basic menu item is rendered on a 16x2 LCD screen:
:width: 400px
:alt: Basic menu item

Find more information about the basic menu item in the :doc:`API reference </reference/api/MenuItem>`.
Find more information about the basic menu item in the :cpp:class:`API reference <MenuItem>`.
4 changes: 2 additions & 2 deletions docs/source/overview/items/command.rst
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ This is useful when you don't have a dedicated "Back" input button on your setup
When the "Back" menu item is selected, the menu will navigate back to the previous screen.

Find more information about the command menu item :doc:`here </reference/api/ItemCommand>` and the back menu item :doc:`here </reference/api/ItemBack>`.
Find more information about the command menu item :cpp:class:`here <ItemCommand>` and the back menu item :cpp:class:`here <ItemBack>`.

Toggle menu item
~~~~~~~~~~~~~~~~
Expand All @@ -84,7 +84,7 @@ A toggle command menu item can be created using the following syntax:
})
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 :doc:`API reference </reference/api/ItemToggle>` for more information.
There are other ways to create a toggle command menu item, check the :cpp:class:`API reference <ItemToggle>` for more information.

Example
+++++++
Expand Down
2 changes: 1 addition & 1 deletion docs/source/overview/items/input-charset.rst
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@ The input value will be restricted to the characters specified in the charset.

You can create multiple charset input items in the same menu screen, each with its own label, default value, and charset.

For more information about the charset input item, check the :doc:`API reference </reference/api/ItemInputCharset>`.
For more information about the charset input item, check the :cpp:class:`API reference <ItemInputCharset>`.
2 changes: 1 addition & 1 deletion docs/source/overview/items/input.rst
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,4 @@ This item can be further extended by creating a new class which inherits from ``
}
};
For more information about the input item, check the :doc:`API reference </reference/api/ItemInput>`.
For more information about the input item, check the :cpp:class:`API reference <ItemInput>`.
2 changes: 1 addition & 1 deletion docs/source/overview/items/list.rst
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@ When the ``List 1`` menu item is selected, the list of items will be displayed o

You can create multiple list menu items in the same menu screen, each with its own list of items.

Find more information about the list menu item in the :doc:`API reference </reference/api/ItemList>`.
Find more information about the list menu item in the :cpp:class:`API reference <ItemList>`.
2 changes: 1 addition & 1 deletion docs/source/overview/items/range.rst
Original file line number Diff line number Diff line change
Expand Up @@ -85,4 +85,4 @@ When the ``Dist`` menu item is selected, the user can adjust the pressure within
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.

Find more information about the range menu item in the :doc:`API reference </reference/api/ItemFloatRange>`.
Find more information about the range menu item in the :cpp:class:`API reference <ItemFloatRange>`.
2 changes: 1 addition & 1 deletion docs/source/overview/items/submenu.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ When the ``Sub-menu 1`` menu item is selected, the sub-menu screen will be displ

You can create multiple levels of sub-menus by nesting sub-menu items within other sub-menu screens.

Find more information about the sub-menu item in the :doc:`API reference </reference/api/ItemSubMenu>`.
Find more information about the sub-menu item in the :cpp:class:`API reference <ItemSubMenu>`.
8 changes: 3 additions & 5 deletions docs/source/overview/rendering/character-display.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ The renderer is easy to use and provides a number of options for customizing the
How to use the character display renderer
-----------------------------------------

To use the character display renderer, you need to create an instance of the ``CharacterDisplayRenderer`` class and pass it
to the ``LcdMenu`` class when you create it. Here is an example:
To use the character display renderer, you need to create an instance of the :cpp:class:`CharacterDisplayRenderer` class and pass it
to the :cpp:class:`LcdMenu` class when you create it. Here is an example:

.. tab-set::
:sync-group: display
Expand Down Expand Up @@ -180,6 +180,4 @@ Here is basic example of how to create a custom renderer:
}
};
MyCustomRenderer renderer(&lcdAdapter, LCD_COLS, LCD_ROWS);
Find more information about the character display renderer in the :doc:`API reference </reference/api/renderer/CharacterDisplayRenderer>`.
Find more information about the character display renderer in the :cpp:class:`API reference <CharacterDisplayRenderer>`.
4 changes: 4 additions & 0 deletions docs/source/overview/rendering/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ The renderers are responsible for drawing the menu items on the screen. They can
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)

.. hint::

Renderers can be helpful when you want to customize the appearance of the menu items, such as changing the font size, color, or layout.

.. toctree::
:maxdepth: 2
:caption: The library comes with the following built-in renderers:
Expand Down

0 comments on commit 00053e6

Please sign in to comment.