fork download
  1. <?xml version="1.0"?>
  2. <!-- generated by wxGlade 1.0.4 on Sun Mar 26 01:22:59 2023 -->
  3.  
  4. <application class="Hangman" encoding="UTF-8" for_version="3.0" header_extension=".h" indent_amount="4" indent_symbol="space" is_template="0" language="python" mark_blocks="1" name="Hangman" option="0" overwrite="0" path="./wxglade_out.py" source_extension=".cpp" top_window="View" use_gettext="0" use_new_namespace="1">
  5. <object class="View" name="View" base="EditFrame">
  6. <extracode>from pubsub import pub\nfrom hangman import dictionary, count_max, Env, initialize, interp\n\nmsg = {"lossmsg": 'あなたの負けです! 正解: \\n\\t{}',\n "playmsg": '当てる言葉 : \\n\\t {}',\n "successmsg": '正解!あなたの勝ちです。\\nおめでとう。'}\n\nclass Controller(object):\n def __init__(self):\n pub.subscribe(self.read, "Controller")\n def read(self, x, env):\n pub.sendMessage("Model.eval", x='y' if x == 'リセット' else 'n'\n if x == '終了' else x, env=env)\n\nclass Model(object):\n def __init__(self):\n pub.subscribe(self.eval, "Model")\n def eval(self, x, env):\n pub.sendMessage("View.SetProperties", env=interp(x, env))\n</extracode>
  7. <size>400, 300</size>
  8. <title>ハングマン</title>
  9. <style>wxCAPTION|wxMINIMIZE_BOX|wxCLOSE_BOX|wxSYSTEM_MENU|wxCLIP_CHILDREN</style>
  10. <object class="wxBoxSizer" name="sizer_1" base="EditBoxSizer">
  11. <orient>wxVERTICAL</orient>
  12. <object class="sizeritem">
  13. <option>1</option>
  14. <border>0</border>
  15. <flag>wxEXPAND</flag>
  16. <object class="wxBoxSizer" name="sizer_2" base="EditBoxSizer">
  17. <orient>wxHORIZONTAL</orient>
  18. <object class="sizeritem">
  19. <option>0</option>
  20. <border>0</border>
  21. <object class="wxStaticBitmap" name="bitmap_1" base="EditStaticBitmap">
  22. <bitmap>img/gallows1.png</bitmap>
  23. </object>
  24. </object>
  25. <object class="sizeritem">
  26. <option>1</option>
  27. <border>0</border>
  28. <flag>wxEXPAND</flag>
  29. <object class="wxGridSizer" name="grid_sizer_1" base="EditGridSizer">
  30. <rows>7</rows>
  31. <cols>4</cols>
  32. <vgap>0</vgap>
  33. <hgap>0</hgap>
  34. <object class="sizeritem">
  35. <option>0</option>
  36. <border>0</border>
  37. <object class="wxButton" name="A" base="EditButton">
  38. <events>
  39. <handler event="EVT_BUTTON">lambda event: pub.sendMessage("Controller.read", x=self.A.GetLabel(), env=self.env)</handler>
  40. </events>
  41. <size>50, 28</size>
  42. <label>A</label>
  43. </object>
  44. </object>
  45. <object class="sizeritem">
  46. <option>0</option>
  47. <border>0</border>
  48. <object class="wxButton" name="B" base="EditButton">
  49. <events>
  50. <handler event="EVT_BUTTON">lambda event: pub.sendMessage("Controller.read", x=self.B.GetLabel(), env=self.env)</handler>
  51. </events>
  52. <size>50, 28</size>
  53. <label>B</label>
  54. </object>
  55. </object>
  56. <object class="sizeritem">
  57. <option>0</option>
  58. <border>0</border>
  59. <object class="wxButton" name="C" base="EditButton">
  60. <events>
  61. <handler event="EVT_BUTTON">lambda event: pub.sendMessage("Controller.read", x=self.C.GetLabel(), env=self.env)</handler>
  62. </events>
  63. <size>50, 28</size>
  64. <label>C</label>
  65. </object>
  66. </object>
  67. <object class="sizeritem">
  68. <option>0</option>
  69. <border>0</border>
  70. <object class="wxButton" name="D" base="EditButton">
  71. <events>
  72. <handler event="EVT_BUTTON">lambda event: pub.sendMessage("Controller.read", x=self.D.GetLabel(), env=self.env)</handler>
  73. </events>
  74. <size>50, 28</size>
  75. <label>D</label>
  76. </object>
  77. </object>
  78. <object class="sizeritem">
  79. <option>0</option>
  80. <border>0</border>
  81. <object class="wxButton" name="E" base="EditButton">
  82. <events>
  83. <handler event="EVT_BUTTON">lambda event: pub.sendMessage("Controller.read", x=self.E.GetLabel(), env=self.env)</handler>
  84. </events>
  85. <size>50, 28</size>
  86. <label>E</label>
  87. </object>
  88. </object>
  89. <object class="sizeritem">
  90. <option>0</option>
  91. <border>0</border>
  92. <object class="wxButton" name="F" base="EditButton">
  93. <events>
  94. <handler event="EVT_BUTTON">lambda event: pub.sendMessage("Controller.read", x=self.F.GetLabel(), env=self.env)</handler>
  95. </events>
  96. <size>50, 28</size>
  97. <label>F</label>
  98. </object>
  99. </object>
  100. <object class="sizeritem">
  101. <option>0</option>
  102. <border>0</border>
  103. <object class="wxButton" name="G" base="EditButton">
  104. <events>
  105. <handler event="EVT_BUTTON">lambda event: pub.sendMessage("Controller.read", x=self.G.GetLabel(), env=self.env)</handler>
  106. </events>
  107. <size>50, 28</size>
  108. <label>G</label>
  109. </object>
  110. </object>
  111. <object class="sizeritem">
  112. <option>0</option>
  113. <border>0</border>
  114. <object class="wxButton" name="H" base="EditButton">
  115. <events>
  116. <handler event="EVT_BUTTON">lambda event: pub.sendMessage("Controller.read", x=self.H.GetLabel(), env=self.env)</handler>
  117. </events>
  118. <size>50, 28</size>
  119. <label>H</label>
  120. </object>
  121. </object>
  122. <object class="sizeritem">
  123. <option>0</option>
  124. <border>0</border>
  125. <object class="wxButton" name="I" base="EditButton">
  126. <events>
  127. <handler event="EVT_BUTTON">lambda event: pub.sendMessage("Controller.read", x=self.I.GetLabel(), env=self.env)</handler>
  128. </events>
  129. <size>50, 28</size>
  130. <label>I</label>
  131. </object>
  132. </object>
  133. <object class="sizeritem">
  134. <option>0</option>
  135. <border>0</border>
  136. <object class="wxButton" name="J" base="EditButton">
  137. <events>
  138. <handler event="EVT_BUTTON">lambda event: pub.sendMessage("Controller.read", x=self.J.GetLabel(), env=self.env)</handler>
  139. </events>
  140. <size>50, 28</size>
  141. <label>J</label>
  142. </object>
  143. </object>
  144. <object class="sizeritem">
  145. <option>0</option>
  146. <border>0</border>
  147. <object class="wxButton" name="K" base="EditButton">
  148. <events>
  149. <handler event="EVT_BUTTON">lambda event: pub.sendMessage("Controller.read", x=self.K.GetLabel(), env=self.env)</handler>
  150. </events>
  151. <size>50, 28</size>
  152. <label>K</label>
  153. </object>
  154. </object>
  155. <object class="sizeritem">
  156. <option>0</option>
  157. <border>0</border>
  158. <object class="wxButton" name="L" base="EditButton">
  159. <events>
  160. <handler event="EVT_BUTTON">lambda event: pub.sendMessage("Controller.read", x=self.L.GetLabel(), env=self.env)</handler>
  161. </events>
  162. <size>50, 28</size>
  163. <label>L</label>
  164. </object>
  165. </object>
  166. <object class="sizeritem">
  167. <option>0</option>
  168. <border>0</border>
  169. <object class="wxButton" name="M" base="EditButton">
  170. <events>
  171. <handler event="EVT_BUTTON">lambda event: pub.sendMessage("Controller.read", x=self.M.GetLabel(), env=self.env)</handler>
  172. </events>
  173. <size>50, 28</size>
  174. <label>M</label>
  175. </object>
  176. </object>
  177. <object class="sizeritem">
  178. <option>0</option>
  179. <border>0</border>
  180. <object class="wxButton" name="N" base="EditButton">
  181. <events>
  182. <handler event="EVT_BUTTON">lambda event: pub.sendMessage("Controller.read", x=self.N.GetLabel(), env=self.env)</handler>
  183. </events>
  184. <size>50, 28</size>
  185. <label>N</label>
  186. </object>
  187. </object>
  188. <object class="sizeritem">
  189. <option>0</option>
  190. <border>0</border>
  191. <object class="wxButton" name="O" base="EditButton">
  192. <events>
  193. <handler event="EVT_BUTTON">lambda event: pub.sendMessage("Controller.read", x=self.O.GetLabel(), env=self.env)</handler>
  194. </events>
  195. <size>50, 28</size>
  196. <label>O</label>
  197. </object>
  198. </object>
  199. <object class="sizeritem">
  200. <option>0</option>
  201. <border>0</border>
  202. <object class="wxButton" name="P" base="EditButton">
  203. <events>
  204. <handler event="EVT_BUTTON">lambda event: pub.sendMessage("Controller.read", x=self.P.GetLabel(), env=self.env)</handler>
  205. </events>
  206. <size>50, 28</size>
  207. <label>P</label>
  208. </object>
  209. </object>
  210. <object class="sizeritem">
  211. <option>0</option>
  212. <border>0</border>
  213. <object class="wxButton" name="Q" base="EditButton">
  214. <events>
  215. <handler event="EVT_BUTTON">lambda event: pub.sendMessage("Controller.read", x=self.Q.GetLabel(), env=self.env)</handler>
  216. </events>
  217. <size>50, 28</size>
  218. <label>Q</label>
  219. </object>
  220. </object>
  221. <object class="sizeritem">
  222. <option>0</option>
  223. <border>0</border>
  224. <object class="wxButton" name="R" base="EditButton">
  225. <events>
  226. <handler event="EVT_BUTTON">lambda event: pub.sendMessage("Controller.read", x=self.R.GetLabel(), env=self.env)</handler>
  227. </events>
  228. <size>50, 28</size>
  229. <label>R</label>
  230. </object>
  231. </object>
  232. <object class="sizeritem">
  233. <option>0</option>
  234. <border>0</border>
  235. <object class="wxButton" name="S" base="EditButton">
  236. <events>
  237. <handler event="EVT_BUTTON">lambda event: pub.sendMessage("Controller.read", x=self.S.GetLabel(), env=self.env)</handler>
  238. </events>
  239. <size>50, 28</size>
  240. <label>S</label>
  241. </object>
  242. </object>
  243. <object class="sizeritem">
  244. <option>0</option>
  245. <border>0</border>
  246. <object class="wxButton" name="T" base="EditButton">
  247. <events>
  248. <handler event="EVT_BUTTON">lambda event: pub.sendMessage("Controller.read", x=self.T.GetLabel(), env=self.env)</handler>
  249. </events>
  250. <size>50, 28</size>
  251. <label>T</label>
  252. </object>
  253. </object>
  254. <object class="sizeritem">
  255. <option>0</option>
  256. <border>0</border>
  257. <object class="wxButton" name="U" base="EditButton">
  258. <events>
  259. <handler event="EVT_BUTTON">lambda event: pub.sendMessage("Controller.read", x=self.U.GetLabel(), env=self.env)</handler>
  260. </events>
  261. <size>50, 28</size>
  262. <label>U</label>
  263. </object>
  264. </object>
  265. <object class="sizeritem">
  266. <option>0</option>
  267. <border>0</border>
  268. <object class="wxButton" name="V" base="EditButton">
  269. <events>
  270. <handler event="EVT_BUTTON">lambda event: pub.sendMessage("Controller.read", x=self.V.GetLabel(), env=self.env)</handler>
  271. </events>
  272. <size>50, 28</size>
  273. <label>V</label>
  274. </object>
  275. </object>
  276. <object class="sizeritem">
  277. <option>0</option>
  278. <border>0</border>
  279. <object class="wxButton" name="W" base="EditButton">
  280. <events>
  281. <handler event="EVT_BUTTON">lambda event: pub.sendMessage("Controller.read", x=self.W.GetLabel(), env=self.env)</handler>
  282. </events>
  283. <size>50, 28</size>
  284. <label>W</label>
  285. </object>
  286. </object>
  287. <object class="sizeritem">
  288. <option>0</option>
  289. <border>0</border>
  290. <object class="wxButton" name="X" base="EditButton">
  291. <events>
  292. <handler event="EVT_BUTTON">lambda event: pub.sendMessage("Controller.read", x=self.X.GetLabel(), env=self.env)</handler>
  293. </events>
  294. <size>50, 28</size>
  295. <label>X</label>
  296. </object>
  297. </object>
  298. <object class="sizeritem">
  299. <option>0</option>
  300. <border>0</border>
  301. <object class="spacer" name="spacer" base="EditSpacer">
  302. <width>50</width>
  303. <height>28</height>
  304. </object>
  305. </object>
  306. <object class="sizeritem">
  307. <option>0</option>
  308. <border>0</border>
  309. <object class="wxButton" name="Y" base="EditButton">
  310. <events>
  311. <handler event="EVT_BUTTON">lambda event: pub.sendMessage("Controller.read", x=self.Y.GetLabel(), env=self.env)</handler>
  312. </events>
  313. <size>50, 28</size>
  314. <label>Y</label>
  315. </object>
  316. </object>
  317. <object class="sizeritem">
  318. <option>0</option>
  319. <border>0</border>
  320. <object class="wxButton" name="Z" base="EditButton">
  321. <events>
  322. <handler event="EVT_BUTTON">lambda event: pub.sendMessage("Controller.read", x=self.Z.GetLabel(), env=self.env)</handler>
  323. </events>
  324. <size>50, 28</size>
  325. <label>Z</label>
  326. </object>
  327. </object>
  328. <object class="sizeritem">
  329. <option>0</option>
  330. <border>0</border>
  331. <object class="spacer" name="spacer" base="EditSpacer">
  332. <width>50</width>
  333. <height>28</height>
  334. </object>
  335. </object>
  336. </object>
  337. </object>
  338. </object>
  339. </object>
  340. <object class="sizeritem">
  341. <option>1</option>
  342. <border>0</border>
  343. <flag>wxEXPAND</flag>
  344. <object class="wxPanel" name="panel_1" base="EditPanel">
  345. <background>#3299cc</background>
  346. <object class="wxBoxSizer" name="sizer_3" base="EditBoxSizer">
  347. <orient>wxHORIZONTAL</orient>
  348. <object class="sizeritem">
  349. <option>0</option>
  350. <border>0</border>
  351. <object class="wxStaticText" name="label_1" base="EditStaticText">
  352. <size>200, 100</size>
  353. </object>
  354. </object>
  355. <object class="sizeritem">
  356. <option>0</option>
  357. <border>0</border>
  358. <flag>wxALIGN_CENTER_VERTICAL</flag>
  359. <object class="wxButton" name="Reset" base="EditButton">
  360. <events>
  361. <handler event="EVT_BUTTON">lambda event: pub.sendMessage("Controller.read", x=self.Reset.GetLabel(), env=self.env)</handler>
  362. </events>
  363. <disabled>1</disabled>
  364. <label>リセット</label>
  365. </object>
  366. </object>
  367. <object class="sizeritem">
  368. <option>0</option>
  369. <border>0</border>
  370. <flag>wxALIGN_CENTER_VERTICAL</flag>
  371. <object class="wxButton" name="Quit" base="EditButton">
  372. <events>
  373. <handler event="EVT_BUTTON">lambda event: pub.sendMessage("Controller.read", x=self.Quit.GetLabel(), env=self.env)</handler>
  374. </events>
  375. <disabled>1</disabled>
  376. <label>終了</label>
  377. </object>
  378. </object>
  379. </object>
  380. </object>
  381. </object>
  382. </object>
  383. </object>
  384. </application>
  385.  
Not running #stdin #stdout 0s 0KB
stdin
Standard input is empty
stdout
Standard output is empty