Vuo  2.0.0
VuoCommentEditor.cc
Go to the documentation of this file.
1 
10 #include "VuoCommentEditor.hh"
11 
12 extern "C"
13 {
14  #include "VuoText.h"
15 }
16 
17 const int VuoCommentEditor::commentMargin = 15;
18 
23  : VuoTextEditor()
24 {
25  width = 0;
26  height = 0;
27 }
28 
33 json_object * VuoCommentEditor::show(QPoint portLeftCenter, json_object *originalValue, json_object *details)
34 {
35  map<QString, json_object *> portNamesAndValues;
36  json_object_object_add(details, "showArrow", json_object_new_boolean(false));
37  return VuoInputEditorWithDialog::show(portLeftCenter-QPoint(commentMargin,0), originalValue, details, portNamesAndValues);
38 }
39 
43 void VuoCommentEditor::resizeToFitText(void)
44 {
45  VuoTextEditor::resizeToFitTextWithBaseline(width-2*commentMargin, height-2*commentMargin);
46 }
47 
52 {
53  this->width = width;
54 }
55 
60 {
61  this->height = height;
62 }
63 
68 bool VuoCommentEditor::getCodeEditor(json_object *details)
69 {
70  return false;
71 }
72 
77 {
78  return false;
79 }