shoes 4.0.0.pre2 → 4.0.0.pre3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (311) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +32 -21
  3. metadata +18 -337
  4. data/CHANGELOG +0 -84
  5. data/Gemfile +0 -24
  6. data/Guardfile +0 -11
  7. data/Rakefile +0 -14
  8. data/app.yaml +0 -60
  9. data/benchmark/app_clear.rb +0 -21
  10. data/benchmark/clear.rb +0 -69
  11. data/benchmark/memory/text_dispose.rb +0 -9
  12. data/benchmark/para_creator.rb +0 -9
  13. data/benchmark/paras.rb +0 -52
  14. data/benchmark/urls.rb +0 -40
  15. data/bin/ruby-shoes +0 -6
  16. data/bin/shoes-guard +0 -8
  17. data/bin/shoes-stub +0 -59
  18. data/ext/install/Rakefile +0 -29
  19. data/ext/install/shoes.bat +0 -9
  20. data/lib/shoes.rb +0 -5
  21. data/lib/shoes/ui/cli.rb +0 -102
  22. data/lib/shoes/ui/help.rb +0 -535
  23. data/lib/shoes/ui/manual.rb +0 -6
  24. data/lib/shoes/version.rb +0 -3
  25. data/manifests/common.rb +0 -34
  26. data/manifests/shoes.rb +0 -44
  27. data/samples/Gemfile +0 -3
  28. data/samples/Gemfile.lock +0 -35
  29. data/samples/README +0 -97
  30. data/samples/boom.rb +0 -239
  31. data/samples/class-book-adjusted.rb +0 -45
  32. data/samples/class-book.rb +0 -43
  33. data/samples/class-book.yaml +0 -387
  34. data/samples/clicky.rb +0 -24
  35. data/samples/cy.png +0 -0
  36. data/samples/expert-definr.rb +0 -23
  37. data/samples/expert-funnies.rb +0 -60
  38. data/samples/expert-game-of-life-adjusted.rb +0 -249
  39. data/samples/expert-game-of-life.rb +0 -243
  40. data/samples/expert-irb-adjusted.rb +0 -110
  41. data/samples/expert-irb.rb +0 -112
  42. data/samples/expert-minesweeper-adjusted.rb +0 -272
  43. data/samples/expert-minesweeper.rb +0 -267
  44. data/samples/expert-othello-adjusted.rb +0 -325
  45. data/samples/expert-othello.rb +0 -318
  46. data/samples/expert-pong.rb +0 -62
  47. data/samples/expert-snake.rb +0 -78
  48. data/samples/expert-tankspank.rb +0 -385
  49. data/samples/flow.rb +0 -63
  50. data/samples/good-arc.rb +0 -45
  51. data/samples/good-clock.rb +0 -51
  52. data/samples/good-displace.rb +0 -98
  53. data/samples/good-follow.rb +0 -26
  54. data/samples/good-potato-chopping.rb +0 -22
  55. data/samples/good-reminder.rb +0 -174
  56. data/samples/good-vjot.rb +0 -58
  57. data/samples/gray.rb +0 -11
  58. data/samples/loogink.png +0 -0
  59. data/samples/nks_booklist.rb +0 -24
  60. data/samples/nks_breadsticks.rb +0 -7
  61. data/samples/nks_dancing_circle.rb +0 -13
  62. data/samples/nks_dictionary.rb +0 -23
  63. data/samples/nks_edit_box.rb +0 -4
  64. data/samples/nks_edit_line.rb +0 -6
  65. data/samples/nks_notes.rb +0 -16
  66. data/samples/nks_poem.rb +0 -22
  67. data/samples/nks_self.rb +0 -6
  68. data/samples/nks_text_sizes.rb +0 -10
  69. data/samples/nks_trurl.rb +0 -5
  70. data/samples/original-manual-adjusted.rb +0 -475
  71. data/samples/original-manual.rb +0 -472
  72. data/samples/packaging/package_me.rb +0 -6
  73. data/samples/potato_chopping/1258_s001.gif +0 -0
  74. data/samples/potato_chopping/1258_s002.gif +0 -0
  75. data/samples/potato_chopping/1258_s003.gif +0 -0
  76. data/samples/potato_chopping/1258_s004.gif +0 -0
  77. data/samples/potato_chopping/1258_s005.gif +0 -0
  78. data/samples/potato_chopping/1258_s006.gif +0 -0
  79. data/samples/potato_chopping/1258_s007.gif +0 -0
  80. data/samples/potato_chopping/1258_s008.gif +0 -0
  81. data/samples/potato_chopping/1258_s009.gif +0 -0
  82. data/samples/potato_chopping/1258_s010.gif +0 -0
  83. data/samples/potato_chopping/1258_s011.gif +0 -0
  84. data/samples/potato_chopping/1258_s012.gif +0 -0
  85. data/samples/potato_chopping/1258_s013.gif +0 -0
  86. data/samples/potato_chopping/1258_s014.gif +0 -0
  87. data/samples/potato_chopping/1258_s015.gif +0 -0
  88. data/samples/potato_chopping/1258_s016.gif +0 -0
  89. data/samples/potato_chopping/1258_s017.gif +0 -0
  90. data/samples/potato_chopping/1258_s018.gif +0 -0
  91. data/samples/potato_chopping/1258_s019.gif +0 -0
  92. data/samples/potato_chopping/1258_s020.gif +0 -0
  93. data/samples/potato_chopping/1258_s021.gif +0 -0
  94. data/samples/potato_chopping/1258_s022.gif +0 -0
  95. data/samples/potato_chopping/1258_s023.gif +0 -0
  96. data/samples/potato_chopping/1258_s024.gif +0 -0
  97. data/samples/potato_chopping/1258_s025.gif +0 -0
  98. data/samples/potato_chopping/1258_s026.gif +0 -0
  99. data/samples/potato_chopping/1258_s027.gif +0 -0
  100. data/samples/potato_chopping/1258_s028.gif +0 -0
  101. data/samples/potato_chopping/1258_s029.gif +0 -0
  102. data/samples/potato_chopping/1258_s030.gif +0 -0
  103. data/samples/potato_chopping/1258_s031.gif +0 -0
  104. data/samples/potato_chopping/1258_s032.gif +0 -0
  105. data/samples/potato_chopping/1258_s033.gif +0 -0
  106. data/samples/potato_chopping/1258_s034.gif +0 -0
  107. data/samples/potato_chopping/1258_s035.gif +0 -0
  108. data/samples/potato_chopping/1258_s036.gif +0 -0
  109. data/samples/potato_chopping/1258_s037.gif +0 -0
  110. data/samples/potato_chopping/1258_s038.gif +0 -0
  111. data/samples/potato_chopping/1258_s039.gif +0 -0
  112. data/samples/potato_chopping/1258_s040.gif +0 -0
  113. data/samples/potato_chopping/1258_s041.gif +0 -0
  114. data/samples/potato_chopping/1258_s042.gif +0 -0
  115. data/samples/potato_chopping/1258_s043.gif +0 -0
  116. data/samples/potato_chopping/1258_s044.gif +0 -0
  117. data/samples/potato_chopping/1258_s045.gif +0 -0
  118. data/samples/potato_chopping/1258_s046.gif +0 -0
  119. data/samples/potato_chopping/1258_s047.gif +0 -0
  120. data/samples/potato_chopping/1258_s048.gif +0 -0
  121. data/samples/potato_chopping/1258_s049.gif +0 -0
  122. data/samples/potato_chopping/1258_s050.gif +0 -0
  123. data/samples/potato_chopping/1258_s051.gif +0 -0
  124. data/samples/potato_chopping/1258_s052.gif +0 -0
  125. data/samples/potato_chopping/1258_s053.gif +0 -0
  126. data/samples/potato_chopping/1258_s054.gif +0 -0
  127. data/samples/potato_chopping/1258_s055.gif +0 -0
  128. data/samples/potato_chopping/1258_s056.gif +0 -0
  129. data/samples/potato_chopping/1258_s057.gif +0 -0
  130. data/samples/potato_chopping/1258_s058.gif +0 -0
  131. data/samples/potato_chopping/1258_s059.gif +0 -0
  132. data/samples/present.rb +0 -27
  133. data/samples/progress.rb +0 -10
  134. data/samples/sample1.rb +0 -30
  135. data/samples/sample12.rb +0 -21
  136. data/samples/sample13.rb +0 -13
  137. data/samples/sample14.rb +0 -64
  138. data/samples/sample15.rb +0 -18
  139. data/samples/sample16.rb +0 -10
  140. data/samples/sample17.rb +0 -10
  141. data/samples/sample2.rb +0 -14
  142. data/samples/sample21.rb +0 -5
  143. data/samples/sample23.rb +0 -8
  144. data/samples/sample24.rb +0 -21
  145. data/samples/sample27.rb +0 -18
  146. data/samples/sample3.rb +0 -14
  147. data/samples/sample31.rb +0 -22
  148. data/samples/sample34.rb +0 -27
  149. data/samples/sample35.rb +0 -32
  150. data/samples/sample37.rb +0 -8
  151. data/samples/sample4.rb +0 -7
  152. data/samples/sample42.rb +0 -14
  153. data/samples/sample45.rb +0 -11
  154. data/samples/sample56.rb +0 -10
  155. data/samples/sample6.rb +0 -9
  156. data/samples/sample7.rb +0 -3
  157. data/samples/sample8.rb +0 -7
  158. data/samples/sample9.rb +0 -10
  159. data/samples/simple-accordion.rb +0 -75
  160. data/samples/simple-anim-shapes.rb +0 -17
  161. data/samples/simple-anim-text.rb +0 -13
  162. data/samples/simple-animate.rb +0 -12
  163. data/samples/simple-arc.rb +0 -23
  164. data/samples/simple-bounce.rb +0 -24
  165. data/samples/simple-brightness-transitions.rb +0 -8
  166. data/samples/simple-button-animate.rb +0 -16
  167. data/samples/simple-calc-2.rb +0 -34
  168. data/samples/simple-calc.rb +0 -70
  169. data/samples/simple-color-selector.rb +0 -10
  170. data/samples/simple-color-transitions.rb +0 -11
  171. data/samples/simple-control-sizes.rb +0 -24
  172. data/samples/simple-curve.rb +0 -26
  173. data/samples/simple-dialogs-outside.rb +0 -12
  174. data/samples/simple-dialogs.rb +0 -32
  175. data/samples/simple-displace.rb +0 -15
  176. data/samples/simple-downloader.rb +0 -27
  177. data/samples/simple-draw.rb +0 -13
  178. data/samples/simple-editor.rb +0 -28
  179. data/samples/simple-face.rb +0 -14
  180. data/samples/simple-flow-wrap.rb +0 -11
  181. data/samples/simple-font.rb +0 -17
  182. data/samples/simple-form.rb +0 -29
  183. data/samples/simple-form.shy +0 -0
  184. data/samples/simple-fullscreen.rb +0 -4
  185. data/samples/simple-guess-game.rb +0 -28
  186. data/samples/simple-keypress.rb +0 -14
  187. data/samples/simple-manual.rb +0 -2
  188. data/samples/simple-mask.rb +0 -21
  189. data/samples/simple-menu.rb +0 -47
  190. data/samples/simple-mouse-follow.rb +0 -8
  191. data/samples/simple-move.rb +0 -13
  192. data/samples/simple-oval.rb +0 -3
  193. data/samples/simple-sample-executor.rb +0 -6
  194. data/samples/simple-shoes-intro.rb +0 -22
  195. data/samples/simple-slide.rb +0 -56
  196. data/samples/simple-sound.rb +0 -30
  197. data/samples/simple-sphere.rb +0 -28
  198. data/samples/simple-stripes.rb +0 -8
  199. data/samples/simple-tictactoe.rb +0 -238
  200. data/samples/simple-timer.rb +0 -15
  201. data/samples/simple-video.rb +0 -13
  202. data/samples/simple-visibility.rb +0 -11
  203. data/samples/simple-widget.rb +0 -9
  204. data/samples/sounds/102719__sarge4267__explosion.mp3 +0 -0
  205. data/samples/sounds/145622__andybrannan__train-fog-horn-long-wyomming.aiff +0 -0
  206. data/samples/sounds/46492__phreaksaccount__shields1.ogg +0 -0
  207. data/samples/sounds/61847__simon-rue__boink-v3.wav +0 -0
  208. data/samples/swt-raw.rb +0 -20
  209. data/samples/troll.rb +0 -22
  210. data/shoes.gemspec +0 -29
  211. data/snapshots/sample1.png +0 -0
  212. data/snapshots/sample10.png +0 -0
  213. data/snapshots/sample11.png +0 -0
  214. data/snapshots/sample12.png +0 -0
  215. data/snapshots/sample13.png +0 -0
  216. data/snapshots/sample14.png +0 -0
  217. data/snapshots/sample15.png +0 -0
  218. data/snapshots/sample16.png +0 -0
  219. data/snapshots/sample17.png +0 -0
  220. data/snapshots/sample18.png +0 -0
  221. data/snapshots/sample19.png +0 -0
  222. data/snapshots/sample2.png +0 -0
  223. data/snapshots/sample20.png +0 -0
  224. data/snapshots/sample21.png +0 -0
  225. data/snapshots/sample22.png +0 -0
  226. data/snapshots/sample23.png +0 -0
  227. data/snapshots/sample24.png +0 -0
  228. data/snapshots/sample27.png +0 -0
  229. data/snapshots/sample28.png +0 -0
  230. data/snapshots/sample29.png +0 -0
  231. data/snapshots/sample3.png +0 -0
  232. data/snapshots/sample30.png +0 -0
  233. data/snapshots/sample31.png +0 -0
  234. data/snapshots/sample34.png +0 -0
  235. data/snapshots/sample35.png +0 -0
  236. data/snapshots/sample36.png +0 -0
  237. data/snapshots/sample37.png +0 -0
  238. data/snapshots/sample4.png +0 -0
  239. data/snapshots/sample42.png +0 -0
  240. data/snapshots/sample44.png +0 -0
  241. data/snapshots/sample45.png +0 -0
  242. data/snapshots/sample46.png +0 -0
  243. data/snapshots/sample5.png +0 -0
  244. data/snapshots/sample56.png +0 -0
  245. data/snapshots/sample6.png +0 -0
  246. data/snapshots/sample7.png +0 -0
  247. data/snapshots/sample8.png +0 -0
  248. data/snapshots/sample9.png +0 -0
  249. data/snapshots/sample99.png +0 -0
  250. data/static/PKGBUILD +0 -47
  251. data/static/Shoes.icns +0 -0
  252. data/static/avatar.png +0 -0
  253. data/static/code_highlighter.js +0 -188
  254. data/static/code_highlighter_ruby.js +0 -26
  255. data/static/downloading.png +0 -0
  256. data/static/icon-debug.png +0 -0
  257. data/static/icon-error.png +0 -0
  258. data/static/icon-info.png +0 -0
  259. data/static/icon-warn.png +0 -0
  260. data/static/listbox_button1.png +0 -0
  261. data/static/listbox_button2.png +0 -0
  262. data/static/man-app.png +0 -0
  263. data/static/man-builds.png +0 -0
  264. data/static/man-builds1.png +0 -0
  265. data/static/man-editor-notepad.png +0 -0
  266. data/static/man-editor-osx.png +0 -0
  267. data/static/man-ele-background.png +0 -0
  268. data/static/man-ele-border.png +0 -0
  269. data/static/man-ele-button.png +0 -0
  270. data/static/man-ele-check.png +0 -0
  271. data/static/man-ele-editbox.png +0 -0
  272. data/static/man-ele-editline.png +0 -0
  273. data/static/man-ele-image.png +0 -0
  274. data/static/man-ele-listbox.png +0 -0
  275. data/static/man-ele-progress.png +0 -0
  276. data/static/man-ele-radio.png +0 -0
  277. data/static/man-ele-shape.png +0 -0
  278. data/static/man-ele-textblock.png +0 -0
  279. data/static/man-ele-video.png +0 -0
  280. data/static/man-intro-dmg.png +0 -0
  281. data/static/man-intro-exe.png +0 -0
  282. data/static/man-look-tiger.png +0 -0
  283. data/static/man-look-ubuntu.png +0 -0
  284. data/static/man-look-vista.png +0 -0
  285. data/static/man-run-osx.png +0 -0
  286. data/static/man-run-vista.png +0 -0
  287. data/static/man-run-xp.png +0 -0
  288. data/static/man-shot1.png +0 -0
  289. data/static/manual-en.txt +0 -3531
  290. data/static/manual-ja.txt +0 -2829
  291. data/static/manual.css +0 -184
  292. data/static/menu-corner1.png +0 -0
  293. data/static/menu-corner2.png +0 -0
  294. data/static/menu-gray.png +0 -0
  295. data/static/menu-left.png +0 -0
  296. data/static/menu-right.png +0 -0
  297. data/static/menu-top.png +0 -0
  298. data/static/shoes-dmg.jpg +0 -0
  299. data/static/shoes-icon-blue.png +0 -0
  300. data/static/shoes-icon-brown.png +0 -0
  301. data/static/shoes-icon.png +0 -0
  302. data/static/shoes-manual-apps.gif +0 -0
  303. data/static/shoes-manual-apps.png +0 -0
  304. data/static/shoes_main_window.png +0 -0
  305. data/static/stripe.png +0 -0
  306. data/static/tutor-back.png +0 -0
  307. data/tasks/changelog.rb +0 -92
  308. data/tasks/gem.rb +0 -38
  309. data/tasks/rspec.rb +0 -106
  310. data/tasks/sample.rb +0 -66
  311. data/tasks/yard.rb +0 -13
