Vuo  2.4.1
VuoInputEditorBlendMode.cc
Go to the documentation of this file.
1
11
12extern "C"
13{
14 #include "VuoBlendMode.h"
15}
16
21{
22 return new VuoInputEditorBlendMode();
23}
24
29{
30 json_object *optionAsJson = VuoBlendMode_getJson(blendMode);
31 char *optionSummary = VuoBlendMode_getSummary(blendMode);
32 VuoInputEditorMenuItem *optionItem = new VuoInputEditorMenuItem(optionSummary, optionAsJson);
33 free(optionSummary);
34 menu->addItem(optionItem);
35}
36
41{
42 VuoInputEditorMenuItem *optionsTree = new VuoInputEditorMenuItem("root");
43
44 bool restrictToOpenGlBlendModes = false;
45 json_object *o;
46 if (json_object_object_get_ex(details, "restrictToOpenGlBlendModes", &o))
47 restrictToOpenGlBlendModes = json_object_get_boolean(o);
48
49 if (restrictToOpenGlBlendModes)
50 {
52 optionsTree->addSeparator();
56 optionsTree->addSeparator();
59 }
60 else
61 {
63 optionsTree->addSeparator();
69 optionsTree->addSeparator();
75 optionsTree->addSeparator();
83 optionsTree->addSeparator();
88 addBlendMode(optionsTree, VuoBlendMode_Power);
89 optionsTree->addSeparator();
90 addBlendMode(optionsTree, VuoBlendMode_Hue);
92 addBlendMode(optionsTree, VuoBlendMode_Color);
94 }
95
96 return optionsTree;
97}