Class TabHeader::TabButton

Nested Relationships

This class is a nested type of Class TabHeader.

Class Documentation

class TabButton

Implementation class of the actual tab buttons.

Public Functions

TabButton(TabHeader &header, const std::string &label)
void setLabel(const std::string &label)
const std::string &label() const
void setSize(const Vector2i &size)
const Vector2i &size() const
Vector2i preferredSize(NVGcontext *ctx) const
void calculateVisibleString(NVGcontext *ctx)
void drawAtPosition(NVGcontext *ctx, const Vector2i &position, bool active)
void drawActiveBorderAt(NVGcontext *ctx, const Vector2i &position, float offset, const Color &color)
void drawInactiveBorderAt(NVGcontext *ctx, const Vector2i &position, float offset, const Color &color)

Public Static Attributes

constexpr const char *dots = "..."

Private Members

TabHeader *mHeader
std::string mLabel
Vector2i mSize
StringView mVisibleText
int mVisibleWidth = 0
struct StringView

Helper struct to represent the TabButton.

Public Members

const char *first = nullptr
const char *last = nullptr