1 description "Creates the XML or C++ code for a new black box"
2 author "eduardo.davila at creatis.insa-lyon.fr"
8 new OutputText windowTitle
9 set windowTitle.In "Black box informations"
11 new DirectorySelector dir
12 set dir.Message "Select the location of your new black box"
14 new InputText nameBlackbox
15 set nameBlackbox.Title "Blackbox name (1 word)"
16 set nameBlackbox.In "NEW_BLACKBOX"
18 new InputText namePackage
19 set namePackage.Title "Package name (1 word)"
20 set namePackage.In "__PACKAGE__"
24 set author.Title "Author(s) (caracters '<', '>' not accepted...)"
25 set author.In "_author_"
27 new InputText description
28 set description.Title "Description (caracters '<', '>' not accepted...)"
29 set description.In "_description_"
31 #---------------------------------------------------------------------
34 new RadioButton typeBlackbox
35 set typeBlackbox.Title "Type of the blackbox :"
36 set typeBlackbox.In0 "std-template"
37 set typeBlackbox.In1 "VTK_PolyDataAlgorithm-template"
38 set typeBlackbox.In2 "VTK_ImageAlgorithm-template"
39 set typeBlackbox.In3 "widget-template "
41 new StringSelect stringselectorType
42 set stringselectorType.In0 "std"
43 set stringselectorType.In1 "VTK_PolyDataAlgorithm"
44 set stringselectorType.In2 "VTK_ImageAlgorithm"
45 set stringselectorType.In3 "widget"
46 connect typeBlackbox.Out stringselectorType.In
48 #---------------------------------------------------------------------
50 new RadioButton formatBlackbox
51 set formatBlackbox.Title "Format of the output file :"
52 set formatBlackbox.In 0
53 set formatBlackbox.In0 "C++"
54 set formatBlackbox.In1 "XML"
56 new StringSelect stringselectorFormat
57 set stringselectorFormat.In0 "C++"
58 set stringselectorFormat.In1 "XML"
59 connect formatBlackbox.Out stringselectorFormat.In
61 #---------------------------------------------------------------------
63 new OutputText dirOutput
64 connect dir.Out dirOutput.In
66 new LayoutLine layoutHor
67 set layoutHor.Orientation H
68 connect typeBlackbox.Widget layoutHor.Widget1
69 connect formatBlackbox.Widget layoutHor.Widget2
71 #new CommandButton cancelButton
72 # set cancelButton.In "quit"
73 # set cancelButton.Label "Cancel"
75 new CommandButton createButton
76 set createButton.In "print $concatStr.Out$; exec command; "
77 set createButton.Label "Run"
79 new LayoutLine buttons
80 set buttons.Orientation Horizontal
81 # connect cancelButton.Widget buttons.Widget1
82 connect createButton.Widget buttons.Widget2
85 connect windowTitle.Widget main.Widget1
86 connect dirOutput.Widget main.Widget2
87 connect nameBlackbox.Widget main.Widget3
88 connect namePackage.Widget main.Widget4
89 connect author.Widget main.Widget5
90 connect description.Widget main.Widget6
91 connect layoutHor.Widget main.Widget7
92 connect buttons.Widget main.Widget8
93 set main.WinTitle "Create new black box"
94 set main.WinDialog true
96 set main.WinHeight 520
98 #---------------------------------------------------------------------
103 new ConcatStrings dirStr
105 connect ascii.Out dirStr.In2
106 connect dir.Out dirStr.In3
107 connect ascii.Out dirStr.In4
110 new ConcatStrings packageNameStr
111 connect namePackage.Out packageNameStr.In1
112 set packageNameStr.In2 " "
114 new ConcatStrings blackboxNameStr
115 connect nameBlackbox.Out blackboxNameStr.In1
116 set blackboxNameStr.In2 " "
118 new ConcatStrings typeStr
119 connect stringselectorType.Out typeStr.In1
122 new ConcatStrings formatStr
123 connect stringselectorFormat.Out formatStr.In1
124 set formatStr.In2 " "
126 new ConcatStrings authorStr
127 set authorStr.In1 " '"
128 connect author.Out authorStr.In2
129 set authorStr.In3 "' "
131 new ConcatStrings descriptionStr
132 set descriptionStr.In1 " '"
133 connect description.Out descriptionStr.In2
134 set descriptionStr.In3 "' "
136 new Configuration conf
138 new ConcatStrings commandStr
139 set commandStr.In1 " "
140 connect ascii.Out commandStr.In2
141 connect conf.BinPath commandStr.In3
142 connect conf.FileSeparator commandStr.In4
143 set commandStr.In5 "bbCreateBlackBox"
144 connect ascii.Out commandStr.In6
145 set commandStr.In7 " "
148 new ConcatStrings concatStr
149 connect commandStr.Out concatStr.In1
150 connect dirStr.Out concatStr.In2
151 connect packageNameStr.Out concatStr.In3
152 connect blackboxNameStr.Out concatStr.In4
153 connect typeStr.Out concatStr.In5
154 connect formatStr.Out concatStr.In6
155 connect authorStr.Out concatStr.In7
156 connect descriptionStr.Out concatStr.In8
158 new ConcatStrings concatStr2
159 connect ascii.Out concatStr2.In1
160 connect concatStr.Out concatStr2.In2
161 connect ascii.Out concatStr2.In3
163 new ExecSystemCommand command
164 connect concatStr2.Out command.In