Extending the GUI
Raisin GUI windows are plugins. To add a new window, create a new package that
builds a shared library named raisin_gui_<window>_window and implements the
GuiWindow interface.
Plugin Skeleton
Derive from
GuiWindowand implement the required lifecycle methods:initupdatedrawresetshutDown
Export C linkage
createanddestroysymbols so the window manager can instantiate and clean up the plugin:
extern "C" {
GuiWindow* create(const std::string& title,
std::shared_ptr<GuiResource> resource) {
return new my_window(title, resource);
}
void destroy(GuiWindow* p) {
delete p;
}
}
Add a parameter file at
config/params.yaml(installed underinstall/config) with optional keys such asopen_when_startandonly_single_instance_allowed.Start from the window template at
templates/developer/raisin_gui_empty_windowto get the correct build setup, plugin exports, and folder structure.Add an icon to
resource/icon.pngso the window appears in the dock bar.
Window Naming and Discovery
The window manager scans for libraries that match the pattern
raisin_gui_*_window. The plugin name used in the dock bar is derived from
that library name. For example, raisin_gui_robot_window yields a window
name of robot.
If you want the window to appear under a menu category in the dock bar, set
menu_tab in the window’s parameter file.