Skip to content

Commit

Permalink
make refdocs a shortcode
Browse files Browse the repository at this point in the history
  • Loading branch information
davetcc committed Sep 7, 2024
1 parent 5b3236f commit 63cfc36
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 23 deletions.
2 changes: 1 addition & 1 deletion config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ theme = "belter"
production = "N"
EnableAds = "N"
author = "TcMenu"
refDocsLocation = "https://tcmenu.github.io/documentation"
refDocsLocation = "https://tcmenu.github.io/documentation/refdocs"
gitEditURL = "https://github.com/TcMenu/documentation/tree/main/content"

[[menu.main]]
Expand Down
5 changes: 1 addition & 4 deletions content/arduino-libraries/tc-menu.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,11 @@ At the moment PicoSDK is available and does not need Arduino or mbed environment

### Specific for Java on Raspberry PI or embedded Linux

We have tested the designer application and embedCONTROL on a Raspberry PI, so not only can you make a Raspberry PI embedded application, you can even run designer and embedCONTROL on an RPI as well!
We have tested the designer application and embedCONTROL on a Raspberry PI, so not only can you make a Raspberry PI embedded application, you can even run designer and embedCONTROL on an RPI as well! The Java API and EmbedControl libraries are fully JavaDoc commented.

* [Creating an embedded Java menu application for RaspberryPI]({{< relref "menu-control-with-embedded-java.md" >}})
* [Display menu on JavaFX/OpenJDK on Raspberry PI]({{< relref "tcmenu-openjfx-raspberrypi-plugin.md" >}})
* [Menu In Menu - Embed remote menus into a single app]({{< relref "java-menu-in-menu.md" >}})
* [Java IoT API reference documentation](https://www.thecoderscorner.com/ref-docs/tcmenujavaapi/html/annotated.html)
* [embedCONTROL Core API reference documentation](https://www.thecoderscorner.com/ref-docs/embedcontrol-core/html/annotated.html)

## Display plugins

Expand Down Expand Up @@ -101,7 +99,6 @@ However, to write your own remote monitoring, use our [Java Remote API]({{< relr
* [embedCONTROL UI documentation](https://www.thecoderscorner.com/products/apps/embed-control/)
* [Menu library remote connectivity tutorial]({{< relref "menu-library-remote-connectivity.md" >}})
* [IoT monitoring and control using the Java API]({{< relref "tcmenu-java-api-to-arduino-remote-control.md" >}})
* [Java IoT API reference documentation](/ref-docs/tcmenujavaapi/html/index.html)
* [TagVal protocol documentation]({{< relref "embed-control-tagval-wire-protocol.md" >}})

### IoT and Remote control plugins
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@ Maven is used as the build system by default. It is set up automatically with th
All the classes discussed here are documented, a few key entry points into the reference docs are linked below. Note that this documentation is taken from the source, so most Java IDEs should show it.

* [Using the JavaAPI guide]({{< relref "tcmenu-java-api-to-arduino-remote-control.md">}})
* [JavaAPI ref docs](https://www.thecoderscorner.com/ref-docs/tcmenujavaapi/html/annotated.html)
* [embedCONTROLCore ref docs](https://www.thecoderscorner.com/ref-docs/embedcontrol-core/html/annotated.html)
* Consult the Java docs shipped with the API.

## Components of the application

Expand Down
10 changes: 5 additions & 5 deletions content/arduino-libraries/tc-menu/menumanager-and-iteration.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ toc_needed = true

`MenuManager` contains the functions to manage menu items, there is a global instance of this class called `menuMgr` on Arduino and mbed boards. Here we present the most commonly used features, check out the reference docs for more details. There are a lot of iteration helper functions that can be used to navigate through menu structures. These are described further down the page. The following two reference documentation pages extend on the information here:

* [Menu iteration reference docs](https://www.thecoderscorner.com/ref-docs/tcmenu/html/_menu_iterator_8h.html)
* [MenuManager reference docs](https://www.thecoderscorner.com/ref-docs/tcmenu/html/class_menu_manager.html)
* {{< refdocs title="Menu iteration reference docs" src="tcmenu/html/_menu_iterator_8h.html" >}}
* {{< refdocs title="MenuManager reference docs" src="tcmenu/html/class_menu_manager.html" >}}
* [EEPROM support in menus]({{< relref "menu-eeprom-integrations.md">}})

## Enabling next and back functionality
Expand Down Expand Up @@ -170,7 +170,7 @@ Note that either of the above methods use one of the callback spaces. There is a

**When using the designer, this code gets added automatically, this is to fully document the API.**

We initialise the menu manager as shown below, where renderer is a pointer to a renderer (or an instance of `NoRenderer`), root is the very first menu item and then this is followed by the pin used for either switches or the rotary encoder. Remember that pinA of the encoder must be an interrupt capable pin. If you're not using the designer, then the plugins for display and remote are available within the tcMenu code repo within the two plugin packages, or may be packaged with the embedded folder. Copy the required files into your sketch and make sure they are initialised. The full details are available in [the menu manager class documentation](https://www.thecoderscorner.com/ref-docs/tcmenu/html/class_menu_manager.html).
We initialise the menu manager as shown below, where renderer is a pointer to a renderer (or an instance of `NoRenderer`), root is the very first menu item and then this is followed by the pin used for either switches or the rotary encoder. Remember that pinA of the encoder must be an interrupt capable pin. If you're not using the designer, then the plugins for display and remote are available within the tcMenu code repo within the two plugin packages, or may be packaged with the embedded folder. Copy the required files into your sketch and make sure they are initialised. The full details are available in {{< refdocs title="the menu manager class documentation" src="tcmenu/html/class_menu_manager.html" >}}.

menuMgr.initForEncoder(MenuRenderer* renderer, MenuItem* root, uint8_t encoderPinA, uint8_t encoderPinB, uint8_t encoderButton);
menuMgr.initForUpDownOk(MenuRenderer* renderer, MenuItem* root, uint8_t upPin,
Expand Down Expand Up @@ -199,7 +199,7 @@ Above we see the menu manager surrounded by the components that make up a menu a

Most of the useful functions to iterate over menu items are within the following reference documentation page, we only document the most popular ones here, so it is worth checking this page too:

* [MenuIterator.h reference docs](https://www.thecoderscorner.com/ref-docs/tcmenu/html/_menu_iterator_8h.html)
* {{< refdocs title="MenuIterator.h reference docs" src="tcmenu/html/_menu_iterator_8h.html" >}}

### MenuItemIterator - non-recursive iteration of the tree

Expand Down Expand Up @@ -254,7 +254,7 @@ If you need to do the same thing to many menu items at the same time, certain op

Many of the boolean flags are supported for read and write, and also there is a method `onEachItem()` that gets called for items in the delegate.

Full documentation: https://www.thecoderscorner.com/ref-docs/tcmenu/html/classtccore_1_1_menu_item_delegate.html
Full documentation: {{< refdocs title="Menu Item Delegate docs" src="tcmenu/html/classtccore_1_1_menu_item_delegate.html" >}}

Examples:

Expand Down
1 change: 0 additions & 1 deletion content/arduino-libraries/tc-menu/tcmenu-cli-workflow.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ author = "dave"
menu = "tc-menu"
banner = "/products/arduino-libraries/images/electronics/arduino/tcMenu/tcmenu-cli-banner.jpg"
githublink = "https://github.com/TcMenu/tcMenu"
referenceDocs = "/ref-docs/tcmenujavaapi/html/index.html"
weight = 50
toc_needed = true
+++
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ menu = "tcmenu-iot"
banner = "/products/arduino-libraries/images/apps/embed-control/menu-in-menu.png"
titleimg = "/products/arduino-libraries/images/apps/embed-control/menu-in-menu.png"
githublink = "https://github.com/TcMenu/tcMenu"
referenceDocs = "https://www.thecoderscorner.com/ref-docs/tcmenujavaapi/html/index.html"
weight = 50
toc_needed = true
+++
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ menu = "tcmenu-iot"
banner = "/products/arduino-libraries/images/electronics/arduino/tcMenu/remote-ethernet-card.jpg"
titleimg = "/products/arduino-libraries/images/electronics/arduino/tcMenu/remote-ethernet-card.jpg"
githublink = "https://github.com/TcMenu/tcMenu"
referenceDocs = "/ref-docs/tcmenujavaapi/html/index.html"
weight = 50
toc_needed = true
aliases = ["/products/arduino-libraries/tc-menu/tcmenu-java-api-to-arduino-remote-control/"]
Expand Down Expand Up @@ -71,7 +70,7 @@ When you want to make a change to a remote value, you do not need to update the
There are two examples that you can look at to get started:

* [Standalone RS232 Example](https://github.com/TcMenu/tcMenu/blob/main/tcMenuJavaApi/src/test/java/com/thecoderscorner/menu/examples/StandaloneRs232Test.java)
* [Full reference documentation of the API](/ref-docs/tcmenujavaapi/index.html) (also packaged with the library in maven central).
* Consult the Java docs that are shipped with the API.

## Connecting remotely

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,16 +168,16 @@ Let's say we want an entire submenu to render with a different palette and adafr

To do the same for action items `themeBuilder.submenuPropertiesActionOverride()`.

* see [TcThemeBuilder docs](https://www.thecoderscorner.com/ref-docs/tcmenu/html/classtcgfx_1_1_tc_theme_builder.html)
* see [GridPosition docs](https://www.thecoderscorner.com/ref-docs/tcmenu/html/classtcgfx_1_1_grid_position.html)
* see the `addGridPosition` method in [ItemDisplayPropertiesFactory](https://www.thecoderscorner.com/ref-docs/tcmenu/html/classtcgfx_1_1_item_display_properties_factory.html)
* see {{< refdocs title="TcThemeBuilder docs" src="tcmenu/html/classtcgfx_1_1_tc_theme_builder.html" >}}
* see {{< refdocs title="GridPosition docs" src="tcmenu/html/classtcgfx_1_1_grid_position.html" >}}
* see the `addGridPosition` method in {{< refdocs title="ItemDisplayPropertiesFactory" src="tcmenu/html/classtcgfx_1_1_item_display_properties_factory.html" >}}

## Common structures and classes

Along with this overview, please see the reference documentation for more complete details, they will not be repeated here:

* [GfxMenuConfig.h documentation - core types](https://www.thecoderscorner.com/ref-docs/tcmenu/html/_gfx_menu_config_8h.html)
* [DrawingPrimitives.h documentation - core types](https://www.thecoderscorner.com/ref-docs/tcmenu/html/_drawing_primitives_8h.html)
* {{< refdocs title="GfxMenuConfig.h documentation" src="tcmenu/html/graphics_2_gfx_menu_config_8h.html" >}}
* {{< refdocs title="DrawingPrimitives.h documentation - core types" src="tcmenu/html/_drawing_primitives_8h.html" >}}

### struct Coord - coordinates

Expand Down Expand Up @@ -251,9 +251,9 @@ END FOR

## ItemPropertiesFactory and graphical displays (advanced)

Our flexible configuration based rendering is made possible by a display factory. The display factory stores all the grids, icons and drawing properties in high performance btree lists that are optimised for reading. Graphical displays nearly always have a [ConfigurableItemDisplayPropertiesFactory](https://www.thecoderscorner.com/ref-docs/tcmenu/html/classtcgfx_1_1_configurable_item_display_properties_factory.html) that can be obtained using `renderer.getGraphicsPropertiesFactory()`. The themes are always a good starting point for making adjustments to these values.
Our flexible configuration based rendering is made possible by a display factory. The display factory stores all the grids, icons and drawing properties in high performance btree lists that are optimised for reading. Graphical displays nearly always have a {{< refdocs title="ConfigurableItemDisplayPropertiesFactory" src=tcmenu/html/classtcgfx_1_1_configurable_item_display_properties_factory.html" >}} that can be obtained using `renderer.getGraphicsPropertiesFactory()`. The themes are always a good starting point for making adjustments to these values.

* [ItemDisplayProperties documentation](https://www.thecoderscorner.com/ref-docs/tcmenu/html/classtcgfx_1_1_item_display_properties.html)
* {{< refdocs title="ItemDisplayProperties documentation" src=tcmenu/html/classtcgfx_1_1_item_display_properties.html" >}}


## The properties cache in more detail (advanced)
Expand Down
1 change: 1 addition & 0 deletions layouts/shortcodes/refdocs.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<a href="{{ .Site.Params.refDocsLocation }}/{{ .Get "src" }}">{{ .Get "title" }}</a>

0 comments on commit 63cfc36

Please sign in to comment.