MPLABĀ® Harmony Graphics Suite  GFX v3.13.0
Legato API Documentation
legato_widget_line_graph.h
Go to the documentation of this file.
1 /*******************************************************************************
2 * Copyright (C) 2020 Microchip Technology Inc. and its subsidiaries.
3 *
4 * Subject to your compliance with these terms, you may use Microchip software
5 * and any derivatives exclusively with Microchip products. It is your
6 * responsibility to comply with third party license terms applicable to your
7 * use of third party software (including open source software) that may
8 * accompany Microchip software.
9 *
10 * THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
11 * EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIED
12 * WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A
13 * PARTICULAR PURPOSE.
14 *
15 * IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
16 * INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
17 * WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS
18 * BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE
19 * FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN
20 * ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY,
21 * THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE.
22 *******************************************************************************/
23 
24 /*******************************************************************************
25  Module for Microchip Graphics Library - Legato User Interface Library
26 
27  Company:
28  Microchip Technology Inc.
29 
30  File Name:
31  legato_widget_line_graph.h
32 
33  Summary:
34 
35 
36  Description:
37  This module implements line graph drawing widget functions.
38 *******************************************************************************/
45 #ifndef LEGATO_WIDGET_LINE_GRAPH_H
46 #define LEGATO_WIDGET_LINE_GRAPH_H
47 
49 
50 #if LE_LINEGRAPH_WIDGET_ENABLED == 1
51 
52 #ifdef __cplusplus
53 extern "C" {
54 #endif
55 
58 
59 // *****************************************************************************
60 // *****************************************************************************
61 // Section: Data Types and Constants
62 // *****************************************************************************
63 // *****************************************************************************
64 
65 // *****************************************************************************
66 /* Enumeration:
67  leLineGraphValueAxis
68 
69  Summary:
70  The value axis index value
71 */
72 typedef enum leLineGraphValueAxis
73 {
74  LINE_GRAPH_AXIS_0 = 0,
75 // LINE_GRAPH_AXIS_1, //unsupported
76 } leLineGraphValueAxis;
77 
78 // *****************************************************************************
79 /* Enumeration:
80  leLineGraphTickPosition
81 
82  Summary:
83  The tick position relative to axis
84 */
85 typedef enum leLineGraphTickPosition
86 {
87  LINE_GRAPH_TICK_IN,
88  LINE_GRAPH_TICK_OUT,
89  LINE_GRAPH_TICK_CENTER,
90 } leLineGraphTickPosition;
91 
92 // *****************************************************************************
93 /* Enumeration:
94  leLineGraphDataPointType
95 
96  Summary:
97  The graph data point type
98 */
99 typedef enum leLineGraphDataPointType
100 {
101  LINE_GRAPH_DATA_POINT_NONE,
102  LINE_GRAPH_DATA_POINT_CIRCLE,
103  LINE_GRAPH_DATA_POINT_SQUARE,
104 } leLineGraphDataPointType;
105 
106 // *****************************************************************************
107 /* Structure:
108  leLineGraphDataSeries
109 
110  Summary:
111  The data series object that contains the series properties and data
112 
113  Description:
114 
115 
116  Remarks:
117  None.
118 */
119 typedef struct leLineGraphDataSeries
120 {
121  const leScheme* scheme;
122  leArray data;
123  leLineGraphValueAxis axis;
124  leLineGraphDataPointType pointType;
125  uint32_t pointSize;
126  leBool fillPoints;
127  leBool drawLines;
128 } leLineGraphDataSeries;
129 
130 // *****************************************************************************
131 /* Structure:
132  leLineGraphCategory
133 
134  Summary:
135  Contains the Category properties
136 
137  Description:
138 
139 
140  Remarks:
141  None.
142 */
143 typedef struct leLineGraphCategory
144 {
145  const leString* text;
146  int32_t stackValue;
147  int32_t drawX;
148 } leLineGraphCategory;
149 
150 /* internal use only */
155 typedef struct leLineGraphWidget leLineGraphWidget;
156 
157 #define LE_LINEGRAPHWIDGET_VTABLE(THIS_TYPE) \
158  LE_WIDGET_VTABLE(THIS_TYPE) \
159  \
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); \
212 
213 typedef struct leLineGraphWidgetVTable
214 {
215  LE_LINEGRAPHWIDGET_VTABLE(leLineGraphWidget)
216 } leLineGraphWidgetVTable;
217 
223 // *****************************************************************************
230 typedef struct leLineGraphWidget
231 {
232  leWidget widget; // base widget header
233 
234  const leLineGraphWidgetVTable* fn;
235 
236  uint32_t tickLength;
237  leBool fillGraphArea;
238  leBool fillValueArea;
239 
240  //Value axis properties
241  int32_t maxValue;
242  int32_t minValue;
243  uint32_t tickInterval;
244  uint32_t subtickInterval;
245  leBool valueAxisLabelsVisible;
246  leBool valueAxisTicksVisible;
247  leBool valueAxisSubticksVisible;
248  leBool valueGridLinesVisible;
249  leBool stacked;
250  leArray dataSeries;
251  const leFont* ticksLabelFont; // ticks label font
252  leLineGraphTickPosition valueAxisTicksPosition;
253  leLineGraphTickPosition valueAxisSubticksPosition;
254 
255  //Category axis properties
256  leBool categAxisLabelsVisible;
257  leBool categAxisTicksVisible;
258  leLineGraphTickPosition categAxisTicksPosition;
259  leArray categories;
260 } leLineGraphWidget;
261 
262 // *****************************************************************************
263 // *****************************************************************************
264 // Section: Routines
265 // *****************************************************************************
266 // *****************************************************************************
267 
279 leLineGraphWidget* leLineGraphWidget_New(void);
280 
291 void leLineGraphWidget_Constructor(leLineGraphWidget* wgt);
292 
293 // *****************************************************************************
294 /* Virtual Member Function:
295  uint32_t getTickLength(const leLineGraphWidget* _this)
296 
297  Summary:
298  Gets the tick length
299 
300  Description:
301  Gets the tick length
302 
303  Parameters:
304  const leLineGraphWidget* _this - The line graph widget to operate on
305 
306  Remarks:
307  Usage - _this->fn->getTickLength(_this);
308 
309  Returns:
310  uint32_t - the length value
311 */
312 
313 // *****************************************************************************
314 /* Virtual Member Function:
315  leResult setTickLength(leLineGraphWidget* _this,
316  uint32_t len)
317 
318  Summary:
319  Sets the tick length
320 
321  Description:
322  Sets the tick length
323 
324  Parameters:
325  leLineGraphWidget* _this - The line graph widget to operate on
326  uint32_t len - the length value
327 
328  Remarks:
329  Usage - _this->fn->setTickLength(_this, len);
330 
331  Returns:
332  leResult - the result of the operation
333 */
334 
335 // *****************************************************************************
336 /* Virtual Member Function:
337  leBool getStacked(const leLineGraphWidget* _this)
338 
339  Summary:
340  Gets the stacked setting
341 
342  Description:
343  Gets the stacked setting
344 
345  Parameters:
346  const leLineGraphWidget* _this - The line graph widget to operate on
347 
348  Remarks:
349  Usage - _this->fn->getStacked(_this);
350 
351  Returns:
352  leBool - the setting value
353 */
354 
355 // *****************************************************************************
356 /* Virtual Member Function:
357  leResult setStacked(leLineGraphWidget* _this,
358  leBool stk)
359 
360  Summary:
361  Sets the stacked setting
362 
363  Description:
364  Sets the stacked setting
365 
366  Parameters:
367  leLineGraphWidget* _this - The line graph widget to operate on
368  leBool stk - the setting value
369 
370  Remarks:
371  Usage - _this->fn->setStacked(_this, stk);
372 
373  Returns:
374  leResult - the result of the operation
375 */
376 
377 // *****************************************************************************
378 /* Virtual Member Function:
379  uint32_t getMinValue(const leLineGraphWidget* _this,
380  leLineGraphValueAxis axis)
381 
382  Summary:
383  Gets the minimum value
384 
385  Description:
386  Gets the minimum value
387 
388  Parameters:
389  const leLineGraphWidget* _this - The line graph widget to operate on
390  lleLineGraphValueAxis axis - the axis to modify
391 
392  Remarks:
393  Usage - _this->fn->getMinValue(_this, axis);
394 
395  Returns:
396  uint32_t - the value
397 */
398 
399 // *****************************************************************************
400 /* Virtual Member Function:
401  leResult setMinValue(leLineGraphWidget* _this,
402  leLineGraphValueAxis axis,
403  int32_t min)
404 
405  Summary:
406  Sets the minimum value
407 
408  Description:
409  Sets the minimum value
410 
411  Parameters:
412  leLineGraphWidget* _this - The line graph widget to operate on
413  lleLineGraphValueAxis axis - the axis to modify
414  int32_t min - the minimum value
415 
416  Remarks:
417  Usage - _this->fn->setMinValue(_this, axis, min);
418 
419  Returns:
420  leResult - the result of the operation
421 */
422 
423 // *****************************************************************************
424 /* Virtual Member Function:
425  uint32_t getMaxValue(const leLineGraphWidget* _this,
426  leLineGraphValueAxis axis)
427 
428  Summary:
429  Gets the maximum value
430 
431  Description:
432  Gets the maximum value
433 
434  Parameters:
435  const leLineGraphWidget* _this - The line graph widget to operate on
436  lleLineGraphValueAxis axis - the axis to modify
437 
438  Remarks:
439  Usage - _this->fn->getMaxValue(_this, axis);
440 
441  Returns:
442  uint32_t - the value
443 */
444 
445 // *****************************************************************************
446 /* Virtual Member Function:
447  leResult setMaxValue(leLineGraphWidget* _this,
448  leLineGraphValueAxis axis,
449  int32_t max)
450 
451  Summary:
452  Sets the maximum value
453 
454  Description:
455  Sets the maximum value
456 
457  Parameters:
458  leLineGraphWidget* _this - The line graph widget to operate on
459  lleLineGraphValueAxis axis - the axis to modify
460  int32_t max - the maximum value
461 
462  Remarks:
463  Usage - _this->fn->setMaxValue(_this, axis, max);
464 
465  Returns:
466  leResult - the result of the operation
467 */
468 
469 // *****************************************************************************
470 /* Virtual Member Function:
471  leBool getValueAxisLabelsVisible(const leLineGraphWidget* _this,
472  leLineGraphValueAxis axis)
473 
474  Summary:
475  Gets the visible value axis label setting
476 
477  Description:
478  Gets the visible value axis label setting
479 
480  Parameters:
481  const leLineGraphWidget* _this - The line graph widget to operate on
482  lleLineGraphValueAxis axis - the axis to modify
483 
484  Remarks:
485  Usage - _this->fn->getValueAxisLabelsVisible(_this, axis);
486 
487  Returns:
488  leBool - the visibility setting
489 */
490 
491 // *****************************************************************************
492 /* Virtual Member Function:
493  leResult setValueAxisLabelsVisible(leLineGraphWidget* _this,
494  leLineGraphValueAxis axis,
495  leBool vis)
496 
497  Summary:
498  Sets the visibility of the value axis labels
499 
500  Description:
501  Sets the visibility of the value axis labels
502 
503  Parameters:
504  leLineGraphWidget* _this - The line graph widget to operate on
505  lleLineGraphValueAxis axis - the axis to modify
506  leBool vis - the visibility setting
507 
508  Remarks:
509  Usage - _this->fn->setValueAxisLabelsVisible(_this, axis, vis);
510 
511  Returns:
512  leResult - the result of the operation
513 */
514 
515 // *****************************************************************************
516 /* Virtual Member Function:
517  leBool getFillGraphArea(const leLineGraphWidget* _this)
518 
519  Summary:
520  Gets the graph fill setting
521 
522  Description:
523  Gets the graph fill setting
524 
525  Parameters:
526  const leLineGraphWidget* _this - The line graph widget to operate on
527 
528  Remarks:
529  Usage - _this->fn->getFillGraphArea(_this);
530 
531  Returns:
532  leBool - the setting value
533 */
534 
535 // *****************************************************************************
536 /* Virtual Member Function:
537  leResult setFillGraphArea(leLineGraphWidget* _this,
538  leBool fill)
539 
540  Summary:
541  Sets the graph fill setting
542 
543  Description:
544  Sets the graph fill setting
545 
546  Parameters:
547  leLineGraphWidget* _this - The line graph widget to operate on
548  leBool fill - the fill setting
549 
550  Remarks:
551  Usage - _this->fn->setFillGraphArea(_this, fill);
552 
553  Returns:
554  leResult - the result of the operation
555 */
556 
557 // *****************************************************************************
558 /* Virtual Member Function:
559  leBool getFillSeriesArea(const leLineGraphWidget* _this)
560 
561  Summary:
562  Gets the fill series area setting
563 
564  Description:
565  Gets the fill series area setting
566 
567  Parameters:
568  const leLineGraphWidget* _this - The line graph widget to operate on
569 
570  Remarks:
571  Usage - _this->fn->getFillSeriesArea(_this);
572 
573  Returns:
574  leBool - the setting value
575 */
576 
577 // *****************************************************************************
578 /* Virtual Member Function:
579  leResult setFillSeriesArea(leLineGraphWidget* _this,
580  leBool fill)
581 
582  Summary:
583  Sets the fill series area setting
584 
585  Description:
586  Sets the fill series area setting
587 
588  Parameters:
589  leLineGraphWidget* _this - The line graph widget to operate on
590  leBool fill - the fill setting
591 
592  Remarks:
593  Usage - _this->fn->setFillSeriesArea(_this, fill);
594 
595  Returns:
596  leResult - the result of the operation
597 */
598 
599 // *****************************************************************************
600 /* Virtual Member Function:
601  leBool getGridLinesVisible(const leLineGraphWidget* _this,
602  leLineGraphValueAxis axis)
603 
604  Summary:
605  Gets the visible grid lines setting
606 
607  Description:
608  Gets the visible grid lines setting
609 
610  Parameters:
611  const leLineGraphWidget* _this - The line graph widget to operate on
612  lleLineGraphValueAxis axis - the axis to modify
613 
614  Remarks:
615  Usage - _this->fn->getGridLinesVisible(_this, axis);
616 
617  Returns:
618  leBool - the visibility setting
619 */
620 
621 // *****************************************************************************
622 /* Virtual Member Function:
623  leResult setGridLinesVisible(leLineGraphWidget* _this,
624  leLineGraphValueAxis axis,
625  leBool vis)
626 
627  Summary:
628  Sets the visibility of the grid lines
629 
630  Description:
631  Sets the visibility of the grid lines
632 
633  Parameters:
634  leLineGraphWidget* _this - The line graph widget to operate on
635  lleLineGraphValueAxis axis - the axis to modify
636  leBool vis - the visibility setting
637 
638  Remarks:
639  Usage - _this->fn->setGridLinesVisible(_this, axis, vis);
640 
641  Returns:
642  leResult - the result of the operation
643 */
644 
645 // *****************************************************************************
646 /* Virtual Member Function:
647  leBool getValueAxisTicksVisible(const leLineGraphWidget* _this,
648  leLineGraphValueAxis axis)
649 
650  Summary:
651  Gets the visible value ticks setting
652 
653  Description:
654  Gets the visible value ticks setting
655 
656  Parameters:
657  const leLineGraphWidget* _this - The line graph widget to operate on
658  lleLineGraphValueAxis axis - the axis to modify
659 
660  Remarks:
661  Usage - _this->fn->getValueAxisTicksVisible(_this, axis);
662 
663  Returns:
664  leBool - the visibility setting
665 */
666 
667 // *****************************************************************************
668 /* Virtual Member Function:
669  leResult setValueAxisTicksVisible(leLineGraphWidget* _this,
670  leLineGraphValueAxis axis,
671  leBool vis)
672 
673  Summary:
674  Sets the visibility of the value axis ticks
675 
676  Description:
677  Sets the visibility of the value axis ticks
678 
679  Parameters:
680  leLineGraphWidget* _this - The line graph widget to operate on
681  lleLineGraphValueAxis axis - the axis to modify
682  leBool vis - the visibility setting
683 
684  Remarks:
685  Usage - _this->fn->setValueAxisTicksVisible(_this, axis, vis);
686 
687  Returns:
688  leResult - the result of the operation
689 */
690 
691 // *****************************************************************************
692 /* Virtual Member Function:
693  uint32_t getValueAxisTicksInterval(const leLineGraphWidget* _this,
694  leLineGraphValueAxis axis)
695 
696  Summary:
697  Gets the value axis ticks interval setting
698 
699  Description:
700  Gets the value axis ticks interval setting
701 
702  Parameters:
703  const leLineGraphWidget* _this - The line graph widget to operate on
704  lleLineGraphValueAxis axis - the axis to modify
705 
706  Remarks:
707  Usage - _this->fn->getValueAxisTicksInterval(_this, axis);
708 
709  Returns:
710  uint32_t - the value
711 */
712 
713 // *****************************************************************************
714 /* Virtual Member Function:
715  leResult setValueAxisTicksInterval(leLineGraphWidget* _this,
716  leLineGraphValueAxis axis,
717  uint32_t itv)
718 
719  Summary:
720  Sets the inverval of the value axis ticks
721 
722  Description:
723  Sets the inverval of the value axis ticks
724 
725  Parameters:
726  leLineGraphWidget* _this - The line graph widget to operate on
727  lleLineGraphValueAxis axis - the axis to modify
728  uint32_t itv -
729 
730  Remarks:
731  Usage - _this->fn->setValueAxisTicksInterval(_this, axis, itv);
732 
733  Returns:
734  leResult - the result of the operation
735 */
736 
737 // *****************************************************************************
738 /* Virtual Member Function:
739  leBool getValueAxisSubticksVisible(const leLineGraphWidget* _this,
740  leLineGraphValueAxis axis)
741 
742  Summary:
743  Gets the value axis subticks position
744 
745  Description:
746  Gets the value axis subticks position
747 
748  Parameters:
749  const leLineGraphWidget* _this - The line graph widget to operate on
750  lleLineGraphValueAxis axis - the axis to modify
751 
752  Remarks:
753  Usage - _this->fn->getValueAxisSubticksVisible(_this, axis);
754 
755  Returns:
756  leBool - the visibility setting
757 */
758 
759 // *****************************************************************************
760 /* Virtual Member Function:
761  leResult setValueAxisSubticksVisible(leLineGraphWidget* _this,
762  leLineGraphValueAxis axis,
763  leBool vis)
764 
765  Summary:
766  Sets the value axis subticks position
767 
768  Description:
769  Sets the value axis subticks position
770 
771  Parameters:
772  leLineGraphWidget* _this - The line graph widget to operate on
773  lleLineGraphValueAxis axis - the axis to modify
774  leBool vis - the visibility setting
775 
776  Remarks:
777  Usage - _this->fn->setValueAxisSubticksVisible(_this, axis, vis);
778 
779  Returns:
780  leResult - the result of the operation
781 */
782 
783 // *****************************************************************************
784 /* Virtual Member Function:
785  uint32_t getValueAxisSubticksInterval(const leLineGraphWidget* _this,
786  leLineGraphValueAxis axis)
787 
788  Summary:
789  Gets the value axis subticks interval
790 
791  Description:
792  Gets the value axis subticks interval
793 
794  Parameters:
795  const leLineGraphWidget* _this - The line graph widget to operate on
796  lleLineGraphValueAxis axis - the axis to modify
797 
798  Remarks:
799  Usage - _this->fn->getValueAxisSubticksInterval(_this, axis);
800 
801  Returns:
802  uint32_t - the value
803 */
804 
805 // *****************************************************************************
806 /* Virtual Member Function:
807  leResult setValueAxisSubticksInterval(leLineGraphWidget* _this,
808  leLineGraphValueAxis axis,
809  uint32_t itv)
810 
811  Summary:
812  Sets the value axis subticks interval
813 
814  Description:
815  Sets the value axis subticks interval
816 
817  Parameters:
818  leLineGraphWidget* _this - The line graph widget to operate on
819  lleLineGraphValueAxis axis - the axis to modify
820  uint32_t itv - the interval value
821 
822  Remarks:
823  Usage - _this->fn->setValueAxisSubticksInterval(_this, axis, itv);
824 
825  Returns:
826  leResult - the result of the operation
827 */
828 
829 // *****************************************************************************
830 /* Virtual Member Function:
831  leBool getCategoryAxisTicksVisible(const leLineGraphWidget* _this)
832 
833  Summary:
834  Gets the category axis ticks visible setting
835 
836  Description:
837  Gets the category axis ticks visible setting
838 
839  Parameters:
840  const leLineGraphWidget* _this - The line graph widget to operate on
841 
842  Remarks:
843  Usage - _this->fn->getCategoryAxisTicksVisible(_this);
844 
845  Returns:
846  leBool - the visibility setting
847 */
848 
849 // *****************************************************************************
850 /* Virtual Member Function:
851  leResult setCategoryAxisTicksVisible(leLineGraphWidget* _this,
852  leBool vis)
853 
854  Summary:
855  Sets the category axis ticks visible setting
856 
857  Description:
858  Sets the category axis ticks visible setting
859 
860  Parameters:
861  leLineGraphWidget* _this - The line graph widget to operate on
862  leBool vis - the visibility setting
863 
864  Remarks:
865  Usage - _this->fn->setCategoryAxisTicksVisible(_this, vis);
866 
867  Returns:
868  leResult - the result of the operation
869 */
870 
871 // *****************************************************************************
872 /* Virtual Member Function:
873  leResult addCategory(leLineGraphWidget* _this,
874  uint32_t* id)
875 
876  Summary:
877  Adds a data category
878 
879  Description:
880  Adds a data category
881 
882  Parameters:
883  leLineGraphWidget* _this - The line graph widget to operate on
884  uint32_t* id - will contain the ID of the new category
885 
886  Remarks:
887  Usage - _this->fn->addCategory(_this, id);
888 
889  Returns:
890  leResult - the result of the operation
891 */
892 
893 // *****************************************************************************
894 /* Virtual Member Function:
895  leString* getCategoryString(const leLineGraphWidget* _this,
896  uint32_t id)
897 
898  Summary:
899  Gets the string currently assigned to a category
900 
901  Description:
902  Gets the string currently assigned to a category
903 
904  Parameters:
905  const leLineGraphWidget* _this - The line graph widget to operate on
906  uint32_t id - the category ID to modify
907 
908  Remarks:
909  Usage - _this->fn->getCategoryString(_this, id);
910 
911  Returns:
912  leString* - the string pointer
913 */
914 
915 // *****************************************************************************
916 /* Virtual Member Function:
917  leResult setCategoryString(leLineGraphWidget* _this,
918  uint32_t id,
919  const leString* str)
920 
921  Summary:
922  Assigns a string to a category
923 
924  Description:
925  Assigns a string to a category
926 
927  Parameters:
928  leLineGraphWidget* _this - The line graph widget to operate on
929  uint32_t id - the ID of the category to modify
930  const leString* str - the string pointer
931 
932  Remarks:
933  Usage - _this->fn->setCategoryString(_this, id, str);
934 
935  Returns:
936  leResult - the result of the operation
937 */
938 
939 // *****************************************************************************
940 /* Virtual Member Function:
941  int32_t addSeries(leLineGraphWidget* _this)
942 
943  Summary:
944  Adds a data series to the graph
945 
946  Description:
947  Adds a data series to the graph
948 
949  Parameters:
950  leLineGraphWidget* _this - The line graph widget to operate on
951 
952  Remarks:
953  Usage - _this->fn->addSeries(_this);
954 
955  Returns:
956  int32_t - the ID of the new series
957 */
958 
959 // *****************************************************************************
960 /* Virtual Member Function:
961  int32_t addDataToSeries(leLineGraphWidget* _this,
962  int32_t seriesID,
963  int32_t val)
964 
965  Summary:
966  Adds data to an existing series
967 
968  Description:
969  Adds data to an existing series
970 
971  Parameters:
972  leLineGraphWidget* _this - The line graph widget to operate on
973  int32_t seriesID - the series ID to modify
974  int32_t val - the value
975 
976  Remarks:
977  Usage - _this->fn->addDataToSeries(_this, seriesID, val);
978 
979  Returns:
980  int32_t - the ID of the new value
981 */
982 
983 // *****************************************************************************
984 /* Virtual Member Function:
985  leResult setDataInSeries(leLineGraphWidget* _this,
986  int32_t seriesID,
987  int32_t idx,
988  int32_t val)
989 
990  Summary:
991  Sets data in an existing series
992 
993  Description:
994  Sets data in an existing series
995 
996  Parameters:
997  leLineGraphWidget* _this - The line graph widget to operate on
998  int32_t seriesID -
999  int32_t idx - the index
1000  int32_t val - the value
1001 
1002  Remarks:
1003  Usage - _this->fn->setDataInSeries(_this, seriesID, idx, val);
1004 
1005  Returns:
1006  leResult - the result of the operation
1007 */
1008 
1009 // *****************************************************************************
1010 /* Virtual Member Function:
1011  leScheme* getSeriesScheme(const leLineGraphWidget* _this,
1012  uint32_t seriesID)
1013 
1014  Summary:
1015  Gets the scheme for a data series
1016 
1017  Description:
1018  Gets the scheme for a data series
1019 
1020  Parameters:
1021  const leLineGraphWidget* _this - The line graph widget to operate on
1022  uint32_t seriesID - the ID of the series to modify
1023 
1024  Remarks:
1025  Usage - _this->fn->getSeriesScheme(_this, seriesID);
1026 
1027  Returns:
1028  leScheme* - the scheme pointer
1029 */
1030 
1031 // *****************************************************************************
1032 /* Virtual Member Function:
1033  leResult setSeriesScheme(leLineGraphWidget* _this,
1034  uint32_t seriesID,
1035  const leScheme* schm)
1036 
1037  Summary:
1038  Sets a data series' scheme pointer
1039 
1040  Description:
1041  Sets a data series' scheme pointer
1042 
1043  Parameters:
1044  leLineGraphWidget* _this - The line graph widget to operate on
1045  uint32_t seriesID -
1046  const leScheme* schm - the scheme pointer
1047 
1048  Remarks:
1049  Usage - _this->fn->setSeriesScheme(_this, seriesID, schm);
1050 
1051  Returns:
1052  leResult - the result of the operation
1053 */
1054 
1055 // *****************************************************************************
1056 /* Virtual Member Function:
1057  leBool getSeriesFillPoints(const leLineGraphWidget* _this,
1058  int32_t seriesID)
1059 
1060  Summary:
1061  Gets the series fill point setting
1062 
1063  Description:
1064  Gets the series fill point setting
1065 
1066  Parameters:
1067  const leLineGraphWidget* _this - The line graph widget to operate on
1068  int32_t seriesID -
1069 
1070  Remarks:
1071  Usage - _this->fn->getSeriesFillPoints(_this, seriesID);
1072 
1073  Returns:
1074  leBool - the setting value
1075 */
1076 
1077 // *****************************************************************************
1078 /* Virtual Member Function:
1079  leResult setSeriesFillPoints(leLineGraphWidget* _this,
1080  int32_t seriesID,
1081  leBool fill)
1082 
1083  Summary:
1084  Sets the series fill point setting
1085 
1086  Description:
1087  Sets the series fill point setting
1088 
1089  Parameters:
1090  leLineGraphWidget* _this - The line graph widget to operate on
1091  int32_t seriesID -
1092  leBool fill - the fill setting
1093 
1094  Remarks:
1095  Usage - _this->fn->setSeriesFillPoints(_this, seriesID, fill);
1096 
1097  Returns:
1098  leResult - the result of the operation
1099 */
1100 
1101 // *****************************************************************************
1102 /* Virtual Member Function:
1103  leBool getSeriesLinesVisible(const leLineGraphWidget* _this,
1104  int32_t seriesID)
1105 
1106  Summary:
1107  Gets the series lines visible setting
1108 
1109  Description:
1110  Gets the series lines visible setting
1111 
1112  Parameters:
1113  const leLineGraphWidget* _this - The line graph widget to operate on
1114  int32_t seriesID -
1115 
1116  Remarks:
1117  Usage - _this->fn->getSeriesLinesVisible(_this, seriesID);
1118 
1119  Returns:
1120  leBool - the visibility setting
1121 */
1122 
1123 // *****************************************************************************
1124 /* Virtual Member Function:
1125  leResult setSeriesLinesVisible(leLineGraphWidget* _this,
1126  int32_t seriesID,
1127  leBool vis)
1128 
1129  Summary:
1130  Sets the series lines visible setting
1131 
1132  Description:
1133  Sets the series lines visible setting
1134 
1135  Parameters:
1136  leLineGraphWidget* _this - The line graph widget to operate on
1137  int32_t seriesID -
1138  leBool vis - the visibility setting
1139 
1140  Remarks:
1141  Usage - _this->fn->setSeriesLinesVisible(_this, seriesID, vis);
1142 
1143  Returns:
1144  leResult - the result of the operation
1145 */
1146 
1147 // *****************************************************************************
1148 /* Virtual Member Function:
1149  leLineGraphDataPointType getSeriesPointType(const leLineGraphWidget* _this,
1150  int32_t seriesID)
1151 
1152  Summary:
1153  Ges the series point type setting
1154 
1155  Description:
1156  Ges the series point type setting
1157 
1158  Parameters:
1159  const leLineGraphWidget* _this - The line graph widget to operate on
1160  int32_t seriesID -
1161 
1162  Remarks:
1163  Usage - _this->fn->getSeriesPointType(_this, seriesID);
1164 
1165  Returns:
1166  leLineGraphDataPointType - the type
1167 */
1168 
1169 // *****************************************************************************
1170 /* Virtual Member Function:
1171  leResult setSeriesPointType(leLineGraphWidget* _this,
1172  int32_t seriesID,
1173  leLineGraphDataPointType type)
1174 
1175  Summary:
1176  Sets the series point type setting
1177 
1178  Description:
1179  Sets the series point type setting
1180 
1181  Parameters:
1182  leLineGraphWidget* _this - The line graph widget to operate on
1183  int32_t seriesID -
1184  leLineGraphDataPointType type - the type
1185 
1186  Remarks:
1187  Usage - _this->fn->setSeriesPointType(_this, seriesID, type);
1188 
1189  Returns:
1190  leResult - the result of the operation
1191 */
1192 
1193 // *****************************************************************************
1194 /* Virtual Member Function:
1195  uint32_t getSeriesPointSize(const leLineGraphWidget* _this,
1196  int32_t seriesID)
1197 
1198  Summary:
1199  Gets the series point size seting
1200 
1201  Description:
1202  Gets the series point size seting
1203 
1204  Parameters:
1205  const leLineGraphWidget* _this - The line graph widget to operate on
1206  int32_t seriesID -
1207 
1208  Remarks:
1209  Usage - _this->fn->getSeriesPointSize(_this, seriesID);
1210 
1211  Returns:
1212  uint32_t - the point size value
1213 */
1214 
1215 // *****************************************************************************
1216 /* Virtual Member Function:
1217  leResult setSeriesPointSize(leLineGraphWidget* _this,
1218  int32_t seriesID,
1219  uint32_t size)
1220 
1221  Summary:
1222  Sets the series point size setting
1223 
1224  Description:
1225  Sets the series point size setting
1226 
1227  Parameters:
1228  leLineGraphWidget* _this - The line graph widget to operate on
1229  int32_t seriesID - the series ID to modify
1230  uint32_t size - the size value
1231 
1232  Remarks:
1233  Usage - _this->fn->setSeriesPointSize(_this, seriesID, size);
1234 
1235  Returns:
1236  leResult - the result of the operation
1237 */
1238 
1239 // *****************************************************************************
1240 /* Virtual Member Function:
1241  leResult clear(leLineGraphWidget* _this)
1242 
1243  Summary:
1244  Clears all series data
1245 
1246  Description:
1247  Clears all series data
1248 
1249  Parameters:
1250  leLineGraphWidget* _this - The line graph widget to operate on
1251 
1252  Remarks:
1253  Usage - _this->fn->clear(_this);
1254 
1255  Returns:
1256  leResult - the result of the operation
1257 */
1258 
1259 // *****************************************************************************
1260 /* Virtual Member Function:
1261  leResult setTicksLabelFont(leLineGraphWidget* _this,
1262  const leFont* font)
1263 
1264  Summary:
1265  Sets the font to use for rendering tick labels
1266 
1267  Description:
1268  Sets the font to use for rendering tick labels
1269 
1270  Parameters:
1271  leLineGraphWidget* _this - The line graph widget to operate on
1272  const leFont* font - the font pointer
1273 
1274  Remarks:
1275  Usage - _this->fn->setTicksLabelFont(_this, font);
1276 
1277  Returns:
1278  leResult - the result of the operation
1279 */
1280 
1281 // *****************************************************************************
1282 /* Virtual Member Function:
1283  leBool getCategoryAxisLabelsVisible(const leLineGraphWidget* _this)
1284 
1285  Summary:
1286  Gets the category axis labels visible setting
1287 
1288  Description:
1289  Gets the category axis labels visible setting
1290 
1291  Parameters:
1292  const leLineGraphWidget* _this - The line graph widget to operate on
1293 
1294  Remarks:
1295  Usage - _this->fn->getCategoryAxisLabelsVisible(_this);
1296 
1297  Returns:
1298  leBool - the visibility setting
1299 */
1300 
1301 // *****************************************************************************
1302 /* Virtual Member Function:
1303  leResult setCategoryAxisLabelsVisible(leLineGraphWidget* _this,
1304  leBool vis)
1305 
1306  Summary:
1307  Sets the category axis labels visible setting
1308 
1309  Description:
1310  Sets the category axis labels visible setting
1311 
1312  Parameters:
1313  leLineGraphWidget* _this - The line graph widget to operate on
1314  leBool vis - the visibility setting
1315 
1316  Remarks:
1317  Usage - _this->fn->setCategoryAxisLabelsVisible(_this, vis);
1318 
1319  Returns:
1320  leResult - the result of the operation
1321 */
1322 
1323 // *****************************************************************************
1324 /* Virtual Member Function:
1325  leLineGraphTickPosition getValueAxisTicksPosition(const leLineGraphWidget* _this,
1326  leLineGraphValueAxis axis)
1327 
1328  Summary:
1329  Gets the value axis ticks position
1330 
1331  Description:
1332  Gets the value axis ticks position
1333 
1334  Parameters:
1335  const leLineGraphWidget* _this - The line graph widget to operate on
1336  lleLineGraphValueAxis axis - the axis to modify
1337 
1338  Remarks:
1339  Usage - _this->fn->getValueAxisTicksPosition(_this, axis);
1340 
1341  Returns:
1342  leLineGraphTickPosition - the value
1343 */
1344 
1345 // *****************************************************************************
1346 /* Virtual Member Function:
1347  leResult setValueAxisTicksPosition(leLineGraphWidget* _this,
1348  leLineGraphValueAxis axis,
1349  leLineGraphTickPosition pos)
1350 
1351  Summary:
1352  Sets the value axis ticks position
1353 
1354  Description:
1355  Sets the value axis ticks position
1356 
1357  Parameters:
1358  leLineGraphWidget* _this - The line graph widget to operate on
1359  lleLineGraphValueAxis axis - the axis to modify
1360  leLineGraphTickPosition pos -
1361 
1362  Remarks:
1363  Usage - _this->fn->setValueAxisTicksPosition(_this, axis, pos);
1364 
1365  Returns:
1366  leResult - the result of the operation
1367 */
1368 
1369 // *****************************************************************************
1370 /* Virtual Member Function:
1371  leLineGraphTickPosition getValueAxisSubticksPosition(const leLineGraphWidget* _this,
1372  leLineGraphValueAxis axis)
1373 
1374  Summary:
1375  Gets the value axis subticks position
1376 
1377  Description:
1378  Gets the value axis subticks position
1379 
1380  Parameters:
1381  const leLineGraphWidget* _this - The line graph widget to operate on
1382  lleLineGraphValueAxis axis - the axis to modify
1383 
1384  Remarks:
1385  Usage - _this->fn->getValueAxisSubticksPosition(_this, axis);
1386 
1387  Returns:
1388  leLineGraphTickPosition - the value
1389 */
1390 
1391 // *****************************************************************************
1392 /* Virtual Member Function:
1393  leResult setValueAxisSubticksPosition(leLineGraphWidget* _this,
1394  leLineGraphValueAxis axis,
1395  leLineGraphTickPosition pos)
1396 
1397  Summary:
1398  Sets the value axis subticks position
1399 
1400  Description:
1401  Sets the value axis subticks position
1402 
1403  Parameters:
1404  leLineGraphWidget* _this - The line graph widget to operate on
1405  lleLineGraphValueAxis axis - the axis to modify
1406  leLineGraphTickPosition pos -
1407 
1408  Remarks:
1409  Usage - _this->fn->setValueAxisSubticksPosition(_this, axis, pos);
1410 
1411  Returns:
1412  leResult - the result of the operation
1413 */
1414 
1415 // *****************************************************************************
1416 /* Virtual Member Function:
1417  leLineGraphTickPosition getCategoryAxisTicksPosition(const leLineGraphWidget* _this)
1418 
1419  Summary:
1420  Gets the category axis ticks position
1421 
1422  Description:
1423  Gets the category axis ticks position
1424 
1425  Parameters:
1426  const leLineGraphWidget* _this - The line graph widget to operate on
1427 
1428  Remarks:
1429  Usage - _this->fn->getCategoryAxisTicksPosition(_this);
1430 
1431  Returns:
1432  leLineGraphTickPosition -
1433 */
1434 
1435 // *****************************************************************************
1436 /* Virtual Member Function:
1437  leResult setCategoryAxisTicksPosition(leLineGraphWidget* _this,
1438  leLineGraphTickPosition pos)
1439 
1440  Summary:
1441  Sets the category axis ticks position
1442 
1443  Description:
1444  Sets the category axis ticks position
1445 
1446  Parameters:
1447  leLineGraphWidget* _this - The line graph widget to operate on
1448  leLineGraphTickPosition pos -
1449 
1450  Remarks:
1451  Usage - _this->fn->setCategoryAxisTicksPosition(_this, pos);
1452 
1453  Returns:
1454  leResult - the result of the operation
1455 */
1456 
1457 #ifdef __cplusplus
1458 }
1459 #endif
1460 
1461 #endif // LE_LINEGRAPH_WIDGET_ENABLED
1462 #endif /* LEGATO_WIDGET_LINE_GRAPH_H */
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
Used to define a widget.
Definition: legato_widget.h:624
This struct represents a array.
Definition: legato_array.h:64
Legato widget definitions.
leBool
This enum represents booleans.
Definition: legato_common.h:146
Definition: scheme.py:1
Definition: legato_scheme.h:154
Definition: widget.py:1
Fixed string functions and definitions.