45 #ifndef LEGATO_WIDGET_LINE_GRAPH_H 46 #define LEGATO_WIDGET_LINE_GRAPH_H 50 #if LE_LINEGRAPH_WIDGET_ENABLED == 1 72 typedef enum leLineGraphValueAxis
74 LINE_GRAPH_AXIS_0 = 0,
76 } leLineGraphValueAxis;
85 typedef enum leLineGraphTickPosition
89 LINE_GRAPH_TICK_CENTER,
90 } leLineGraphTickPosition;
99 typedef enum leLineGraphDataPointType
101 LINE_GRAPH_DATA_POINT_NONE,
102 LINE_GRAPH_DATA_POINT_CIRCLE,
103 LINE_GRAPH_DATA_POINT_SQUARE,
104 } leLineGraphDataPointType;
119 typedef struct leLineGraphDataSeries
123 leLineGraphValueAxis axis;
124 leLineGraphDataPointType pointType;
128 } leLineGraphDataSeries;
143 typedef struct leLineGraphCategory
148 } leLineGraphCategory;
155 typedef struct leLineGraphWidget leLineGraphWidget;
157 #define LE_LINEGRAPHWIDGET_VTABLE(THIS_TYPE) \ 158 LE_WIDGET_VTABLE(THIS_TYPE) \ 160 uint32_t (*getTickLength)(const THIS_TYPE* _this); \ 161 leResult (*setTickLength)(THIS_TYPE* _this, uint32_t len); \ 162 leBool (*getStacked)(const THIS_TYPE* _this); \ 163 leResult (*setStacked)(THIS_TYPE* _this, leBool stk); \ 164 int32_t (*getMaxValue)(const THIS_TYPE* _this, leLineGraphValueAxis axis); \ 165 leResult (*setMaxValue)(THIS_TYPE* _this, leLineGraphValueAxis axis, int32_t val); \ 166 int32_t (*getMinValue)(const THIS_TYPE* _this, leLineGraphValueAxis axis); \ 167 leResult (*setMinValue)(THIS_TYPE* _this, leLineGraphValueAxis axis, int32_t val); \ 168 leBool (*getValueAxisLabelsVisible)(const THIS_TYPE* _this, leLineGraphValueAxis axis); \ 169 leResult (*setValueAxisLabelsVisible)(THIS_TYPE* _this, leLineGraphValueAxis axis, leBool vis); \ 170 leBool (*getFillGraphArea)(const THIS_TYPE* _this); \ 171 leResult (*setFillGraphArea)(THIS_TYPE* _this, leBool fill); \ 172 leBool (*getFillSeriesArea)(const THIS_TYPE* _this); \ 173 leResult (*setFillSeriesArea)(THIS_TYPE* _this, leBool fill); \ 174 leBool (*getGridLinesVisible)(const THIS_TYPE* _this, leLineGraphValueAxis axis); \ 175 leResult (*setGridLinesVisible)(THIS_TYPE* _this, leLineGraphValueAxis axis, leBool visible); \ 176 leBool (*getValueAxisTicksVisible)(const THIS_TYPE* _this, leLineGraphValueAxis axis); \ 177 leResult (*setValueAxisTicksVisible)(THIS_TYPE* _this, leLineGraphValueAxis axis, leBool vis); \ 178 uint32_t (*getValueAxisTickInterval)(const THIS_TYPE* _this, leLineGraphValueAxis axis); \ 179 leResult (*setValueAxisTickInterval)(THIS_TYPE* _this, leLineGraphValueAxis axis, uint32_t inv); \ 180 uint32_t (*getValueAxisSubtickInterval)(const THIS_TYPE* _this, leLineGraphValueAxis axis); \ 181 leResult (*setValueAxisSubtickInterval)(THIS_TYPE* _this, leLineGraphValueAxis axis, uint32_t inv); \ 182 leBool (*getValueAxisSubticksVisible)(const THIS_TYPE* _this, leLineGraphValueAxis axis); \ 183 leResult (*setValueAxisSubticksVisible)(THIS_TYPE* _this, leLineGraphValueAxis axis, leBool vis); \ 184 leBool (*getCategoryAxisTicksVisible)(const THIS_TYPE* _this); \ 185 leResult (*setCategoryAxisTicksVisible)(THIS_TYPE* _this, leBool vis); \ 186 int32_t (*addCategory)(THIS_TYPE* _this); \ 187 leString* (*getCategoryString)(const THIS_TYPE* _this, int32_t categoryID); \ 188 leResult (*setCategoryString)(THIS_TYPE* _this, int32_t categoryID, const leString* str); \ 189 int32_t (*addSeries)(THIS_TYPE* _this); \ 190 int32_t (*addDataToSeries)(THIS_TYPE* _this, int32_t seriesID, int32_t val); \ 191 leResult (*setDataInSeries)(THIS_TYPE* _this, int32_t seriesID, int32_t idx, int32_t val); \ 192 leScheme* (*getSeriesScheme)(const THIS_TYPE* _this, int32_t seriesID); \ 193 leResult (*setSeriesScheme)(THIS_TYPE* _this, int32_t seriesID, const leScheme* schm); \ 194 leBool (*getSeriesFillPoints)(const THIS_TYPE* _this, int32_t seriesID); \ 195 leResult (*setSeriesFillPoints)(THIS_TYPE* _this, int32_t seriesID, leBool fill); \ 196 leBool (*getSeriesLinesVisible)(const THIS_TYPE* _this, int32_t seriesID); \ 197 leResult (*setSeriesLinesVisible)(THIS_TYPE* _this, int32_t seriesID, leBool vis); \ 198 leLineGraphDataPointType (*getSeriesPointType)(const THIS_TYPE* _this, int32_t seriesID); \ 199 leResult (*setSeriesPointType)(THIS_TYPE* _this, int32_t seriesID, leLineGraphDataPointType type); \ 200 uint32_t (*getSeriesPointSize)(const THIS_TYPE* _this, int32_t seriesID); \ 201 leResult (*setSeriesPointSize)(THIS_TYPE* _this, int32_t seriesID, uint32_t size); \ 202 leResult (*clear)(THIS_TYPE* _this); \ 203 leResult (*setTicksLabelFont)(THIS_TYPE* _this, const leFont* font); \ 204 leBool (*getCategoryAxisLabelsVisible)(const THIS_TYPE* _this); \ 205 leResult (*setCategoryAxisLabelsVisible)(THIS_TYPE* _this, leBool vis); \ 206 leLineGraphTickPosition (*getValueAxisTicksPosition)(const THIS_TYPE* _this, leLineGraphValueAxis axis); \ 207 leResult (*setValueAxisTicksPosition)(THIS_TYPE* _this, leLineGraphValueAxis axis, leLineGraphTickPosition position); \ 208 leLineGraphTickPosition (*getValueAxisSubticksPosition)(const THIS_TYPE* _this, leLineGraphValueAxis axis); \ 209 leResult (*setValueAxisSubticksPosition)(THIS_TYPE* _this, leLineGraphValueAxis axis, leLineGraphTickPosition position); \ 210 leLineGraphTickPosition (*getCategoryAxisTicksPosition)(const THIS_TYPE* _this); \ 211 leResult (*setCategoryAxisTicksPosition)(THIS_TYPE* _this, leLineGraphTickPosition position); \ 213 typedef struct leLineGraphWidgetVTable
215 LE_LINEGRAPHWIDGET_VTABLE(leLineGraphWidget)
216 } leLineGraphWidgetVTable;
230 typedef struct leLineGraphWidget
234 const leLineGraphWidgetVTable* fn;
243 uint32_t tickInterval;
244 uint32_t subtickInterval;
245 leBool valueAxisLabelsVisible;
246 leBool valueAxisTicksVisible;
247 leBool valueAxisSubticksVisible;
248 leBool valueGridLinesVisible;
251 const leFont* ticksLabelFont;
252 leLineGraphTickPosition valueAxisTicksPosition;
253 leLineGraphTickPosition valueAxisSubticksPosition;
256 leBool categAxisLabelsVisible;
257 leBool categAxisTicksVisible;
258 leLineGraphTickPosition categAxisTicksPosition;
279 leLineGraphWidget* leLineGraphWidget_New(
void);
291 void leLineGraphWidget_Constructor(leLineGraphWidget* wgt);
1461 #endif // LE_LINEGRAPH_WIDGET_ENABLED Common macros and definitions used by Legato.
This struct represents a string.
Definition: legato_string.h:107
This struct represents a font object.
Definition: legato_font.h:156
This struct represents a array.
Definition: legato_array.h:64
leBool
This enum represents booleans.
Definition: legato_common.h:146
Definition: legato_scheme.h:154
Fixed string functions and definitions.