semilimes mcu sdk 1.1.1
semilimes Software Development Kit for microcontrollers
Loading...
Searching...
No Matches
fc_button_list.h
1#ifndef _fc_button_list_
2#define _fc_button_list_
3
4#include "../defines.h"
5
7{
8private:
9 #define headerSize 120
10 #define headerArraySize 22
11 #define optionsHeaderSize 11
12 SmeJson json_data;
13 char* json = nullptr;
14 char* jsonArray = nullptr;
15
16// Function: FcButtonList.addIconOptions
17
18// add an list of options
19
20// Prototype:
21// void FcButtonList::addIconOptions(bool silent);
22
23// Parameters:
27
28// Returns:
30 int addIconOptions(char*& optTemp, int optSize, char* iconName);
31
32public:
34 char lineSize[7][9] = {"flexible", "1", "2", "3", "4", "5", "6"};
35
36// Function: ~FcButtonList
37
38// distructor of the class, frees up the memory occupied by the array/s
39
40// Prototype:
41// ~FcButtonList()
42
43// Parameters:
44
45// Returns:
48 {
49 delete[] json;
50 delete[] jsonArray;
51 json = nullptr;
52 jsonArray = nullptr;
53 }
54
55// Function: FcButtonList.set
56
57// Initialize a group of user-clickable buttons with a label
58
59// Prototype:
60// void FcButtonList::set(char* refname,char* title,bool reqSel,char* value,bool vertList);
61
62// Parameters:
70
71// Returns:
73 void set(char* refname,char* title,bool reqSel,char* value,bool vertList,char* linesize);
74
75// Function: FcButtonList.addOptions
76
77// add an array of options where name is the option identifier and value is the text displayed to the user
78
79// Prototype:
80// void FcButtonList::addOptions(char* data);
81
82// Parameters:
86
87// Returns:
89 void addOptions(char* name,char* value, char* iconName);
90
91// Function: FcButtonList.appendOptions
92
93// Append the selected options
94
95// Prototype:
96// void FcButtonList::appendOptions();
97
98// Parameters:
99
100// Returns:
102 void appendOptions();
103
104// Function: FcButtonList.get
105
106// return the json script
107
108// Prototype:
109// void FcButtonList::get();
110
111// Parameters:
112
113// Returns:
115 char* get();
116};
117
118#endif
Definition fc_button_list.h:7
void appendOptions()
Definition fc_button_list.cpp:112
void addOptions(char *name, char *value, char *iconName)
Definition fc_button_list.cpp:78
char lineSize[7][9]
Definition fc_button_list.h:34
void set(char *refname, char *title, bool reqSel, char *value, bool vertList, char *linesize)
Definition fc_button_list.cpp:21
~FcButtonList()
Definition fc_button_list.h:47
char * get()
Definition fc_button_list.cpp:134