 |
MPLABĀ® Harmony Graphics Suite
|
Go to the documentation of this file.
28 #ifndef LEGATO_DYNAMICSTRING_H
29 #define LEGATO_DYNAMICSTRING_H
39 #define LE_DYNAMICSTRING_VTABLE(THIS_TYPE) \
40 LE_STRING_VTABLE(THIS_TYPE) \
42 uint32_t (*getCapacity)(THIS_TYPE* str); \
43 leResult (*setCapacity)(THIS_TYPE* str, uint32_t cap); \
45 typedef struct leDynamicStringVTable
48 } leDynamicStringVTable;
62 const leDynamicStringVTable*
fn;
101 #define THIS_TYPE struct leWidget
uint16_t capacity
Definition: legato_dynamicstring.h:64
virtual leResult getCharIndexAtPoint(const leString *_this, const lePoint *pt, uint32_t *idx)
Get character index at point.
virtual leResult setFromString(leString *_this, const struct leString *src)
Set string value from another string.
virtual uint32_t getCapacity(leDynamicString *_this)
Get capacity of the dynamic string.
virtual leResult remove(leString *_this, uint32_t idx, uint32_t count)
Remove substring.
const leDynamicStringVTable * fn
Definition: legato_dynamicstring.h:62
This struct represents a dynamic string.
Definition: legato_dynamicstring.h:60
leResult
This enum represents function call results.
Definition: legato_common.h:134
This struct represents a rectangle.
Definition: legato_common.h:405
virtual leResult getLineIndices(const leString *_this, uint32_t line, uint32_t *start, uint32_t *end)
Get indices of a string line.
uint16_t length
Definition: legato_dynamicstring.h:65
Memory functions and definitions.
leHAlignment
This enum represents the horizontal alignment mode of objects.
Definition: legato_common.h:206
uint32_t getLineCount(const leString *_this)
Get number of lines in the string.
virtual void preinvalidate(leString *_this)
Raise pre-invalidate event.
This struct represents a font object.
Definition: legato_font.h:136
Definition: legato_string.h:98
This struct represents a string.
Definition: legato_string.h:108
virtual leResult setFromChar(leString *_this, const leChar *buf, uint32_t size)
Set string value from a leChar buffer.
virtual leChar charAt(const leString *_this, uint32_t idx)
Get codepoint at the given index.
virtual leResult setPreInvalidateCallback(leString *_this, leString_InvalidateCallback, void *userData)
Set string invalidate event.
leBool
This enum represents booleans.
Definition: legato_common.h:157
leChar * data
Definition: legato_dynamicstring.h:63
virtual leResult setCapacity(leDynamicString *_this, uint32_t cap)
Set capacity of the dynamic string.
virtual uint32_t length(const leString *_this)
Get length of the string.
virtual leResult setFont(leString *_this, const leFont *font)
Set font.
virtual leResult insert(leString *_this, const struct leString *val, uint32_t idx)
Insert string at a given index.
LIB_EXPORT void leDynamicString_Constructor(leDynamicString *str)
Consructs a dynamic string.
Definition: legato_dynamicstring.c:41
leString base
Definition: legato_dynamicstring.h:61
Fixed string functions and definitions.
Dynamic string functions and definitions.
virtual int32_t compare(const leString *_this, const struct leString *tgt)
Compare string to another string.
LIB_EXPORT leDynamicString * leDynamicString_New()
Create a new dynamic string.
Definition: legato_dynamicstring.c:56
uint16_t leChar
This typedef represents Legato character.
Definition: legato_common.h:424
virtual uint32_t toChar(const leString *_this, leChar *buf, uint32_t size)
Convert string to a C-style string.
virtual leFont * getFont(const leString *_this)
Get font.
virtual leBool isEmpty(const leString *_this)
Determine if string is empty.
virtual leResult append(leString *_this, const struct leString *val)
Append string.
virtual void clear(leString *_this)
Clear string.
const leStringVTable * fn
Definition: legato_string.h:109
virtual void destructor(leString *_this)
Destruct string.
struct leDynamicString leDynamicString
This struct represents a dynamic string.
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:357
const leFont * font
Definition: legato_dynamicstring.h:66