45 #ifndef LEGATO_WIDGET_PIE_CHART_H 46 #define LEGATO_WIDGET_PIE_CHART_H 50 #if LE_PIECHART_WIDGET_ENABLED == 1 68 typedef struct lePieChartPie
76 uint32_t percentOffset;
77 uint32_t percentValue;
80 typedef struct lePieChartWidget lePieChartWidget;
93 typedef void (* lePieChartWidget_PressedEvent)(lePieChartWidget*, uint32_t);
101 typedef struct lePieChartWidget lePieChartWidget;
103 #define LE_PIECHARTWIDGET_VTABLE(THIS_TYPE) \ 104 LE_WIDGET_VTABLE(THIS_TYPE) \ 106 int32_t (*getStartAngle)(const THIS_TYPE* _this); \ 107 leResult (*setStartAngle)(THIS_TYPE* _this, int32_t ang); \ 108 int32_t (*getCenterAngle)(const THIS_TYPE* _this); \ 109 leResult (*setCenterAngle)(THIS_TYPE* _this, int32_t ang); \ 110 int32_t (*addEntry)(THIS_TYPE* _this); \ 111 leResult (*clear)(THIS_TYPE* _this); \ 112 uint32_t (*getEntryValue)(const THIS_TYPE* _this, int32_t idx); \ 113 leResult (*setEntryValue)(THIS_TYPE* _this, int32_t idx, uint32_t val); \ 114 uint32_t (*getEntryRadius)(const THIS_TYPE* _this, int32_t idx); \ 115 leResult (*setEntryRadius)(THIS_TYPE* _this, int32_t idx, uint32_t rad); \ 116 uint32_t (*getEntryOffset)(const THIS_TYPE* _this, int32_t idx); \ 117 leResult (*setEntryOffset)(THIS_TYPE* _this, int32_t idx, uint32_t offs); \ 118 leScheme* (*getEntryScheme)(const THIS_TYPE* _this, int32_t idx); \ 119 leResult (*setEntryScheme)(THIS_TYPE* _this, int32_t idx, const leScheme* schm); \ 120 lePieChartWidget_PressedEvent (*getPressedEventCallback)(const THIS_TYPE* _this); \ 121 leResult (*setPressedEventCallback)(THIS_TYPE* _this, lePieChartWidget_PressedEvent cb); \ 122 leFont* (*getLabelFont)(const THIS_TYPE* _this); \ 123 leResult (*setLabelFont)(THIS_TYPE* _this, const leFont* fnt); \ 124 leBool (*getLabelsVisible)(const THIS_TYPE* _this); \ 125 leResult (*setLabelsVisible)(THIS_TYPE* _this, leBool vis); \ 126 uint32_t (*getLabelsOffset)(const THIS_TYPE* _this); \ 127 leResult (*setLabelsOffset)(THIS_TYPE* _this, uint32_t offs); \ 129 typedef struct lePieChartWidgetVTable
131 LE_PIECHARTWIDGET_VTABLE(lePieChartWidget)
132 } lePieChartWidgetVTable;
146 typedef struct lePieChartWidget
150 const lePieChartWidgetVTable* fn;
159 uint32_t labelsOffset;
162 lePieChartWidget_PressedEvent pressedCallback;
182 lePieChartWidget* lePieChartWidget_New(
void);
194 void lePieChartWidget_Constructor(lePieChartWidget* wgt);
197 #define THIS_TYPE struct leWidget 228 virtual int32_t
getStartAngle(
const lePieChartWidget* _this);
264 virtual leResult setVisibleItemCount(lePieChartWidget* _this,
332 virtual leResult setVisibleItemCount(lePieChartWidget* _this,
429 virtual uint32_t getEntryValue(
const lePieChartWidget* _this,
468 virtual leResult setEntryValue(lePieChartWidget* _this,
504 virtual uint32_t getEntryRadius(
const lePieChartWidget* _this,
543 virtual leResult setEntryRadius(lePieChartWidget* _this,
580 virtual uint32_t getEntryOffset(
const lePieChartWidget* _this,
619 virtual leResult setEntryOffset(lePieChartWidget* _this,
656 virtual leScheme* getEntryScheme(
const lePieChartWidget* _this,
697 virtual leResult setEntryScheme(lePieChartWidget* _this,
730 virtual leFont* getLabelFont(
const lePieChartWidget* _this);
767 virtual leResult setLabelFont(lePieChartWidget* _this,
799 virtual leBool getLabelsVisible(
const lePieChartWidget* _this);
835 virtual leResult setLabelsVisible(lePieChartWidget* _this,
867 virtual uint32_t getLabelsOffset(
const lePieChartWidget* _this);
903 virtual leResult setLabelsOffset(lePieChartWidget* _this,
916 virtual lePieChartWidget_PressedEvent getPressedEventCallback
917 (
const lePieChartWidget* _this);
932 virtual leResult setPressedEventCallback(lePieChartWidget* _this,
933 lePieChartWidget_PressedEvent cb);
942 #endif // LE_PIECHART_WIDGET_ENABLED Common macros and definitions used by Legato.
Font functions and definitions.
This struct represents a font object.
Definition: legato_font.h:156
leResult
This enum represents function call results.
Definition: legato_common.h:123
This struct represents a array.
Definition: legato_array.h:64
virtual void clear(leString *_this)
Clear string.
leBool
This enum represents booleans.
Definition: legato_common.h:146
Definition: legato_scheme.h:154