tecscde 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (237) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +12 -0
  3. data/.rubocop.yml +125 -0
  4. data/.rubocop_todo.yml +188 -0
  5. data/CHANGELOG.md +3 -0
  6. data/Gemfile +6 -0
  7. data/LICENSE +46 -0
  8. data/LICENSE.ja +32 -0
  9. data/README.ja.md +200 -0
  10. data/README.md +35 -0
  11. data/Rakefile +27 -0
  12. data/bin/tecscde +64 -0
  13. data/glade/tecscde-cell-property.glade +205 -0
  14. data/glade/tecscde-celltype-property.glade +172 -0
  15. data/glade/tecscde-celltype.glade +414 -0
  16. data/glade/tecscde-export.glade +161 -0
  17. data/glade/test-cell-plugin.rb +51 -0
  18. data/glade/test-cell-property.rb +35 -0
  19. data/glade/test-export.rb +35 -0
  20. data/glade/test-palette.rb +26 -0
  21. data/lib/tcflow.rb +148 -0
  22. data/lib/tecscde.rb +65 -0
  23. data/lib/tecscde/NewCell.png +0 -0
  24. data/lib/tecscde/SelectArrow.png +0 -0
  25. data/lib/tecscde/attr_tree_view.rb +253 -0
  26. data/lib/tecscde/cell_plugin_dialog.glade +294 -0
  27. data/lib/tecscde/cell_plugin_dialog.rb +89 -0
  28. data/lib/tecscde/celltype_tree_view.rb +105 -0
  29. data/lib/tecscde/change_set_control.rb +35 -0
  30. data/lib/tecscde/change_set_control/change_set.rb +32 -0
  31. data/lib/tecscde/change_set_control/change_set_manager.rb +62 -0
  32. data/lib/tecscde/command.rb +35 -0
  33. data/lib/tecscde/control.rb +491 -0
  34. data/lib/tecscde/highlighted_objects.rb +180 -0
  35. data/lib/tecscde/logger.rb +74 -0
  36. data/lib/tecscde/main_view_and_model.rb +80 -0
  37. data/lib/tecscde/palette.glade +553 -0
  38. data/lib/tecscde/palette.rb +174 -0
  39. data/lib/tecscde/preferences.glade +117 -0
  40. data/lib/tecscde/preferences.rb +44 -0
  41. data/lib/tecscde/tecs_model.rb +1137 -0
  42. data/lib/tecscde/tecs_model/hbar.rb +68 -0
  43. data/lib/tecscde/tecs_model/tm_c_port.rb +122 -0
  44. data/lib/tecscde/tecs_model/tm_c_port_array.rb +98 -0
  45. data/lib/tecscde/tecs_model/tm_cell.rb +496 -0
  46. data/lib/tecscde/tecs_model/tm_e_port.rb +126 -0
  47. data/lib/tecscde/tecs_model/tm_e_port_array.rb +78 -0
  48. data/lib/tecscde/tecs_model/tm_join.rb +293 -0
  49. data/lib/tecscde/tecs_model/tm_join_bar.rb +146 -0
  50. data/lib/tecscde/tecs_model/tm_port.rb +238 -0
  51. data/lib/tecscde/tecs_model/tm_port_array.rb +246 -0
  52. data/lib/tecscde/tecs_model/tm_region.rb +107 -0
  53. data/lib/tecscde/tecs_model/tm_uneditable.rb +68 -0
  54. data/lib/tecscde/tecs_model/vbar.rb +68 -0
  55. data/lib/tecscde/templates/_cell_info.cde.erb +15 -0
  56. data/lib/tecscde/templates/_join_info.cde.erb +28 -0
  57. data/lib/tecscde/templates/main.cde.erb +49 -0
  58. data/lib/tecscde/tm_object.rb +91 -0
  59. data/lib/tecscde/version.rb +4 -0
  60. data/lib/tecscde/view.rb +58 -0
  61. data/lib/tecscde/view/cairo_matrix.rb +90 -0
  62. data/lib/tecscde/view/canvas.rb +59 -0
  63. data/lib/tecscde/view/constants.rb +114 -0
  64. data/lib/tecscde/view/main_view.rb +1245 -0
  65. data/lib/tecsflow.rb +475 -0
  66. data/lib/tecsflow/C_parser.tab.rb +2471 -0
  67. data/lib/tecsflow/C_parser.y.rb +1087 -0
  68. data/lib/tecsflow/classes.rb +421 -0
  69. data/lib/tecsgen.rb +581 -0
  70. data/lib/tecsgen/core/C_parser.tab.rb +2477 -0
  71. data/lib/tecsgen/core/C_parser.y +1032 -0
  72. data/lib/tecsgen/core/bnf-deb.tab.rb +5193 -0
  73. data/lib/tecsgen/core/bnf.tab.rb +5193 -0
  74. data/lib/tecsgen/core/bnf.y +2211 -0
  75. data/lib/tecsgen/core/componentobj.rb +7901 -0
  76. data/lib/tecsgen/core/ctypes.rb +226 -0
  77. data/lib/tecsgen/core/expression.rb +1031 -0
  78. data/lib/tecsgen/core/gen_xml.rb +374 -0
  79. data/lib/tecsgen/core/generate.rb +5206 -0
  80. data/lib/tecsgen/core/location.rb +116 -0
  81. data/lib/tecsgen/core/messages.rb +101 -0
  82. data/lib/tecsgen/core/optimize.rb +456 -0
  83. data/lib/tecsgen/core/plugin.rb +332 -0
  84. data/lib/tecsgen/core/pluginModule.rb +165 -0
  85. data/lib/tecsgen/core/syntaxobj.rb +1234 -0
  86. data/lib/tecsgen/core/tecs_lang.rb +306 -0
  87. data/lib/tecsgen/core/tecsgen.rb +453 -0
  88. data/lib/tecsgen/core/tecsinfo.rb +860 -0
  89. data/lib/tecsgen/core/tool_info.rb +258 -0
  90. data/lib/tecsgen/core/types.rb +1632 -0
  91. data/lib/tecsgen/core/unjoin_plugin.rb +218 -0
  92. data/lib/tecsgen/core/value.rb +650 -0
  93. data/lib/tecsgen/messages/messages_console_en_US.rb +1171 -0
  94. data/lib/tecsgen/messages/messages_console_ja_JP.rb +1171 -0
  95. data/lib/tecsgen/messages/messages_file_en_US.rb +334 -0
  96. data/lib/tecsgen/messages/messages_file_ja_JP.rb +163 -0
  97. data/lib/tecsgen/plugin/ATK1AlarmPlugin.rb +196 -0
  98. data/lib/tecsgen/plugin/ATK1DelayTaskPlugin.rb +106 -0
  99. data/lib/tecsgen/plugin/ATK1EventPlugin.rb +147 -0
  100. data/lib/tecsgen/plugin/ATK1ISRPlugin.rb +174 -0
  101. data/lib/tecsgen/plugin/ATK1KernelPlugin.rb +287 -0
  102. data/lib/tecsgen/plugin/ATK1ResourcePlugin.rb +124 -0
  103. data/lib/tecsgen/plugin/ATK1TaskPlugin.rb +220 -0
  104. data/lib/tecsgen/plugin/C2TECSBridgePlugin.rb +210 -0
  105. data/lib/tecsgen/plugin/CellPlugin.rb +61 -0
  106. data/lib/tecsgen/plugin/CelltypePlugin.rb +72 -0
  107. data/lib/tecsgen/plugin/CompositePlugin.rb +66 -0
  108. data/lib/tecsgen/plugin/DomainPlugin.rb +89 -0
  109. data/lib/tecsgen/plugin/HRP2AlarmHandlerPlugin.rb +76 -0
  110. data/lib/tecsgen/plugin/HRP2Cache.rb +1 -0
  111. data/lib/tecsgen/plugin/HRP2CyclicHandlerPlugin.rb +75 -0
  112. data/lib/tecsgen/plugin/HRP2DataqueuePlugin.rb +68 -0
  113. data/lib/tecsgen/plugin/HRP2EventflagPlugin.rb +68 -0
  114. data/lib/tecsgen/plugin/HRP2FixedSizeMemoryPoolPlugin.rb +68 -0
  115. data/lib/tecsgen/plugin/HRP2HandlerPlugin.rb +117 -0
  116. data/lib/tecsgen/plugin/HRP2KernelObjectPlugin.rb +372 -0
  117. data/lib/tecsgen/plugin/HRP2ObjectPlugin.rb +94 -0
  118. data/lib/tecsgen/plugin/HRP2Plugin.rb +140 -0
  119. data/lib/tecsgen/plugin/HRP2PostHook.rb +111 -0
  120. data/lib/tecsgen/plugin/HRP2PriorityDataqueuePlugin.rb +66 -0
  121. data/lib/tecsgen/plugin/HRP2RPCPlugin.rb +319 -0
  122. data/lib/tecsgen/plugin/HRP2SVCPlugin.rb +473 -0
  123. data/lib/tecsgen/plugin/HRP2SemaphorePlugin.rb +67 -0
  124. data/lib/tecsgen/plugin/HRP2TaskPlugin.rb +200 -0
  125. data/lib/tecsgen/plugin/HRPHandlerPlugin.rb +125 -0
  126. data/lib/tecsgen/plugin/HRPKernelObjectManager.rb +72 -0
  127. data/lib/tecsgen/plugin/HRPKernelObjectPlugin.rb +333 -0
  128. data/lib/tecsgen/plugin/HRPObjectPlugin.rb +93 -0
  129. data/lib/tecsgen/plugin/HRPPlugin.rb +356 -0
  130. data/lib/tecsgen/plugin/HRPRPCPlugin.rb +407 -0
  131. data/lib/tecsgen/plugin/HRPSVCPlugin.rb +859 -0
  132. data/lib/tecsgen/plugin/HRPTaskPlugin.rb +107 -0
  133. data/lib/tecsgen/plugin/Mruby2CBridgePlugin.rb +86 -0
  134. data/lib/tecsgen/plugin/MrubyBridgeCellPlugin.rb +264 -0
  135. data/lib/tecsgen/plugin/MrubyBridgeCelltypePlugin.rb +293 -0
  136. data/lib/tecsgen/plugin/MrubyBridgeCompositePlugin.rb +49 -0
  137. data/lib/tecsgen/plugin/MrubyBridgePlugin.rb +67 -0
  138. data/lib/tecsgen/plugin/MrubyBridgeSignaturePlugin.rb +1307 -0
  139. data/lib/tecsgen/plugin/MrubyInfoBridgePlugin.rb +14 -0
  140. data/lib/tecsgen/plugin/MrubyInfoBridgeSignaturePlugin.rb +994 -0
  141. data/lib/tecsgen/plugin/MultiPlugin.rb +57 -0
  142. data/lib/tecsgen/plugin/NotifierPlugin.rb +1217 -0
  143. data/lib/tecsgen/plugin/OpaqueMarshalerPlugin.rb +81 -0
  144. data/lib/tecsgen/plugin/OpaqueRPCPlugin.rb +323 -0
  145. data/lib/tecsgen/plugin/RPCPlugin.rb +266 -0
  146. data/lib/tecsgen/plugin/RepeatCellPlugin.rb +166 -0
  147. data/lib/tecsgen/plugin/RepeatJoinPlugin.rb +130 -0
  148. data/lib/tecsgen/plugin/SharedOpaqueRPCPlugin.rb +357 -0
  149. data/lib/tecsgen/plugin/SharedRPCPlugin.rb +329 -0
  150. data/lib/tecsgen/plugin/SignaturePlugin.rb +77 -0
  151. data/lib/tecsgen/plugin/TECS2CBridgePlugin.rb +178 -0
  152. data/lib/tecsgen/plugin/TECSInfoPlugin.rb +280 -0
  153. data/lib/tecsgen/plugin/ThroughPlugin.rb +333 -0
  154. data/lib/tecsgen/plugin/TracePlugin.rb +484 -0
  155. data/lib/tecsgen/plugin/lib/GenHRP2Marshaler.rb +761 -0
  156. data/lib/tecsgen/plugin/lib/GenOpaqueMarshaler.rb +1107 -0
  157. data/lib/tecsgen/plugin/lib/GenParamCopy.rb +365 -0
  158. data/lib/tecsgen/plugin/lib/GenTransparentMarshaler.rb +683 -0
  159. data/lib/tecsgen/plugin/lib/MrubyBridgeCelltypePluginModule.rb +283 -0
  160. data/lib/tecsgen/plugin/lib/MrubyBridgeSignaturePluginModule.rb +277 -0
  161. data/lib/tecsgen/version.rb +6 -0
  162. data/samples/FigureSamples/active/active.cde +104 -0
  163. data/samples/FigureSamples/active/active.cdl +20 -0
  164. data/samples/FigureSamples/active/active.pdf +0 -0
  165. data/samples/FigureSamples/active/active.png +0 -0
  166. data/samples/FigureSamples/active/gen/tmp_C_src.c +36 -0
  167. data/samples/FigureSamples/active/gen/tmp_cygwin_tecs.h +1908 -0
  168. data/samples/FigureSamples/active/gen/tmp_plugin_post_code.cdl +0 -0
  169. data/samples/FigureSamples/allocator/allocator-internal.png +0 -0
  170. data/samples/FigureSamples/allocator/allocator.cde +171 -0
  171. data/samples/FigureSamples/allocator/allocator.cdl +58 -0
  172. data/samples/FigureSamples/allocator/allocator.png +0 -0
  173. data/samples/FigureSamples/basic/Makefile +87 -0
  174. data/samples/FigureSamples/basic/SimpleSample-trace.cdl +50 -0
  175. data/samples/FigureSamples/basic/SimpleSample.cde +91 -0
  176. data/samples/FigureSamples/basic/SimpleSample.cdl +47 -0
  177. data/samples/FigureSamples/basic/basic.cde +93 -0
  178. data/samples/FigureSamples/basic/basic.cdl +46 -0
  179. data/samples/FigureSamples/basic/basic.png +0 -0
  180. data/samples/FigureSamples/callback/callback.cde +130 -0
  181. data/samples/FigureSamples/callback/callback.cdl +29 -0
  182. data/samples/FigureSamples/callback/callback.png +0 -0
  183. data/samples/FigureSamples/carray/carray.cde +144 -0
  184. data/samples/FigureSamples/carray/carray.cdl +38 -0
  185. data/samples/FigureSamples/carray/carray.png +0 -0
  186. data/samples/FigureSamples/cearray/cearray.cde +314 -0
  187. data/samples/FigureSamples/cearray/cearray.cdl +60 -0
  188. data/samples/FigureSamples/cearray/cearray.png +0 -0
  189. data/samples/FigureSamples/composite/composite-internal.png +0 -0
  190. data/samples/FigureSamples/composite/composite.cde +216 -0
  191. data/samples/FigureSamples/composite/composite.cdl +95 -0
  192. data/samples/FigureSamples/composite/composite.png +0 -0
  193. data/samples/FigureSamples/earray/earray.cde +142 -0
  194. data/samples/FigureSamples/earray/earray.cdl +38 -0
  195. data/samples/FigureSamples/earray/earray.png +0 -0
  196. data/samples/FigureSamples/join/Makefile +87 -0
  197. data/samples/FigureSamples/join/join.cde +132 -0
  198. data/samples/FigureSamples/join/join.cdl +40 -0
  199. data/samples/FigureSamples/join/join.png +0 -0
  200. data/samples/FigureSamples/relay/Makefile +99 -0
  201. data/samples/FigureSamples/relay/relay-internal.png +0 -0
  202. data/samples/FigureSamples/relay/relay.cde +284 -0
  203. data/samples/FigureSamples/relay/relay.cdl +52 -0
  204. data/samples/FigureSamples/relay/relay.png +0 -0
  205. data/samples/FigureSamples/rpc/Makefile +123 -0
  206. data/samples/FigureSamples/rpc/rpc-expand.png +0 -0
  207. data/samples/FigureSamples/rpc/rpc.cde +245 -0
  208. data/samples/FigureSamples/rpc/rpc.png +0 -0
  209. data/samples/FigureSamples/rpc/rpc_sample.cdl +53 -0
  210. data/samples/SimpleSample/Makefile +25 -0
  211. data/samples/SimpleSample/SimpleSample/Makefile +86 -0
  212. data/samples/SimpleSample/SimpleSample/Makefile-trace +91 -0
  213. data/samples/SimpleSample/SimpleSample/README.txt +106 -0
  214. data/samples/SimpleSample/SimpleSample/SimpleSample-trace.cdl +50 -0
  215. data/samples/SimpleSample/SimpleSample/SimpleSample.cdl +45 -0
  216. data/samples/SimpleSample/SimpleSample/src/tSample.c +77 -0
  217. data/samples/SimpleSample/SimpleSample/src/tSimple.c +48 -0
  218. data/samples/SimpleSample/SimpleSample/src/tecs-types.h +27 -0
  219. data/samples/SimpleSample/SimpleSampleOpaqueRPC/Makefile +51 -0
  220. data/samples/SimpleSample/SimpleSampleOpaqueRPC/Makefile-trace +91 -0
  221. data/samples/SimpleSample/SimpleSampleOpaqueRPC/README.txt +106 -0
  222. data/samples/SimpleSample/SimpleSampleOpaqueRPC/SimpleSample-trace.cdl +80 -0
  223. data/samples/SimpleSample/SimpleSampleOpaqueRPC/SimpleSample.cdl +77 -0
  224. data/samples/SimpleSample/SimpleSampleOpaqueRPC/rSample/Makefile +112 -0
  225. data/samples/SimpleSample/SimpleSampleOpaqueRPC/rSimple/Makefile +109 -0
  226. data/samples/SimpleSample/SimpleSampleOpaqueRPC/src/tSample.c +80 -0
  227. data/samples/SimpleSample/SimpleSampleOpaqueRPC/src/tSimple.c +47 -0
  228. data/samples/SimpleSample/SimpleSampleOpaqueRPC/src/tTaskMain.c +66 -0
  229. data/samples/SimpleSample/SimpleSampleOpaqueRPC/src/tecs-types.h +27 -0
  230. data/samples/SimpleSample/SimpleSampleTransparentRPC/Makefile +125 -0
  231. data/samples/SimpleSample/SimpleSampleTransparentRPC/Makefile-trace +130 -0
  232. data/samples/SimpleSample/SimpleSampleTransparentRPC/SimpleSample-trace.cdl +54 -0
  233. data/samples/SimpleSample/SimpleSampleTransparentRPC/SimpleSample.cdl +53 -0
  234. data/samples/SimpleSample/SimpleSampleTransparentRPC/src/tSample.c +80 -0
  235. data/samples/SimpleSample/SimpleSampleTransparentRPC/src/tSimple.c +54 -0
  236. data/tecscde.gemspec +41 -0
  237. metadata +353 -0
