| semilimes mcu sdk 1.1.2 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
6 class FcButtonList
7{
8 private:
9 SmeJson json_data;
10 char* json = nullptr;
11 char* jsonArray = nullptr;
12
13// Function: FcButtonList.addIconOptions
14
15// add an list of options
16
17// Prototype:
18// int addIconOptions(const char*& optTemp, int optSize, char* iconName);
19
20// Parameters:
24
25// Returns:
27 int addIconOptions(char*& optTemp, int optSize, const char* iconName);
28
29 public:
31 char lineSize[7][8] = {"1", "2", "3", "4", "5", "6"};
32
33// Function: ~FcButtonList
34
35// distructor of the class, frees up the memory occupied by the array/s
36
37// Prototype:
38// ~FcButtonList()
39
40// Parameters:
41
42// Returns:
44 ~FcButtonList()
45 {
46 delete[] json;
47 delete[] jsonArray;
48 json = nullptr;
49 jsonArray = nullptr;
50 }
51
52// Function: FcButtonList.set
53
54// Initialize a group of user-clickable buttons with a label
55
56// Prototype:
57// void FcButtonList::set(const char* refname,const char* title,bool reqSel,const char* value,bool vertList,const char* linesize);
58
59// Parameters:
66
67// Returns:
69 void set(const char* refname,const char* title,bool reqSel,const char* value,bool vertList,const char* linesize);
70
71// Function: FcButtonList.addOptions
72
73// add an array of options where name is the option identifier and value is the text displayed to the user
74
75// Prototype:
76// void FcButtonList::addOptions(const char* name,const char* value, const char* iconName);
77
78// Parameters:
82
83// Returns:
85 void addOptions(const char* name,const char* value, const char* iconName);
86
87// Function: FcButtonList.appendOptions
88
89// Append the selected options
90
91// Prototype:
92// void FcButtonList::appendOptions();
93
94// Parameters:
95
96// Returns:
98 void appendOptions();
99
100// Function: FcButtonList.get
101
102// return the json script
103
104// Prototype:
105// void FcButtonList::get();
106
107// Parameters:
108
109// Returns:
111 char* get();
112};
113
114#endif
FcButtonList
Definition fc_button_list.h:7
FcButtonList::appendOptions
void appendOptions()
Definition fc_button_list.cpp:112
FcButtonList::set
void set(const char *refname, const char *title, bool reqSel, const char *value, bool vertList, const char *linesize)
Definition fc_button_list.cpp:21
FcButtonList::addOptions
void addOptions(const char *name, const char *value, const char *iconName)
Definition fc_button_list.cpp:78
FcButtonList::lineSize
char lineSize[7][8]
Definition fc_button_list.h:31
FcButtonList::~FcButtonList
~FcButtonList()
Definition fc_button_list.h:44
FcButtonList::get
char * get()
Definition fc_button_list.cpp:134