CLabel



Implements Label control.

You can find more information in comments below. Overrided methods can be found in corresponding base classes and interfaces.

class CLabel :public virtual ILabel, public CControl
{
public:
    enum class State // Possible states 
    {
        Normal,
        Hovered,
        Disabled
    };
public:
    RectF getRenderRect() override;
    String getCaption() override;

    bool setAlign(const Align value) override;
    bool setConstraints(const RectF &value) override;
    bool setSize(const PointF &value) override;
    bool setCaption(const String &value) override;
    bool setDPI(const Point &value) override;

    // IControl methods 
    void Refresh(const bool refresh_children) override;

    CLabel();
    CLabel(IControl *parent);
    CLabel(IForm *parent);

    State getState(); // Return current state 
    bool isAutoSize() const; // Whether size should be calculated automatically to fit content. By default true 
    bool isMultiline() const; // Whether display as multiline text. By default false 
    // Return layout properties 
    TextAlign getCaptionHorizontalAlign() const;
    VerticalAlign getCaptionVerticalAlign() const;
    Color getColor(const State state) const;
    Color getShadowColor(const State state) const;
    PointF getShadowShift(const State state) const;
    int getShadowRadius(const State state) const;

    bool setAutoSize(const bool value); // Set whether size should be calculated automatically to fit content 
    bool setMultiline(const bool value);
    // Set layout properties 
    bool setCaptionHorizontalAlign(const TextAlign value);
    bool setCaptionVerticalAlign(const VerticalAlign value);
    bool setColor(const State state, const Color &value);
    bool setShadowColor(const State state, const Color &value);
    bool setShadowShift(const State state, const PointF &value);
    bool setShadowRadius(const State state, const int value);
};
Namespace: nitisa::standard
Include: Standard/Controls/Label/Label.h