semilimes mcu sdk 1.1.3 semilimes Software Development Kit for microcontrollers

Loading...
Searching...
No Matches
dc_tile_view.h
1#ifndef _fc_tile_view_
2#define _fc_tile_view_
3
4#include "../defines.h"
5
6 class DcTileView
7{
8 private:
9 SmeJson json_data;
10 char* json = nullptr;
11 char* jsonArray = nullptr;
12
13// Function: DcTileView.actionJson
14//
15//Prototype:
16// void DcTileView::actionJson(const char* action, const char* arg1, const char* arg2, bool arg3);
17//
18//Parameters:
23//
24//Returns:
26 char* actionJson(const char* action, const char* arg1, const char* arg2, bool arg3);
27
28 public:
29// indicates if the type of action to assign to a tile
30// opentile - This action opens a special bucket associated to the clicked tile.
31// openurl - This action enables the user to navigate to the specified URL upon clicking on the tile, whatever the tile type is
32// openbucket - This action enables the user to open a specified bucket (profile, channel, custom bucket).
33// openresource - This action enables the user to open a specified semilimes resource (tunnel, cloud).
34// response - This action triggers an automated message from the account where the tile resides to the account that clicks on the tile.
36 char actionType[5][13] = {"opentile", "openurl", "openbucket", "openresource", "response"};
37
38// Function: ~DcTileView
39
40// distructor of the class, frees up the memory occupied by the array/s
41
42// Prototype:
43// ~DcTileView()
44
45// Parameters:
46
47// Returns:
49 ~DcTileView()
50 {
51 delete[] json;
52 delete[] jsonArray;
53 json = nullptr;
54 jsonArray = nullptr;
55 }
56
57// Function: DcTileView.set
58//
59// A message displaying a grid of tiles, customizable in position and size. Each tile can display different types of content. With this component you can define the height of the grid, and position the tiles accordingly.
60//
61// Prototype:
62// void DcTileView::set(int row);
63//
64// Parameters:
66//
67// Returns:
69 void set(int grid);
70
71// Function: DcTileView.addColorTile
72//
73// Add a new color tile to the tile view.Each tile view can be positioned in this matrix by defining its row and column properties.
74// Additionally, you can define a rowSpan to make the tile occupy more rows (vertically), and a colSpan to make it occupy more columns (horizontally)
75//
76// Prototype:
77// void DcTileView::addColorTile(const char* refName,const char* title,int row, int rowSpan, int col, int colSpan, const char* color, const char* action, const char* arg1, const char* arg2="", bool arg3=false);
78//
79// Parameters:
91//
92// Returns:
94 void addColorTile(const char* refName,const char* title,int row, int rowSpan, int col, int colSpan, const char* color, const char* action, const char* arg1, const char* arg2="", bool arg3=false);
95
96// Function: DcTileView.addIconTile
97//
98// Add a new color tile to the tile view.Each tile view can be positioned in this matrix by defining its row and column properties.
99// Additionally, you can define a rowSpan to make the tile occupy more rows (vertically), and a colSpan to make it occupy more columns (horizontally)
100//
101// Prototype:
102// void DcTileView::addIconTile(const char* refName,const char* title,int row, int rowSpan, int col, int colSpan, const char* color, const char* action, const char* arg1, const char* arg2="", bool arg3=false);
103//
104// Parameters:
118//
119// Returns:
121 void addIconTile(const char* refName,const char* title,int row, int rowSpan, int col, int colSpan, const char* iconName, const char* iconColor, const char* backgroundColor, const char* action, const char* arg1, const char* arg2="", bool arg3=false);
122
123// Function: DcTileView.addPhotoTile
124//
125// Add a new photo tile to the tile view.Each tile view can be positioned in this matrix by defining its row and column properties.
126// Additionally, you can define a rowSpan to make the tile occupy more rows (vertically), and a colSpan to make it occupy more columns (horizontally)
127//
128// Prototype:
129// void DcTileView::addPhotoTile(const char* refName,const char* title,int row, int rowSpan, int col, int colSpan, const char* uuid, const char* action, const char* arg1, const char* arg2="", bool arg3=false);
130//
131// Parameters:
143//
144// Returns:
146 void addPhotoTile(const char* refName,const char* title,int row, int rowSpan, int col, int colSpan, const char* uuid, const char* action, const char* arg1, const char* arg2="", bool arg3=false);
147
148// Function: DcTileView.addPhotoUrlTile
149//
150// Add a new photo url tile to the tile view.Each tile view can be positioned in this matrix by defining its row and column properties.
151// Additionally, you can define a rowSpan to make the tile occupy more rows (vertically), and a colSpan to make it occupy more columns (horizontally)
152//
153// Prototype:
154// void DcTileView::addPhotoUrlTile(const char* refName,const char* title,int row, int rowSpan, int col, int colSpan, const char* photoUrl, const char* action, const char* arg1, const char* arg2="", bool arg3=false);
155//
156// Parameters:
168//
169// Returns:
171 void addPhotoUrlTile(const char* refName, const char* title,int row, int rowSpan, int col, int colSpan, const char* photoUrl, const char* action, const char* arg1, const char* arg2="", bool arg3=false);
172
173// Function: DcTileView.addWebUrlTile
174//
175// Add a new web url tile to the tile view.Each tile view can be positioned in this matrix by defining its row and column properties.
176// Additionally, you can define a rowSpan to make the tile occupy more rows (vertically), and a colSpan to make it occupy more columns (horizontally)
177//
178// Prototype:
179// void DcTileView::addWebUrlTile(const char* refName,const char* title,int row, int rowSpan, int col, int colSpan, const char* url, const char* action, const char* arg1, const char* arg2="", bool arg3=false);
180//
181// Parameters:
193//
194// Returns:
196 void addWebUrlTile(const char* refName,const char* title,int row, int rowSpan, int col, int colSpan, const char* url, const char* action, const char* arg1, const char* arg2="", bool arg3=false);
197
198// Function: DcTileView.addLiveWebUrlTile
199//
200// Add a new live web url tile to the tile view.Each tile view can be positioned in this matrix by defining its row and column properties.
201// Additionally, you can define a rowSpan to make the tile occupy more rows (vertically), and a colSpan to make it occupy more columns (horizontally)
202//
203// Prototype:
204// void DcTileView::addLiveWebUrlTile(const char* refName,const char* title,int row, int rowSpan, int col, int colSpan, const char* url, const char* action, const char* arg1, const char* arg2="", bool arg3=false);
205//
206// Parameters:
218//
219// Returns:
221 void addLiveWebUrlTile(const char* refName,const char* title,int row, int rowSpan, int col, int colSpan, const char* url, const char* action, const char* arg1, const char* arg2="", bool arg3=false);
222
223// Function: DcTileView.addResourceTile
224//
225// Add a new tile for viewing and interacting with a resource or a tunnel in the tile view.
226// Each tile view can be positioned in this matrix by defining its row and column properties.
227// Additionally, you can define a rowSpan to make the tile occupy more rows (vertically), and a colSpan to make it occupy more columns (horizontally)
228//
229// Prototype:
230// void DcTileView::addResourceTile(const char* refName,const char* title,int row, int rowSpan, int col, int colSpan, const char* resourceId, const char* subPath, const char* action, const char* arg1, const char* arg2="", bool arg3=false);
231//
232// Parameters:
245//
246// Returns:
248 void addResourceTile(const char* refName,const char* title,int row, int rowSpan, int col, int colSpan,
249 const char* resourceId, const char* subPath, const char* action, const char* arg1, const char* arg2="", bool arg3=false);
250// Function: DcTileView.addSlideshowTile
251//
252// Add a tile to display an automatic slideshow with default images provided by semilimes in the tile view.
253// Each tile view can be positioned in this matrix by defining its row and column properties.
254// Additionally, you can define a rowSpan to make the tile occupy more rows (vertically), and a colSpan to make it occupy more columns (horizontally)
255//
256// Prototype:
257// void DcTileView::addSlideshowTile(const char* refName,const char* title,int row, int rowSpan, int col, int colSpan, const char* action, const char* arg1, const char* arg2="", bool arg3=false);
258//
259// Parameters:
270//
271// Returns:
273 void addSlideshowTile(const char* refName, const char* title,int row, int rowSpan, int col, int colSpan, const char* action, const char* arg1, const char* arg2="", bool arg3=false);
274
275// Function: DcTileView.addFormTile
276//
277// Add a Form in the tile view. Each tile view can be positioned in this matrix by defining its row and column properties.
278// Additionally, you can define a rowSpan to make the tile occupy more rows (vertically), and a colSpan to make it occupy more columns (horizontally)
279//
280// Prototype:
281// void DcTileView::addFormTile(const char* refName,const char* title,int row, int rowSpan, int col, int colSpan, const char* form, const char* action, const char* arg1, const char* arg2="", bool arg3=false);
282//
283// Parameters:
295//
296// Returns:
298 void addFormTile(const char* refName, const char* title,int row, int rowSpan, int col, int colSpan, const char* form, const char* action, const char* arg1, const char* arg2="", bool arg3=false);
299
300// Function: DcTileView.appendTiles
301
302// Append the selected tiles
303
304// Prototype:
305// void DcTileView::appendTiles();
306
307// Parameters:
308
309// Returns:
311 void appendTiles();
312
313// Function: DcTileView.get
314
315// return the json script
316
317// Prototype:
318// void DcTileView::get();
319
320// Parameters:
321
322// Returns:
324 char* get();
325};
326
327#endif
DcTileView
Definition dc_tile_view.h:7
DcTileView::addPhotoTile
void addPhotoTile(const char *refName, const char *title, int row, int rowSpan, int col, int colSpan, const char *uuid, const char *action, const char *arg1, const char *arg2="", bool arg3=false)
Definition dc_tile_view.cpp:254
DcTileView::addLiveWebUrlTile
void addLiveWebUrlTile(const char *refName, const char *title, int row, int rowSpan, int col, int colSpan, const char *url, const char *action, const char *arg1, const char *arg2="", bool arg3=false)
Definition dc_tile_view.cpp:446
DcTileView::addPhotoUrlTile
void addPhotoUrlTile(const char *refName, const char *title, int row, int rowSpan, int col, int colSpan, const char *photoUrl, const char *action, const char *arg1, const char *arg2="", bool arg3=false)
Definition dc_tile_view.cpp:318
DcTileView::set
void set(int grid)
Definition dc_tile_view.cpp:16
DcTileView::addResourceTile
void addResourceTile(const char *refName, const char *title, int row, int rowSpan, int col, int colSpan, const char *resourceId, const char *subPath, const char *action, const char *arg1, const char *arg2="", bool arg3=false)
Definition dc_tile_view.cpp:513
DcTileView::addColorTile
void addColorTile(const char *refName, const char *title, int row, int rowSpan, int col, int colSpan, const char *color, const char *action, const char *arg1, const char *arg2="", bool arg3=false)
Definition dc_tile_view.cpp:122
DcTileView::addSlideshowTile
void addSlideshowTile(const char *refName, const char *title, int row, int rowSpan, int col, int colSpan, const char *action, const char *arg1, const char *arg2="", bool arg3=false)
Definition dc_tile_view.cpp:578
DcTileView::addIconTile
void addIconTile(const char *refName, const char *title, int row, int rowSpan, int col, int colSpan, const char *iconName, const char *iconColor, const char *backgroundColor, const char *action, const char *arg1, const char *arg2="", bool arg3=false)
Definition dc_tile_view.cpp:188
DcTileView::addWebUrlTile
void addWebUrlTile(const char *refName, const char *title, int row, int rowSpan, int col, int colSpan, const char *url, const char *action, const char *arg1, const char *arg2="", bool arg3=false)
Definition dc_tile_view.cpp:382
DcTileView::~DcTileView
~DcTileView()
Definition dc_tile_view.h:49
DcTileView::actionType
char actionType[5][13]
Definition dc_tile_view.h:36
DcTileView::appendTiles
void appendTiles()
Definition dc_tile_view.cpp:693
DcTileView::get
char * get()
Definition dc_tile_view.cpp:715
DcTileView::addFormTile
void addFormTile(const char *refName, const char *title, int row, int rowSpan, int col, int colSpan, const char *form, const char *action, const char *arg1, const char *arg2="", bool arg3=false)
Definition dc_tile_view.cpp:641