@@ -1,10 +0,0 @@
1
- Shoes.app do
2
- lb = list_box items: Shoes::COLORS.keys.map(&:to_s), choose: 'red' do |s|
3
- @o.style fill: eval(s.text)
4
- @p.text = s.text
5
- end.move(300, 0)
6
- @p = para
7
- nostroke
8
- @o = oval 100, 100, 100, 100
9
- button('print'){para lb.text}.move(500, 0)
10
- end
@@ -1,11 +0,0 @@
1
- Shoes.app do
2
- background chocolate..black, angle: 130
3
- strokewidth 20
4
- border deeppink..forestgreen, curve: 30
5
- nostroke
6
- fill crimson..cyan
7
- oval 100, 100, 100, 100, angle: 45
8
- nofill
9
- strokewidth 50
10
- rect 200, 200, 300, 200, stroke: darkblue..ivory, angle: 90
11
- end
@@ -1,24 +0,0 @@
1
- Shoes.app width: 360, height: 600, resizable: false do
2
- stroke "#dde"
3
- background "#f1f5ff"
4
- 13.times { |x| line 20, 142 + (30 * x), 320, 142 + (30 * x) }
5
- 11.times { |x| line 20 + (30 * x), 142, 20 + (30 * x), 502 }
6
-
7
- stack margin: 20 do
8
- title "Control Sizes", size: 16
9
- para "This app measures various controls against a grid of lines, to be sure they size appropriately despite the platform."
10
- stack top: 122, left: 40 do
11
- button "Standard"
12
- button "Margin: 2, Height: 28", margin: 2, height: 30
13
- edit_line "Standard", margin: 1
14
- edit_line "Margin: 4, Height: 30", height: 30, margin: 4
15
- list_box items: ["Standard"], choose: "Standard"
16
- list_box items: ["Margin: 4, Height: 32"],
17
- choose: "Margin: 4, Height: 32",
18
- height: 32, margin: 4
19
- progress
20
- progress height: 32, margin: 4
21
- edit_box
22
- end
23
- end
24
- end
@@ -1,26 +0,0 @@
1
- #
2
- # based on the cairo curve_to example
3
- # http://www.cairographics.org/samples/curve_to/
4
- #
5
- Shoes.app do
6
- x, y = 25.6, 128.0
7
- x1 = 102.4; y1 = 230.4
8
- x2 = 153.6; y2 = 25.6
9
- x3 = 230.4; y3 = 128.0
10
-
11
- nofill
12
- strokewidth 10.0
13
- shape do
14
- move_to x, y
15
- curve_to x1, y1, x2, y2, x3, y3
16
- end
17
-
18
- strokewidth 6.0
19
- stroke rgb(1.0, 0.2, 0.2, 0.6)
20
- shape do
21
- move_to x, y
22
- line_to x1, y1
23
- move_to x2, y2
24
- line_to x3, y3
25
- end
26
- end
@@ -1,12 +0,0 @@
1
- # testing dialog options inside and outside of Shoes.app.
2
- # Quite annoying, I know.
3
-
4
- alert 'This alert should pop up before you even see a window!'
5
- if confirm 'Do you really want to see that window?'
6
- Shoes.app do
7
- button 'alert' do alert 'You pressed a button.' end
8
- button 'confirm' do confirm 'You sure?' end
9
- end
10
- else
11
- alert 'Ok :-( goodbye.'
12
- end
@@ -1,32 +0,0 @@
1
- Shoes.app width: 300, height: 150, margin: 10 do
2
- def answer(v)
3
- @answer.replace v.inspect
4
- end
5
-
6
- button "Alert" do
7
- alert 'Just a simple alert'
8
- end
9
- button "Ask" do
10
- answer ask("What is your name?")
11
- end
12
- button "Confirm" do
13
- answer confirm("Would you like to proceed?")
14
- end
15
- button "Open File..." do
16
- answer ask_open_file
17
- end
18
- button "Save File..." do
19
- answer ask_save_file
20
- end
21
- button "Open Folder..." do
22
- answer ask_open_folder
23
- end
24
- button "Save Folder..." do
25
- answer ask_save_folder
26
- end
27
- button "Color" do
28
- answer ask_color("Pick a Color")
29
- end
30
-
31
- @answer = para "Answers appear here"
32
- end
@@ -1,15 +0,0 @@
1
- Shoes.app do
2
- # Shoes 3 doesn't support button.text
3
- position_report = lambda { |button, button_text| @position_report.replace "#{button_text}: (#{button.left}, #{button.top})" }
4
- flow margin: 12 do
5
- # Set up three buttons
6
- button "One", :click => proc { |button| position_report.call(button, "One") }
7
- @two = button "Two", :click => proc { |button| position_report.call(button, "Two") }
8
- button "Three", :click => proc { |button| position_report.call(button, "Three") }
9
- @position_report = para ''
10
- # Bounce the second button
11
- animate do |i|
12
- @two.displace(0, (Math.sin(i) * 6).to_i)
13
- end
14
- end
15
- end
@@ -1,27 +0,0 @@
1
- Shoes.app do
2
- background "#eee"
3
- @list = stack do
4
- para "Enter a URL to download:", margin: [10, 8, 10, 0]
5
- flow margin: 10 do
6
- @url = edit_line width: -120
7
- button "Download", width: 120 do
8
- @list.append do
9
- stack do
10
- background "#eee".."#ccd"
11
- stack margin: 10 do
12
- dl = nil
13
- para @url.text, " [", link("cancel") { dl.abort }, "]", margin: 0
14
- d = inscription "Beginning transfer.", margin: 0
15
- p = progress width: 1.0, height: 14
16
- dl = download @url.text, save: File.basename(@url.text),
17
- progress: proc { |dl|
18
- d.text = "Transferred #{dl.transferred} of #{dl.length} bytes (#{dl.percent}%)"
19
- p.fraction = dl.percent * 0.01 },
20
- finish: proc { |dl| d.text = "Download completed" }
21
- end
22
- end
23
- end
24
- end
25
- end
26
- end
27
- end
@@ -1,13 +0,0 @@
1
- Shoes.app do
2
- background "#999"
3
- stroke "#000"
4
- x, y = nil, nil
5
- motion do |_x, _y|
6
- if x and y and (x != _x or y != _y)
7
- append do
8
- line x, y, _x, _y
9
- end
10
- end
11
- x, y = _x, _y
12
- end
13
- end
@@ -1,28 +0,0 @@
1
- str, t = "", nil
2
- Shoes.app height: 500, width: 450 do
3
- background rgb(77, 77, 77)
4
- stack margin: 10 do
5
- para span("TEXT EDITOR", stroke: red, fill: white), " * USE ALT-Q TO QUIT", stroke: white
6
- end
7
- stack margin: 10 do
8
- t = para "", font: "Monospace 12px", stroke: white
9
- t.cursor = -1
10
- end
11
- keypress do |k|
12
- case k
13
- when String
14
- str += k
15
- when :backspace
16
- str.slice!(-1)
17
- when :tab
18
- str += " "
19
- when :alt_q
20
- quit
21
- when :alt_c
22
- self.clipboard = str
23
- when :alt_v
24
- str += self.clipboard
25
- end
26
- t.replace str
27
- end
28
- end
@@ -1,14 +0,0 @@
1
- #
2
- # Smiling face by Coraline Clark (age 5), 2013
3
- #
4
- Shoes.app do
5
- stack :top => 150 do
6
- @oval = oval 200, 1, 200, 200, :fill => mintcream
7
- @hair = star 200, 1, 80, 80
8
- @eye1 = star 300, 58, 10, 10, 6
9
- @eye2 = star 330, 58, 10, 10, 6
10
- @mouth= oval 310, 120, 70, 40, :fill => red
11
- @nose = line 310, 80, 340, 110
12
- @line = line 310, 140, 380, 140
13
- end
14
- end
@@ -1,11 +0,0 @@
1
- Shoes.app width: 200 do
2
- flow margin: 12, fill: red do
3
- background red
4
- # Set up three buttons
5
- button "button 1"
6
- button "button 2"
7
- button "button 3"
8
- button "button 4"
9
- button "button 5"
10
- end
11
- end
@@ -1,17 +0,0 @@
1
- Shoes.app height: 200 do
2
- font File.join(Shoes::DIR, 'fonts/Coolvetica.ttf')
3
- stack do
4
- flow do
5
- title 'Good Question'
6
- para 'Arial (default)', left: 400, top: 20
7
- end
8
- flow do
9
- title 'Cool Question', font: 'Coolvetica'
10
- para 'Coolvetica', left: 400, top: 20
11
- end
12
- flow do
13
- title 'Lucid Question', font: 'Lucida console'
14
- para 'Lucida Console', left: 400, top: 20
15
- end
16
- end
17
- end
@@ -1,29 +0,0 @@
1
- Shoes.app width: 320, height: 420 do
2
- static_dir = Shoes::DIR + "/static/"
3
- background static_dir + "menu-gray.png"
4
- background static_dir + "menu-top.png", height: 50
5
- background static_dir + "menu-left.png", top: 50, width: 55
6
- background static_dir + "menu-right.png", right: 0, top: 50, width: 55
7
- image static_dir + "menu-corner1.png", top: 0, left: 0
8
- image static_dir + "menu-corner2.png", right: 0, top: 0
9
-
10
- stack margin: 40 do
11
- stack margin: 10 do
12
- para "Name"
13
- @name = list_box items: ["Phyllis", "Ronald", "Wyatt"]
14
- end
15
- stack margin: 10 do
16
- para "Address"
17
- @address = edit_line
18
- end
19
- stack margin: 10 do
20
- para "Phone"
21
- @phone = edit_line
22
- end
23
- stack margin: 10 do
24
- button "Save" do
25
- Shoes.p [@name.text, @address.text, @phone.text]
26
- end
27
- end
28
- end
29
- end
Binary file
@@ -1,4 +0,0 @@
1
- Shoes.app do
2
- button('fullscreen') { self.fullscreen = true }
3
- button('turn back') { self.fullscreen = false }
4
- end
@@ -1,28 +0,0 @@
1
- class Answer < Shoes::Widget
2
- attr_reader :mark
3
- def initialize word
4
- mark = nil
5
- flow do
6
- flow(width: 70, height: 20){para word}
7
- mark = image(File.join(Shoes::DIR, 'samples/loogink.png'), width: 20, height: 20).hide
8
- end
9
- @mark = mark
10
- end
11
- end
12
-
13
- Shoes.app width: 200, height: 85 do
14
- stack width: 0.5, height:1.0 do
15
- background palegreen
16
- para '1. apple'
17
- ans = answer '2. tomato'
18
- para '3. orange'
19
- button('Ans.'){ans.mark.toggle}
20
- end
21
- stack width: 0.5, height: 1.0 do
22
- background lightsteelblue
23
- para '1. cat'
24
- para '2. dog'
25
- ans = answer '3. bird'
26
- button('Ans.'){ans.mark.toggle}
27
- end
28
- end
@@ -1,14 +0,0 @@
1
- Shoes.app do
2
- s = stack do
3
- title 'come on press some keys'
4
- end
5
-
6
- keypress do |key|
7
- s.append do para 'You pressed ' + key.to_s end
8
- p key
9
- end
10
- keyrelease do |key|
11
- s.append do para 'You released ' + key.to_s end
12
- p key
13
- end
14
- end
@@ -1,2 +0,0 @@
1
- Shoes.show_manual 'English'
2
- #Shoes.show_manual 'Japanese'
@@ -1,21 +0,0 @@
1
- Shoes.app do
2
- background black
3
-
4
- stack top: 0.4, left: 0.2 do
5
- @stripes = stack
6
-
7
- mask do
8
- title "Shoes", weight: "bold", size: 82
9
- end
10
- end
11
-
12
- animate 10 do
13
- @stripes.clear do
14
- 20.times do |i|
15
- strokewidth 4
16
- stroke rgb(rand(0.0..0.5), rand(0.0..1.0), rand(0.0..0.3))
17
- line 0, i * 5, 400, i * 8
18
- end
19
- end
20
- end
21
- end
@@ -1,47 +0,0 @@
1
- class MenuPanel < Shoes::Widget
2
- @@boxes = []
3
-
4
- # Handling width against internal stack until widget widths are fixed
5
- # https://github.com/shoes/shoes4/issues/641
6
- def width
7
- @stack.width
8
- end
9
-
10
- def width=(value)
11
- @stack.width = value
12
- end
13
-
14
- def initialize(color, args)
15
- @@boxes << self
16
- @stack = stack(args) do
17
- background color
18
- para link("Box #{@@boxes.length}", fg: white, fill: nil, click: "/"),
19
- margin: 18, align: "center", size: 20
20
- hover { expand }
21
- end
22
- end
23
-
24
- def expand
25
- if self.width < 170
26
- a = animate 30 do
27
- @@boxes.each do |b|
28
- b.width -= 5 if b != self and b.width > 140
29
- end
30
- self.width += 5
31
- a.stop if self.width >= 170
32
- end
33
- end
34
- end
35
- end
36
-
37
- Shoes.app width: 600, height: 130 do
38
- style(Shoes::Link, underline: nil)
39
-
40
- # hover styling currently a no-op https://github.com/shoes/shoes4/issues/638
41
- style(Shoes::LinkHover, fill: nil, underline: nil)
42
-
43
- menu_panel green, width: 170, height: 120, margin: 4
44
- menu_panel blue, width: 140, height: 120, margin: 4
45
- menu_panel red, width: 140, height: 120, margin: 4
46
- menu_panel purple, width: 140, height: 120, margin: 4
47
- end
@@ -1,8 +0,0 @@
1
- Shoes.app width: 200, height: 200 do
2
- background black
3
- fill white
4
- @circ = oval 0, 0, 100
5
- motion do |top, left|
6
- @circ.move top - 50, left - 50
7
- end
8
- end
@@ -1,13 +0,0 @@
1
- Shoes.app do
2
- flow margin: 12 do
3
- # Set up three buttons
4
- button "One"
5
- @two = button "Two"
6
- button "Three"
7
-
8
- # Bounce the second button
9
- animate do |i|
10
- @two.move(40, 40 + (Math.sin(i) * 6).to_i)
11
- end
12
- end
13
- end