leFont* (*getFont)(const THIS_TYPE* _this); \
leResult (*
setFromCStr)(THIS_TYPE* _this,
const char* cstr); \
leChar (*
charAt)(
const THIS_TYPE* _this, uint32_t idx); \
uint32_t (*
length)(
const THIS_TYPE* _this); \
leBool (*
isEmpty)(
const THIS_TYPE* _this); \
leResult (*
insert)(THIS_TYPE* _this,
const struct leString* val, uint32_t idx); \
leResult (*remove)(THIS_TYPE* _this, uint32_t idx, uint32_t count); \
void (*
clear)(THIS_TYPE* _this); \
uint32_t (*
toChar)(
const THIS_TYPE* _this,
leChar* buf, uint32_t size); \
leResult (*
getLineIndices)(
const THIS_TYPE* _this, uint32_t line, uint32_t* start, uint32_t* end); \
leResult (*
_draw)(
const THIS_TYPE* _this, int32_t x, int32_t y,
leHAlignment align, leColor clr, uint32_t a); \
virtual uint32_t length(const leString *_this)
Get length of the string.
virtual int32_t compare(const leString *_this, const struct leString *tgt)
Compare string to another string.
virtual leResult insert(leString *_this, const struct leString *val, uint32_t idx)
Insert string at a given index.
virtual leBool isEmpty(const leString *_this)
Determine if string is empty.
This struct represents a string.
Definition: legato_string.h:107
virtual leResult getCharRect(const leString *_this, uint32_t idx, leRect *rect)
Get rendered rectangle of a string codepoint.
virtual leResult setFont(leString *_this, const leFont *font)
Set font.
virtual leResult append(leString *_this, const struct leString *val)
Append string.
This struct represents a font object.
Definition: legato_font.h:156
virtual uint32_t toChar(const leString *_this, leChar *buf, uint32_t size)
Convert string to a C-style string.
virtual void preinvalidate(leString *_this)
Raise pre-invalidate event.
virtual leResult setFromString(leString *_this, const struct leString *src)
Set string value from another string.
virtual virtual leResult getRect(const leString *_this, leRect *rect)
Get rectangle of the rendered string in pixels.
This struct represents a rectangle.
Definition: legato_common.h:394
leHAlignment
This enum represents the horizontal alignment mode of objects.
Definition: legato_common.h:195
virtual void invalidate(leString *_this)
Invalidate.
virtual leResult getLineRect(const leString *_this, uint32_t line, leRect *rect)
Get rectangle of a string line.
virtual leResult setFromCStr(leString *_this, const char *cstr)
Set string value from a C string buffer.
This structure represents a integer Cartesian point.
Definition: legato_common.h:346
virtual void clear(leString *_this)
Clear string.
virtual leResult setInvalidateCallback(leString *_this, leString_InvalidateCallback cb, void *userData)
Set string invalidate event.
virtual leResult getCharIndexAtPoint(const leString *_this, const lePoint *pt, uint32_t *idx)
Get character index at point.
uint16_t leChar
This typedef represents Legato character.
Definition: legato_common.h:414
virtual leResult setPreInvalidateCallback(leString *_this, leString_InvalidateCallback, void *userData)
Set string invalidate event.
virtual leResult _draw(const leString *_this, int32_t x, int32_t y, leHAlignment align, leColor clr, uint32_t a)
Draw.
virtual leResult getLineIndices(const leString *_this, uint32_t line, uint32_t *start, uint32_t *end)
Get indices of a string line.
virtual leChar charAt(const leString *_this, uint32_t idx)
Get codepoint at the given index.
virtual void destructor(leString *_this)
Destruct string.
virtual leResult setFromChar(leString *_this, const leChar *buf, uint32_t size)
Set string value from a leChar buffer.
uint32_t getLineCount(const leString *_this)
Get number of lines in the string.