The Navigation module provides a vertical list of buttons for navigating the application. The number, text and assigned action of those buttons can be defined from a configuration file.
To use the navigation sidebar module, it must be started from the startup.vi
. For this, add it to the list of dynamically started modules in the config.ini
.
Example snippet:
[modules] ; paths are noted from the application base path ; (ie the path the startup.vi sits in) list = "Framework\Navigation;Modules\Dummy;Modules\ActorModule;Modules\StateMachine;Modules\DBModule" start = "Modules\Dummy"
The configuration is read from /<%appname%>_Config/UNIT_<%unit%>/Navigation.ini
.
[global] ; The descriptor is used for the VI's Front Panel Window titlebar ; and for the entries in the UI Manager's Run-Time Menu. descriptor = "Navigation" buttons_def = "Sidebar-Def_Template.json"
The value in buttons_def
points towards a file in the same directory as the configuration file containing the button definitions.
The first object top
contains an array of button definitions. Every button has the following properties:
config.ini
).{ "top": [ { "name": "btn_Dummy", "caption": "Dummy Module", "tooltip": "Show the Dummy module", "enabled_state": "Enabled", "action": "Modules\\Dummy", "display_scenario": "Stand-Alone", "sub": [] }, { "name": "btn_Actor", "caption": "Actor Module", "tooltip": "Show the Actor module", "enabled_state": "Enabled", "action": "Modules\\ActorModule", "display_scenario": "Managed", "sub": [ { "name": "lb_actorstate", "tooltip": "Actor State", "enabled_state": "Disabled", "content": [ "Display Value 1/3", "Display Value 2/3", "Display Value 3/3" ], "retain value": true } ] }, { "name": "btn_Action", "caption": "Actor Module Actions", "tooltip": "Trigger actions in Actor Module", "enabled_state": "Enabled", "action": "triggerAction", "_display_scenario_comment": "do not request the module to display itself", "display_scenario": "None", "_sub_comment": "define sub items of the button" "sub": [ { "name": "lb_actoractions", "tooltip": "Available Actions", "enabled_state": "Enabled", "content": [ "Reset Timer", "Enable Timeout Event", "Disable Timeout Event", "Register for Broadcasts", "Unregister from Broadcasts" ], "retain value":false } ] } ] }