class hiro::GuiGenerator — HIRO 0.7.0 documentation

# class hiro::GuiGenerator

## Overview

Interface for automatic generating GUI elements to side panel. More…

    #include <GuiGenerator.h>

    class GuiGenerator {
    public:
        // construction

        virtual ~GuiGenerator();

        // methods

        void SetAutoTestConditionsEnabled(bool enabled);
        void TestElementConditions();
        hiro::gui::Label* AddLabel(const std::string& text);
        hiro::gui::Button* AddButton(const std::string& caption);
        hiro::gui::Checkbox* AddCheckbox(const std::string& title);
        hiro::gui::Droplist* AddDroplist(const std::string& title);
        hiro::gui::NumericInt* AddNumericInt(const std::string& title);
        hiro::gui::NumericFloat* AddNumericFloat(const std::string& title);
        hiro::gui::SlidingFloat* AddSlidingFloat(const std::string& title);
        hiro::gui::SlidingInt* AddSlidingInt(const std::string& title);
        hiro::gui::CheckboxList* AddCheckboxList();
        hiro::gui::Separator* AddSeparator();
        gui::Panel* PanelBegin();
        void PanelEnd();
    };

## Detailed Documentation

Interface for automatic generating GUI elements to side panel.

Elements are sequentially sorted in the order in which they were created. See namespace hiro::gui for the full list of available elements and their interface.

### Methods

    void SetAutoTestConditionsEnabled(bool enabled)

Sets up whether tidy up should be performed automatically when something changes in GUI.

Used by the system. Not to be called by a user.

    void TestElementConditions()

Hides the elements whose conditions are not met.

Called by the system automatically.

    hiro::gui::Label* AddLabel(const std::string& text)

Creates a text label.

Properties of element can be edited using returned object.

    hiro::gui::Button* AddButton(const std::string& caption)

Creates a button.

Properties of element can be edited using returned object.

    hiro::gui::Checkbox* AddCheckbox(const std::string& title)

Creates a checkbox.

Properties of element can be edited using returned object.

    hiro::gui::Droplist* AddDroplist(const std::string& title)

Creates a drop list for selecting items.

Properties of element can be edited using returned object.

    hiro::gui::NumericInt* AddNumericInt(const std::string& title)

Creates a numeric edit box for integer values.

Properties of element can be edited using returned object.

    hiro::gui::NumericFloat* AddNumericFloat(const std::string& title)

Creates a numeric edit box for real values.

Properties of element can be edited using returned object.

    hiro::gui::SlidingFloat* AddSlidingFloat(const std::string& title)

Creates slider on a real scale.

Properties of element can be edited using returned object.

    hiro::gui::SlidingInt* AddSlidingInt(const std::string& title)

Creates slider on an integer scale.

Properties of element can be edited using returned object.

    hiro::gui::CheckboxList* AddCheckboxList()

Creates group of checkbox elements.

Properties of element can be edited using returned object.

    hiro::gui::Separator* AddSeparator()

Creates vertical separator.

    gui::Panel* PanelBegin()

Begins a new panel.

Any element added after this call will be added to the panel, until the PanelEnd function is not called. Panels can not be added recursively - sequential call of PanelBegin without calling PanelEnd is not allowed.

    void PanelEnd()

Ends the panel previously started using PanelBegin method.