@@ -0,0 +1,294 @@
1
+ <?xml version="1.0"?>
2
+ <interface>
3
+ <requires lib="gtk+" version="2.16"/>
4
+ <!-- interface-naming-policy project-wide -->
5
+ <object class="GtkListStore" id="liststore_cell_plugin_list">
6
+ <columns>
7
+ <!-- column-name Cell -->
8
+ <column type="gchararray"/>
9
+ <!-- column-name Option -->
10
+ <column type="gchararray"/>
11
+ </columns>
12
+ <data>
13
+ <row>
14
+ <col id="0" translatable="yes">AAA</col>
15
+ <col id="1" translatable="yes">BBB</col>
16
+ </row>
17
+ </data>
18
+ </object>
19
+ <object class="GtkDialog" id="dialog_cell_plugin">
20
+ <property name="border_width">5</property>
21
+ <property name="title" translatable="yes">Cell Plugin</property>
22
+ <property name="modal">True</property>
23
+ <property name="type_hint">normal</property>
24
+ <property name="skip_taskbar_hint">True</property>
25
+ <property name="skip_pager_hint">True</property>
26
+ <property name="has_separator">False</property>
27
+ <child internal-child="vbox">
28
+ <object class="GtkVBox" id="dialog-vbox1">
29
+ <property name="visible">True</property>
30
+ <property name="orientation">vertical</property>
31
+ <property name="spacing">2</property>
32
+ <child>
33
+ <object class="GtkVBox" id="vbox1">
34
+ <property name="visible">True</property>
35
+ <property name="orientation">vertical</property>
36
+ <child>
37
+ <object class="GtkHBox" id="hbox1">
38
+ <property name="visible">True</property>
39
+ <child>
40
+ <object class="GtkLabel" id="label1">
41
+ <property name="visible">True</property>
42
+ <property name="xalign">0.89999997615814209</property>
43
+ <property name="xpad">10</property>
44
+ <property name="ypad">1</property>
45
+ <property name="label" translatable="yes">Cell Name</property>
46
+ <property name="justify">right</property>
47
+ </object>
48
+ <packing>
49
+ <property name="expand">False</property>
50
+ <property name="position">0</property>
51
+ </packing>
52
+ </child>
53
+ <child>
54
+ <object class="GtkLabel" id="label_cell_name">
55
+ <property name="visible">True</property>
56
+ <property name="xalign">0</property>
57
+ <property name="label" translatable="yes">CellName</property>
58
+ <property name="selectable">True</property>
59
+ </object>
60
+ <packing>
61
+ <property name="position">1</property>
62
+ </packing>
63
+ </child>
64
+ </object>
65
+ <packing>
66
+ <property name="expand">False</property>
67
+ <property name="position">0</property>
68
+ </packing>
69
+ </child>
70
+ <child>
71
+ <object class="GtkFrame" id="frame1">
72
+ <property name="visible">True</property>
73
+ <property name="label_xalign">0</property>
74
+ <child>
75
+ <object class="GtkVBox" id="vbox2">
76
+ <property name="visible">True</property>
77
+ <property name="orientation">vertical</property>
78
+ <child>
79
+ <object class="GtkTreeView" id="treeview_plugin_list">
80
+ <property name="width_request">250</property>
81
+ <property name="height_request">80</property>
82
+ <property name="visible">True</property>
83
+ <property name="can_focus">True</property>
84
+ <property name="model">liststore_cell_plugin_list</property>
85
+ <property name="search_column">0</property>
86
+ </object>
87
+ <packing>
88
+ <property name="position">0</property>
89
+ </packing>
90
+ </child>
91
+ <child>
92
+ <object class="GtkTable" id="table1">
93
+ <property name="visible">True</property>
94
+ <property name="n_rows">2</property>
95
+ <property name="n_columns">2</property>
96
+ <child>
97
+ <object class="GtkComboBox" id="combobox_cell_plugin">
98
+ <property name="visible">True</property>
99
+ </object>
100
+ <packing>
101
+ <property name="top_attach">1</property>
102
+ <property name="bottom_attach">2</property>
103
+ <property name="y_options"></property>
104
+ <property name="x_padding">5</property>
105
+ </packing>
106
+ </child>
107
+ <child>
108
+ <object class="GtkEntry" id="entry_plugin_option">
109
+ <property name="visible">True</property>
110
+ <property name="can_focus">True</property>
111
+ <property name="invisible_char">&#x25CF;</property>
112
+ </object>
113
+ <packing>
114
+ <property name="left_attach">1</property>
115
+ <property name="right_attach">2</property>
116
+ <property name="top_attach">1</property>
117
+ <property name="bottom_attach">2</property>
118
+ <property name="x_padding">5</property>
119
+ </packing>
120
+ </child>
121
+ <child>
122
+ <object class="GtkLabel" id="label7">
123
+ <property name="visible">True</property>
124
+ <property name="xalign">0</property>
125
+ <property name="xpad">5</property>
126
+ <property name="label" translatable="yes">Select Plugin</property>
127
+ </object>
128
+ <packing>
129
+ <property name="y_options">GTK_FILL</property>
130
+ </packing>
131
+ </child>
132
+ <child>
133
+ <object class="GtkHBox" id="hbox4">
134
+ <property name="visible">True</property>
135
+ <child>
136
+ <object class="GtkLabel" id="label6">
137
+ <property name="visible">True</property>
138
+ <property name="xalign">0.10000000149011612</property>
139
+ <property name="label" translatable="yes">Plugin Option String</property>
140
+ </object>
141
+ <packing>
142
+ <property name="padding">5</property>
143
+ <property name="position">3</property>
144
+ </packing>
145
+ </child>
146
+ <child>
147
+ <object class="GtkButton" id="button_add">
148
+ <property name="label" translatable="yes">Add</property>
149
+ <property name="width_request">60</property>
150
+ <property name="visible">True</property>
151
+ <property name="can_focus">True</property>
152
+ <property name="receives_default">True</property>
153
+ </object>
154
+ <packing>
155
+ <property name="expand">False</property>
156
+ <property name="padding">4</property>
157
+ <property name="pack_type">end</property>
158
+ <property name="position">2</property>
159
+ </packing>
160
+ </child>
161
+ <child>
162
+ <object class="GtkButton" id="button_change">
163
+ <property name="label" translatable="yes">Change</property>
164
+ <property name="width_request">60</property>
165
+ <property name="visible">True</property>
166
+ <property name="can_focus">True</property>
167
+ <property name="receives_default">True</property>
168
+ </object>
169
+ <packing>
170
+ <property name="expand">False</property>
171
+ <property name="padding">1</property>
172
+ <property name="pack_type">end</property>
173
+ <property name="position">1</property>
174
+ </packing>
175
+ </child>
176
+ <child>
177
+ <object class="GtkButton" id="button_del">
178
+ <property name="label" translatable="yes">Del</property>
179
+ <property name="width_request">60</property>
180
+ <property name="visible">True</property>
181
+ <property name="can_focus">True</property>
182
+ <property name="receives_default">True</property>
183
+ </object>
184
+ <packing>
185
+ <property name="expand">False</property>
186
+ <property name="padding">4</property>
187
+ <property name="pack_type">end</property>
188
+ <property name="position">0</property>
189
+ </packing>
190
+ </child>
191
+ </object>
192
+ <packing>
193
+ <property name="left_attach">1</property>
194
+ <property name="right_attach">2</property>
195
+ <property name="y_options">GTK_FILL</property>
196
+ </packing>
197
+ </child>
198
+ </object>
199
+ <packing>
200
+ <property name="expand">False</property>
201
+ <property name="padding">5</property>
202
+ <property name="position">1</property>
203
+ </packing>
204
+ </child>
205
+ </object>
206
+ </child>
207
+ <child type="label">
208
+ <object class="GtkLabel" id="label3">
209
+ <property name="visible">True</property>
210
+ <property name="label" translatable="yes">&lt;b&gt;Plugin List&lt;/b&gt;</property>
211
+ <property name="use_markup">True</property>
212
+ </object>
213
+ </child>
214
+ </object>
215
+ <packing>
216
+ <property name="position">1</property>
217
+ </packing>
218
+ </child>
219
+ <child>
220
+ <object class="GtkFrame" id="frame2">
221
+ <property name="visible">True</property>
222
+ <property name="label_xalign">0</property>
223
+ <child>
224
+ <object class="GtkTextView" id="textview_description">
225
+ <property name="width_request">250</property>
226
+ <property name="height_request">80</property>
227
+ <property name="visible">True</property>
228
+ <property name="can_focus">True</property>
229
+ <property name="editable">False</property>
230
+ </object>
231
+ </child>
232
+ <child type="label">
233
+ <object class="GtkLabel" id="label2">
234
+ <property name="visible">True</property>
235
+ <property name="label" translatable="yes">&lt;b&gt;Plugin Descriiption&lt;/b&gt;</property>
236
+ <property name="use_markup">True</property>
237
+ </object>
238
+ </child>
239
+ </object>
240
+ <packing>
241
+ <property name="position">2</property>
242
+ </packing>
243
+ </child>
244
+ </object>
245
+ <packing>
246
+ <property name="position">1</property>
247
+ </packing>
248
+ </child>
249
+ <child internal-child="action_area">
250
+ <object class="GtkHButtonBox" id="dialog-action_area1">
251
+ <property name="visible">True</property>
252
+ <property name="layout_style">end</property>
253
+ <child>
254
+ <object class="GtkButton" id="button_ok">
255
+ <property name="label" translatable="yes">OK</property>
256
+ <property name="visible">True</property>
257
+ <property name="can_focus">True</property>
258
+ <property name="receives_default">True</property>
259
+ </object>
260
+ <packing>
261
+ <property name="expand">False</property>
262
+ <property name="fill">False</property>
263
+ <property name="position">0</property>
264
+ </packing>
265
+ </child>
266
+ <child>
267
+ <object class="GtkButton" id="button_cancel">
268
+ <property name="label" translatable="yes">Cancel</property>
269
+ <property name="visible">True</property>
270
+ <property name="can_focus">True</property>
271
+ <property name="receives_default">True</property>
272
+ </object>
273
+ <packing>
274
+ <property name="expand">False</property>
275
+ <property name="fill">False</property>
276
+ <property name="position">1</property>
277
+ </packing>
278
+ </child>
279
+ </object>
280
+ <packing>
281
+ <property name="expand">False</property>
282
+ <property name="pack_type">end</property>
283
+ <property name="position">0</property>
284
+ </packing>
285
+ </child>
286
+ </object>
287
+ </child>
288
+ <action-widgets>
289
+ <action-widget response="0">button_ok</action-widget>
290
+ <action-widget response="0">button_cancel</action-widget>
291
+ </action-widgets>
292
+ </object>
293
+ <object class="GtkAction" id="action1"/>
294
+ </interface>
@@ -0,0 +1,89 @@
1
+ #
2
+ # TECSCDE - TECS Component Diagram Editor
3
+ #
4
+ # Copyright (C) 2014-2015 by TOPPERS Project
5
+ #
6
+ # The above copyright holders grant permission gratis to use,
7
+ # duplicate, modify, or redistribute (hereafter called use) this
8
+ # software (including the one made by modifying this software),
9
+ # provided that the following four conditions (1) through (4) are
10
+ # satisfied.
11
+ #
12
+ # (1) When this software is used in the form of source code, the above
13
+ # copyright notice, this use conditions, and the disclaimer shown
14
+ # below must be retained in the source code without modification.
15
+ #
16
+ # (2) When this software is redistributed in the forms usable for the
17
+ # development of other software, such as in library form, the above
18
+ # copyright notice, this use conditions, and the disclaimer shown
19
+ # below must be shown without modification in the document provided
20
+ # with the redistributed software, such as the user manual.
21
+ #
22
+ # (3) When this software is redistributed in the forms unusable for the
23
+ # development of other software, such as the case when the software
24
+ # is embedded in a piece of equipment, either of the following two
25
+ # conditions must be satisfied:
26
+ #
27
+ # (a) The above copyright notice, this use conditions, and the
28
+ # disclaimer shown below must be shown without modification in
29
+ # the document provided with the redistributed software, such as
30
+ # the user manual.
31
+ #
32
+ # (b) How the software is to be redistributed must be reported to the
33
+ # TOPPERS Project according to the procedure described
34
+ # separately.
35
+ #
36
+ # (4) The above copyright holders and the TOPPERS Project are exempt
37
+ # from responsibility for any type of damage directly or indirectly
38
+ # caused from the use of this software and are indemnified by any
39
+ # users or end users of this software from any and all causes of
40
+ # action whatsoever.
41
+ #
42
+ # THIS SOFTWARE IS PROVIDED "AS IS." THE ABOVE COPYRIGHT HOLDERS AND
43
+ # THE TOPPERS PROJECT DISCLAIM ANY EXPRESS OR IMPLIED WARRANTIES,
44
+ # INCLUDING, BUT NOT LIMITED TO, ITS APPLICABILITY TO A PARTICULAR
45
+ # PURPOSE. IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS AND THE
46
+ # TOPPERS PROJECT BE LIABLE FOR ANY TYPE OF DAMAGE DIRECTLY OR
47
+ # INDIRECTLY CAUSED FROM THE USE OF THIS SOFTWARE.
48
+ #
49
+ # $Id: cell_plugin_dialog.rb 2640 2017-06-03 11:27:12Z okuma-top $
50
+ #
51
+
52
+ module TECSCDE
53
+ class CellPluginDialog
54
+ #=== CellPluginDialog#initialize
55
+ # cell::TmCell
56
+ def initialize(cell)
57
+ @cell = cell
58
+ setup
59
+ end
60
+
61
+ def run
62
+ @dialog.show_all
63
+ @dialog.run do |response|
64
+ TECSCDE.logger.info(response)
65
+ end
66
+ @dialog.destroy
67
+ end
68
+
69
+ def setup
70
+ @builder = Gtk::Builder.new
71
+ @builder.add_from_file(File.join(__dir__, "cell_plugin_dialog.glade"))
72
+
73
+ @dialog = @builder["dialog_cell_plugin"]
74
+
75
+ @label_cell_name = @builder["label_cell_name"]
76
+ @label_cell_name.text = @cell.get_name.to_s
77
+
78
+ @button_ok = @builder["button_ok"]
79
+ @button_ok.signal_connect("clicked") do |_me|
80
+ @dialog.response(Gtk::Dialog::RESPONSE_OK)
81
+ end
82
+
83
+ @button_cancel = @builder["button_cancel"]
84
+ @button_cancel.signal_connect("clicked") do |_me|
85
+ @dialog.response(Gtk::Dialog::RESPONSE_CANCEL)
86
+ end
87
+ end
88
+ end
89
+ end
@@ -0,0 +1,105 @@
1
+ #
2
+ # TECSCDE - TECS Component Diagram Editor
3
+ #
4
+ # Copyright (C) 2014-2019 by TOPPERS Project
5
+ #
6
+ # The above copyright holders grant permission gratis to use,
7
+ # duplicate, modify, or redistribute (hereafter called use) this
8
+ # software (including the one made by modifying this software),
9
+ # provided that the following four conditions (1) through (4) are
10
+ # satisfied.
11
+ #
12
+ # (1) When this software is used in the form of source code, the above
13
+ # copyright notice, this use conditions, and the disclaimer shown
14
+ # below must be retained in the source code without modification.
15
+ #
16
+ # (2) When this software is redistributed in the forms usable for the
17
+ # development of other software, such as in library form, the above
18
+ # copyright notice, this use conditions, and the disclaimer shown
19
+ # below must be shown without modification in the document provided
20
+ # with the redistributed software, such as the user manual.
21
+ #
22
+ # (3) When this software is redistributed in the forms unusable for the
23
+ # development of other software, such as the case when the software
24
+ # is embedded in a piece of equipment, either of the following two
25
+ # conditions must be satisfied:
26
+ #
27
+ # (a) The above copyright notice, this use conditions, and the
28
+ # disclaimer shown below must be shown without modification in
29
+ # the document provided with the redistributed software, such as
30
+ # the user manual.
31
+ #
32
+ # (b) How the software is to be redistributed must be reported to the
33
+ # TOPPERS Project according to the procedure described
34
+ # separately.
35
+ #
36
+ # (4) The above copyright holders and the TOPPERS Project are exempt
37
+ # from responsibility for any type of damage directly or indirectly
38
+ # caused from the use of this software and are indemnified by any
39
+ # users or end users of this software from any and all causes of
40
+ # action whatsoever.
41
+ #
42
+ # THIS SOFTWARE IS PROVIDED "AS IS." THE ABOVE COPYRIGHT HOLDERS AND
43
+ # THE TOPPERS PROJECT DISCLAIM ANY EXPRESS OR IMPLIED WARRANTIES,
44
+ # INCLUDING, BUT NOT LIMITED TO, ITS APPLICABILITY TO A PARTICULAR
45
+ # PURPOSE. IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS AND THE
46
+ # TOPPERS PROJECT BE LIABLE FOR ANY TYPE OF DAMAGE DIRECTLY OR
47
+ # INDIRECTLY CAUSED FROM THE USE OF THIS SOFTWARE.
48
+ #
49
+
50
+ module TECSCDE
51
+ #== CelltypeTreeView: show celltype list
52
+ # formerly this class is sub-class of Gtk::TreeView
53
+ # currently this class has Gtk::TreeView
54
+ class CelltypeTreeView
55
+ COL_NAME = 0
56
+ COL_NSPATH = 1
57
+
58
+ attr_reader :tree_view # Gtk::TreeView
59
+
60
+ #=== initialize
61
+ def initialize(tree_view)
62
+ @tree_view = tree_view
63
+
64
+ # create data model
65
+ liststore = Gtk::ListStore.new(String, String)
66
+
67
+ # set data model to tree view(self)
68
+ @tree_view.set_model(liststore)
69
+
70
+ # create renderer for text
71
+ renderer = Gtk::CellRendererText.new
72
+
73
+ # set column information
74
+ col = Gtk::TreeViewColumn.new("name", renderer, text: COL_NAME)
75
+ @tree_view.append_column(col)
76
+
77
+ col = Gtk::TreeViewColumn.new("namespace", renderer, text: COL_NSPATH)
78
+ @tree_view.append_column(col)
79
+
80
+ liststore.set_sort_column_id(COL_NAME)
81
+ end
82
+
83
+ def add(celltype)
84
+ iter = @tree_view.model.append
85
+ iter[COL_NAME] = celltype.get_name
86
+ iter[COL_NSPATH] = celltype.get_owner.get_namespace_path.to_s
87
+ end
88
+
89
+ def selected
90
+ iter = @tree_view.selection.selected
91
+ if iter
92
+ [iter[COL_NAME], iter[COL_NSPATH]]
93
+ else
94
+ [nil, nil]
95
+ end
96
+ end
97
+
98
+ def delete(item)
99
+ end
100
+
101
+ def clear
102
+ @tree_view.model.clear
103
+ end
104
+ end
105
+ end