class hiro::gui::Button — HIRO 0.7.0 documentation

# class hiro::gui::Button

## Overview

Clickable button element. More…

    #include <GuiTypes.h>

    class Button: public hiro::gui::TElement {
    public:
        // methods

        hiro::gui::Button* SetCaption(const std::string& caption);
        std::string GetCaption() const;
    };

### Inherited Members

    public:
        // methods

        bool TestCondition() const;
        uint32_t GetId() const;
        C* SetConditionFunc(std::function<bool(void)> condition_func);
        C* SetConditionBool(bool* var, hiro::BoolFunc func = hiro::BoolFunc::equals_true);
        C* Subscribe(std::function<void(const C*)> callback_func);

    protected:
        // methods

        void SetConditionFuncImpl(std::function<bool(void)> condition_func);
        virtual void NotifyChange() const;

## Detailed Documentation

Clickable button element.

Subscribe the element to receive click events.

### Methods

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

Set a text that will be shown on the button.

    std::string GetCaption() const

Returns text that is currently shown on the button.