Ignition Gui

API Reference

4.2.0
Config

Next Tutorial: Layout

Configuration files

Ignition GUI supports loading XML configuration files that define what the window should look like and which plugins should be loaded.

Loading

By default, Ignition GUI will load the config file at $HOME/.ignition/gui/default.config, if it exists.

Configuration files can also be loaded from the command line or through the C++ API.

From the command line, use the --config / -c option, for example:

ign gui -c path/to/example.config

From the C++ API, pass the file path to Application::LoadConfig.

File structure

Ignition GUI accepts the following top-level elements on a config file:

  • <window>: Options related to the entire window's layout. See Layout for more details.
  • <plugin>: Zero or more plugins to be loaded at startup.
    • filename: This attribute specifies the plugin library to be loaded.
    • <ignition-gui>: Ignition GUI processes this block before passing the config to the plugin. See plugin_params.config for an example.
    • custom elements: Developers can read custom plugin configurations overriding the Plugin::LoadConfig function, see the HelloPlugin example.

See the example plugin block below:

<plugin filename="ImageDisplay">
  <ignition-gui>
    <property type="int" key="height">120</property>
  </ignition-gui>
  <topic>/camera</topic>
</plugin>

This will load the libImageDisplay.so plugin, Ignition GUI will set its height to 120 pixels, and the plugin-specific <topic> parameter will be handled within ImageDisplay::LoadConfig.