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 LayoutLine layoutHor
64 set layoutHor.Orientation H
65 connect typeBlackbox.Widget layoutHor.Widget1
66 connect formatBlackbox.Widget layoutHor.Widget2
68 new CommandButton createButton
69 set createButton.In "exec command; quit"
70 set createButton.Label "Go"
73 connect windowTitle.Widget main.Widget1
74 connect nameBlackbox.Widget main.Widget2
75 connect namePackage.Widget main.Widget3
76 connect author.Widget main.Widget4
77 connect description.Widget main.Widget5
78 connect layoutHor.Widget main.Widget6
79 connect createButton.Widget main.Widget7
80 set main.WinTitle "Create new black box"
81 set main.WinDialog true
83 set main.WinHeight 500
85 #---------------------------------------------------------------------
87 new ConcatStrings dirStr
88 connect dir.Out dirStr.In1
91 new ConcatStrings packageNameStr
92 connect namePackage.Out packageNameStr.In1
93 set packageNameStr.In2 " "
95 new ConcatStrings blackboxNameStr
96 connect nameBlackbox.Out blackboxNameStr.In1
97 set blackboxNameStr.In2 " "
99 new ConcatStrings typeStr
100 connect stringselectorType.Out typeStr.In1
103 new ConcatStrings formatStr
104 connect stringselectorFormat.Out formatStr.In1
105 set formatStr.In2 " "
107 new ConcatStrings authorStr
108 connect author.Out authorStr.In1
109 set authorStr.In2 " "
111 new ConcatStrings descriptionStr
112 connect description.Out descriptionStr.In1
113 set descriptionStr.In2 " "
115 new Configuration conf
117 new ConcatStrings commandStr
118 connect conf.BinPath commandStr.In1
119 connect conf.FileSeparator commandStr.In2
120 set commandStr.In3 "bbCreateBlackBox "
122 new ConcatStrings concatStr
123 connect commandStr.Out concatStr.In1
124 connect dirStr.Out concatStr.In2
125 connect packageNameStr.Out concatStr.In3
126 connect blackboxNameStr.Out concatStr.In4
127 connect typeStr.Out concatStr.In5
128 connect formatStr.Out concatStr.In6
129 connect authorStr.Out concatStr.In7
130 connect descriptionStr.Out concatStr.In8
133 new ExecSystemCommand command
134 connect concatStr.Out command.In
135 print $concatStr.Out$