shoes 4.0.0.pre2 → 4.0.0.pre3
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.
- checksums.yaml +4 -4
- data/README.md +32 -21
- metadata +18 -337
- data/CHANGELOG +0 -84
- data/Gemfile +0 -24
- data/Guardfile +0 -11
- data/Rakefile +0 -14
- data/app.yaml +0 -60
- data/benchmark/app_clear.rb +0 -21
- data/benchmark/clear.rb +0 -69
- data/benchmark/memory/text_dispose.rb +0 -9
- data/benchmark/para_creator.rb +0 -9
- data/benchmark/paras.rb +0 -52
- data/benchmark/urls.rb +0 -40
- data/bin/ruby-shoes +0 -6
- data/bin/shoes-guard +0 -8
- data/bin/shoes-stub +0 -59
- data/ext/install/Rakefile +0 -29
- data/ext/install/shoes.bat +0 -9
- data/lib/shoes.rb +0 -5
- data/lib/shoes/ui/cli.rb +0 -102
- data/lib/shoes/ui/help.rb +0 -535
- data/lib/shoes/ui/manual.rb +0 -6
- data/lib/shoes/version.rb +0 -3
- data/manifests/common.rb +0 -34
- data/manifests/shoes.rb +0 -44
- data/samples/Gemfile +0 -3
- data/samples/Gemfile.lock +0 -35
- data/samples/README +0 -97
- data/samples/boom.rb +0 -239
- data/samples/class-book-adjusted.rb +0 -45
- data/samples/class-book.rb +0 -43
- data/samples/class-book.yaml +0 -387
- data/samples/clicky.rb +0 -24
- data/samples/cy.png +0 -0
- data/samples/expert-definr.rb +0 -23
- data/samples/expert-funnies.rb +0 -60
- data/samples/expert-game-of-life-adjusted.rb +0 -249
- data/samples/expert-game-of-life.rb +0 -243
- data/samples/expert-irb-adjusted.rb +0 -110
- data/samples/expert-irb.rb +0 -112
- data/samples/expert-minesweeper-adjusted.rb +0 -272
- data/samples/expert-minesweeper.rb +0 -267
- data/samples/expert-othello-adjusted.rb +0 -325
- data/samples/expert-othello.rb +0 -318
- data/samples/expert-pong.rb +0 -62
- data/samples/expert-snake.rb +0 -78
- data/samples/expert-tankspank.rb +0 -385
- data/samples/flow.rb +0 -63
- data/samples/good-arc.rb +0 -45
- data/samples/good-clock.rb +0 -51
- data/samples/good-displace.rb +0 -98
- data/samples/good-follow.rb +0 -26
- data/samples/good-potato-chopping.rb +0 -22
- data/samples/good-reminder.rb +0 -174
- data/samples/good-vjot.rb +0 -58
- data/samples/gray.rb +0 -11
- data/samples/loogink.png +0 -0
- data/samples/nks_booklist.rb +0 -24
- data/samples/nks_breadsticks.rb +0 -7
- data/samples/nks_dancing_circle.rb +0 -13
- data/samples/nks_dictionary.rb +0 -23
- data/samples/nks_edit_box.rb +0 -4
- data/samples/nks_edit_line.rb +0 -6
- data/samples/nks_notes.rb +0 -16
- data/samples/nks_poem.rb +0 -22
- data/samples/nks_self.rb +0 -6
- data/samples/nks_text_sizes.rb +0 -10
- data/samples/nks_trurl.rb +0 -5
- data/samples/original-manual-adjusted.rb +0 -475
- data/samples/original-manual.rb +0 -472
- data/samples/packaging/package_me.rb +0 -6
- data/samples/potato_chopping/1258_s001.gif +0 -0
- data/samples/potato_chopping/1258_s002.gif +0 -0
- data/samples/potato_chopping/1258_s003.gif +0 -0
- data/samples/potato_chopping/1258_s004.gif +0 -0
- data/samples/potato_chopping/1258_s005.gif +0 -0
- data/samples/potato_chopping/1258_s006.gif +0 -0
- data/samples/potato_chopping/1258_s007.gif +0 -0
- data/samples/potato_chopping/1258_s008.gif +0 -0
- data/samples/potato_chopping/1258_s009.gif +0 -0
- data/samples/potato_chopping/1258_s010.gif +0 -0
- data/samples/potato_chopping/1258_s011.gif +0 -0
- data/samples/potato_chopping/1258_s012.gif +0 -0
- data/samples/potato_chopping/1258_s013.gif +0 -0
- data/samples/potato_chopping/1258_s014.gif +0 -0
- data/samples/potato_chopping/1258_s015.gif +0 -0
- data/samples/potato_chopping/1258_s016.gif +0 -0
- data/samples/potato_chopping/1258_s017.gif +0 -0
- data/samples/potato_chopping/1258_s018.gif +0 -0
- data/samples/potato_chopping/1258_s019.gif +0 -0
- data/samples/potato_chopping/1258_s020.gif +0 -0
- data/samples/potato_chopping/1258_s021.gif +0 -0
- data/samples/potato_chopping/1258_s022.gif +0 -0
- data/samples/potato_chopping/1258_s023.gif +0 -0
- data/samples/potato_chopping/1258_s024.gif +0 -0
- data/samples/potato_chopping/1258_s025.gif +0 -0
- data/samples/potato_chopping/1258_s026.gif +0 -0
- data/samples/potato_chopping/1258_s027.gif +0 -0
- data/samples/potato_chopping/1258_s028.gif +0 -0
- data/samples/potato_chopping/1258_s029.gif +0 -0
- data/samples/potato_chopping/1258_s030.gif +0 -0
- data/samples/potato_chopping/1258_s031.gif +0 -0
- data/samples/potato_chopping/1258_s032.gif +0 -0
- data/samples/potato_chopping/1258_s033.gif +0 -0
- data/samples/potato_chopping/1258_s034.gif +0 -0
- data/samples/potato_chopping/1258_s035.gif +0 -0
- data/samples/potato_chopping/1258_s036.gif +0 -0
- data/samples/potato_chopping/1258_s037.gif +0 -0
- data/samples/potato_chopping/1258_s038.gif +0 -0
- data/samples/potato_chopping/1258_s039.gif +0 -0
- data/samples/potato_chopping/1258_s040.gif +0 -0
- data/samples/potato_chopping/1258_s041.gif +0 -0
- data/samples/potato_chopping/1258_s042.gif +0 -0
- data/samples/potato_chopping/1258_s043.gif +0 -0
- data/samples/potato_chopping/1258_s044.gif +0 -0
- data/samples/potato_chopping/1258_s045.gif +0 -0
- data/samples/potato_chopping/1258_s046.gif +0 -0
- data/samples/potato_chopping/1258_s047.gif +0 -0
- data/samples/potato_chopping/1258_s048.gif +0 -0
- data/samples/potato_chopping/1258_s049.gif +0 -0
- data/samples/potato_chopping/1258_s050.gif +0 -0
- data/samples/potato_chopping/1258_s051.gif +0 -0
- data/samples/potato_chopping/1258_s052.gif +0 -0
- data/samples/potato_chopping/1258_s053.gif +0 -0
- data/samples/potato_chopping/1258_s054.gif +0 -0
- data/samples/potato_chopping/1258_s055.gif +0 -0
- data/samples/potato_chopping/1258_s056.gif +0 -0
- data/samples/potato_chopping/1258_s057.gif +0 -0
- data/samples/potato_chopping/1258_s058.gif +0 -0
- data/samples/potato_chopping/1258_s059.gif +0 -0
- data/samples/present.rb +0 -27
- data/samples/progress.rb +0 -10
- data/samples/sample1.rb +0 -30
- data/samples/sample12.rb +0 -21
- data/samples/sample13.rb +0 -13
- data/samples/sample14.rb +0 -64
- data/samples/sample15.rb +0 -18
- data/samples/sample16.rb +0 -10
- data/samples/sample17.rb +0 -10
- data/samples/sample2.rb +0 -14
- data/samples/sample21.rb +0 -5
- data/samples/sample23.rb +0 -8
- data/samples/sample24.rb +0 -21
- data/samples/sample27.rb +0 -18
- data/samples/sample3.rb +0 -14
- data/samples/sample31.rb +0 -22
- data/samples/sample34.rb +0 -27
- data/samples/sample35.rb +0 -32
- data/samples/sample37.rb +0 -8
- data/samples/sample4.rb +0 -7
- data/samples/sample42.rb +0 -14
- data/samples/sample45.rb +0 -11
- data/samples/sample56.rb +0 -10
- data/samples/sample6.rb +0 -9
- data/samples/sample7.rb +0 -3
- data/samples/sample8.rb +0 -7
- data/samples/sample9.rb +0 -10
- data/samples/simple-accordion.rb +0 -75
- data/samples/simple-anim-shapes.rb +0 -17
- data/samples/simple-anim-text.rb +0 -13
- data/samples/simple-animate.rb +0 -12
- data/samples/simple-arc.rb +0 -23
- data/samples/simple-bounce.rb +0 -24
- data/samples/simple-brightness-transitions.rb +0 -8
- data/samples/simple-button-animate.rb +0 -16
- data/samples/simple-calc-2.rb +0 -34
- data/samples/simple-calc.rb +0 -70
- data/samples/simple-color-selector.rb +0 -10
- data/samples/simple-color-transitions.rb +0 -11
- data/samples/simple-control-sizes.rb +0 -24
- data/samples/simple-curve.rb +0 -26
- data/samples/simple-dialogs-outside.rb +0 -12
- data/samples/simple-dialogs.rb +0 -32
- data/samples/simple-displace.rb +0 -15
- data/samples/simple-downloader.rb +0 -27
- data/samples/simple-draw.rb +0 -13
- data/samples/simple-editor.rb +0 -28
- data/samples/simple-face.rb +0 -14
- data/samples/simple-flow-wrap.rb +0 -11
- data/samples/simple-font.rb +0 -17
- data/samples/simple-form.rb +0 -29
- data/samples/simple-form.shy +0 -0
- data/samples/simple-fullscreen.rb +0 -4
- data/samples/simple-guess-game.rb +0 -28
- data/samples/simple-keypress.rb +0 -14
- data/samples/simple-manual.rb +0 -2
- data/samples/simple-mask.rb +0 -21
- data/samples/simple-menu.rb +0 -47
- data/samples/simple-mouse-follow.rb +0 -8
- data/samples/simple-move.rb +0 -13
- data/samples/simple-oval.rb +0 -3
- data/samples/simple-sample-executor.rb +0 -6
- data/samples/simple-shoes-intro.rb +0 -22
- data/samples/simple-slide.rb +0 -56
- data/samples/simple-sound.rb +0 -30
- data/samples/simple-sphere.rb +0 -28
- data/samples/simple-stripes.rb +0 -8
- data/samples/simple-tictactoe.rb +0 -238
- data/samples/simple-timer.rb +0 -15
- data/samples/simple-video.rb +0 -13
- data/samples/simple-visibility.rb +0 -11
- data/samples/simple-widget.rb +0 -9
- data/samples/sounds/102719__sarge4267__explosion.mp3 +0 -0
- data/samples/sounds/145622__andybrannan__train-fog-horn-long-wyomming.aiff +0 -0
- data/samples/sounds/46492__phreaksaccount__shields1.ogg +0 -0
- data/samples/sounds/61847__simon-rue__boink-v3.wav +0 -0
- data/samples/swt-raw.rb +0 -20
- data/samples/troll.rb +0 -22
- data/shoes.gemspec +0 -29
- data/snapshots/sample1.png +0 -0
- data/snapshots/sample10.png +0 -0
- data/snapshots/sample11.png +0 -0
- data/snapshots/sample12.png +0 -0
- data/snapshots/sample13.png +0 -0
- data/snapshots/sample14.png +0 -0
- data/snapshots/sample15.png +0 -0
- data/snapshots/sample16.png +0 -0
- data/snapshots/sample17.png +0 -0
- data/snapshots/sample18.png +0 -0
- data/snapshots/sample19.png +0 -0
- data/snapshots/sample2.png +0 -0
- data/snapshots/sample20.png +0 -0
- data/snapshots/sample21.png +0 -0
- data/snapshots/sample22.png +0 -0
- data/snapshots/sample23.png +0 -0
- data/snapshots/sample24.png +0 -0
- data/snapshots/sample27.png +0 -0
- data/snapshots/sample28.png +0 -0
- data/snapshots/sample29.png +0 -0
- data/snapshots/sample3.png +0 -0
- data/snapshots/sample30.png +0 -0
- data/snapshots/sample31.png +0 -0
- data/snapshots/sample34.png +0 -0
- data/snapshots/sample35.png +0 -0
- data/snapshots/sample36.png +0 -0
- data/snapshots/sample37.png +0 -0
- data/snapshots/sample4.png +0 -0
- data/snapshots/sample42.png +0 -0
- data/snapshots/sample44.png +0 -0
- data/snapshots/sample45.png +0 -0
- data/snapshots/sample46.png +0 -0
- data/snapshots/sample5.png +0 -0
- data/snapshots/sample56.png +0 -0
- data/snapshots/sample6.png +0 -0
- data/snapshots/sample7.png +0 -0
- data/snapshots/sample8.png +0 -0
- data/snapshots/sample9.png +0 -0
- data/snapshots/sample99.png +0 -0
- data/static/PKGBUILD +0 -47
- data/static/Shoes.icns +0 -0
- data/static/avatar.png +0 -0
- data/static/code_highlighter.js +0 -188
- data/static/code_highlighter_ruby.js +0 -26
- data/static/downloading.png +0 -0
- data/static/icon-debug.png +0 -0
- data/static/icon-error.png +0 -0
- data/static/icon-info.png +0 -0
- data/static/icon-warn.png +0 -0
- data/static/listbox_button1.png +0 -0
- data/static/listbox_button2.png +0 -0
- data/static/man-app.png +0 -0
- data/static/man-builds.png +0 -0
- data/static/man-builds1.png +0 -0
- data/static/man-editor-notepad.png +0 -0
- data/static/man-editor-osx.png +0 -0
- data/static/man-ele-background.png +0 -0
- data/static/man-ele-border.png +0 -0
- data/static/man-ele-button.png +0 -0
- data/static/man-ele-check.png +0 -0
- data/static/man-ele-editbox.png +0 -0
- data/static/man-ele-editline.png +0 -0
- data/static/man-ele-image.png +0 -0
- data/static/man-ele-listbox.png +0 -0
- data/static/man-ele-progress.png +0 -0
- data/static/man-ele-radio.png +0 -0
- data/static/man-ele-shape.png +0 -0
- data/static/man-ele-textblock.png +0 -0
- data/static/man-ele-video.png +0 -0
- data/static/man-intro-dmg.png +0 -0
- data/static/man-intro-exe.png +0 -0
- data/static/man-look-tiger.png +0 -0
- data/static/man-look-ubuntu.png +0 -0
- data/static/man-look-vista.png +0 -0
- data/static/man-run-osx.png +0 -0
- data/static/man-run-vista.png +0 -0
- data/static/man-run-xp.png +0 -0
- data/static/man-shot1.png +0 -0
- data/static/manual-en.txt +0 -3531
- data/static/manual-ja.txt +0 -2829
- data/static/manual.css +0 -184
- data/static/menu-corner1.png +0 -0
- data/static/menu-corner2.png +0 -0
- data/static/menu-gray.png +0 -0
- data/static/menu-left.png +0 -0
- data/static/menu-right.png +0 -0
- data/static/menu-top.png +0 -0
- data/static/shoes-dmg.jpg +0 -0
- data/static/shoes-icon-blue.png +0 -0
- data/static/shoes-icon-brown.png +0 -0
- data/static/shoes-icon.png +0 -0
- data/static/shoes-manual-apps.gif +0 -0
- data/static/shoes-manual-apps.png +0 -0
- data/static/shoes_main_window.png +0 -0
- data/static/stripe.png +0 -0
- data/static/tutor-back.png +0 -0
- data/tasks/changelog.rb +0 -92
- data/tasks/gem.rb +0 -38
- data/tasks/rspec.rb +0 -106
- data/tasks/sample.rb +0 -66
- 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
|
data/samples/simple-curve.rb
DELETED
|
@@ -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
|
data/samples/simple-dialogs.rb
DELETED
|
@@ -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
|
data/samples/simple-displace.rb
DELETED
|
@@ -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
|
data/samples/simple-draw.rb
DELETED
data/samples/simple-editor.rb
DELETED
|
@@ -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
|
data/samples/simple-face.rb
DELETED
|
@@ -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
|
data/samples/simple-flow-wrap.rb
DELETED
data/samples/simple-font.rb
DELETED
|
@@ -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
|
data/samples/simple-form.rb
DELETED
|
@@ -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
|
data/samples/simple-form.shy
DELETED
|
Binary file
|
|
@@ -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
|
data/samples/simple-keypress.rb
DELETED
data/samples/simple-manual.rb
DELETED
data/samples/simple-mask.rb
DELETED
|
@@ -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
|
data/samples/simple-menu.rb
DELETED
|
@@ -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
|
data/samples/simple-move.rb
DELETED