semilimes mcu sdk 0.1
semilimes Software Development Kit for microcontrollers
Loading...
Searching...
No Matches
fc_single_choice.h
1#ifndef _fc_single_choice_
2#define _fc_single_choice_
3
4#include "../defines.h"
5
7{
8private:
9 SmeJson json_data;
10 char** pjson;
11 char** pjsonArray;
12
13public:
14// Function: FcSingleChoice
15
16// A component displaying a list of options and allowing only one choice
17
18// Prototype:
19// void FcMultipleChoice(char* json, char* jsonArray);
20
21// Parameters:
24
25// Returns:
27 FcSingleChoice(char* json, char* jsonArray)
28 {
29 pjson = &json;
30 pjsonArray = &jsonArray;
31 json_data.initJson(*pjson);
32 json_data.initJsonArray(*pjsonArray);
33 json_data.addPair2JsonStr(*pjson,"formComponentType","singlechoice");
34 }
35
36// Function: FcSingleChoice.setObj
37
38// Initialize the component that display a list of options and allowing only one choice
39
40// Prototype:
41// void FcSingleChoice::setObj(char* refname,char* title,bool reqSel, char* value);
42
43// Parameters:
48
49// Returns:
51 void setObj(char* refname,char* title,bool reqSel, char* value);
52
53// Function: FcSingleChoice.addOptions
54
55// add an array of options where name is the option identifier and value is the text displayed to the user
56
57// Prototype:
58// void FcSingleChoice::addOptions(char* name,char* value);
59
60// Parameters:
63
64// Returns:
66
67 void addOptions(char* name,char* value);
68
69// Function: FcSingleChoice.appendOptions
70
71// Append the selected options
72
73// Prototype:
74// void FcSingleChoice::appendOptions();
75
76// Parameters:
77
78// Returns:
80 void appendOptions();
81};
82
83#endif
Definition fc_single_choice.h:7
void setObj(char *refname, char *title, bool reqSel, char *value)
Definition fc_single_choice.cpp:19
void appendOptions()
Definition fc_single_choice.cpp:64
void addOptions(char *name, char *value)
Definition fc_single_choice.cpp:44
FcSingleChoice(char *json, char *jsonArray)
Definition fc_single_choice.h:27