Vuo 2.4.4
Loading...
Searching...
No Matches
VuoHorizontalSide.c
Go to the documentation of this file.
1
10#include "VuoHorizontalSide.h"
11#include "VuoText.h"
12
14#ifdef VUO_COMPILER
16 "title" : "Horizontal Side",
17 "description" : "Direction on the horizontal axis (Right or Left).",
18 "keywords" : [ ],
19 "version" : "1.0.0",
20 "dependencies" : [
21 "VuoList_VuoHorizontalSide",
22 "VuoText"
23 ]
24 });
25#endif
27
34{
35 const char *valueAsString = "";
36 if (json_object_get_type(js) == json_type_string)
37 valueAsString = json_object_get_string(js);
38
39 VuoHorizontalSide value = VuoHorizontalSide_Left;
40
41 if (! strcmp(valueAsString, "right"))
42 value = VuoHorizontalSide_Right;
43
44 return value;
45}
46
51{
52 char *valueAsString = "";
53
54 switch (value)
55 {
56 case VuoHorizontalSide_Right:
57 valueAsString = "right";
58 break;
59 case VuoHorizontalSide_Left:
60 valueAsString = "left";
61 break;
62 }
63
64 return json_object_new_string(valueAsString);
65}
66
77
82{
83 if (value == VuoHorizontalSide_Left)
84 return VuoText_format("Left");
85 else
86 return VuoText_format("Right");
87
88}