shoesgem 0.1469.0 → 0.1480.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (43) hide show
  1. data/shoes/VERSION.txt +1 -1
  2. data/shoes/freetype6.dll +0 -0
  3. data/shoes/lib/shoes/help.rb +48 -2
  4. data/shoes/lib/shoes/inspect.rb +1 -1
  5. data/shoes/libcairo-2.dll +0 -0
  6. data/shoes/libeay32.dll +0 -0
  7. data/shoes/libexpat-1.dll +0 -0
  8. data/shoes/libfontconfig-1.dll +0 -0
  9. data/shoes/libgio-2.0-0.dll +0 -0
  10. data/shoes/libglib-2.0-0.dll +0 -0
  11. data/shoes/libgmodule-2.0-0.dll +0 -0
  12. data/shoes/libgobject-2.0-0.dll +0 -0
  13. data/shoes/libgthread-2.0-0.dll +0 -0
  14. data/shoes/libiconv2.dll +0 -0
  15. data/shoes/libjpeg-8.dll +0 -0
  16. data/shoes/libpango-1.0-0.dll +0 -0
  17. data/shoes/libpangocairo-1.0-0.dll +0 -0
  18. data/shoes/libpangoft2-1.0-0.dll +0 -0
  19. data/shoes/libpangowin32-1.0-0.dll +0 -0
  20. data/shoes/libpng14-14.dll +0 -0
  21. data/shoes/libportaudio-2.dll +0 -0
  22. data/shoes/libshoes.dll +0 -0
  23. data/shoes/libssl32.dll +0 -0
  24. data/shoes/libungif4.dll +0 -0
  25. data/shoes/msvcrt-ruby191.dll +0 -0
  26. data/shoes/nsis/shoes.nsi +1 -1
  27. data/shoes/readline5.dll +0 -0
  28. data/shoes/ruby/gems/1.9.1/gems/hpricot-0.8.1/lib/fast_xs.so +0 -0
  29. data/shoes/ruby/gems/1.9.1/gems/hpricot-0.8.1/lib/hpricot_scan.so +0 -0
  30. data/shoes/ruby/gems/1.9.1/gems/json-shoes-1.1.3/lib/json/ext/generator.so +0 -0
  31. data/shoes/ruby/gems/1.9.1/gems/json-shoes-1.1.3/lib/json/ext/parser.so +0 -0
  32. data/shoes/ruby/gems/1.9.1/gems/sqlite3-ruby-1.3.0/lib/sqlite3_native.so +0 -0
  33. data/shoes/ruby/lib/i386-mingw32/binject.so +0 -0
  34. data/shoes/ruby/lib/i386-mingw32/bloops.so +0 -0
  35. data/shoes/ruby/lib/i386-mingw32/chipmunk.so +0 -0
  36. data/shoes/ruby/lib/i386-mingw32/ftsearchrt.so +0 -0
  37. data/shoes/shoes.exe +0 -0
  38. data/shoes/sqlite3.dll +0 -0
  39. data/shoes/static/man-builds1.png +0 -0
  40. data/shoes/static/manual-en.txt +76 -34
  41. data/shoes/zlib.dll +0 -0
  42. data/shoes/zlib1.dll +0 -0
  43. metadata +5 -4
data/shoes/VERSION.txt CHANGED
@@ -1 +1 @@
1
- shoes policeman (0.r1469) [i386-mingw32 Ruby1.9.1]
1
+ shoes policeman (0.r1480) [i386-mingw32 Ruby1.9.1]
data/shoes/freetype6.dll CHANGED
Binary file
@@ -41,7 +41,16 @@ module Shoes::Manual
41
41
  gsub(/\[\[(\S+?)\]\]/m, '", link("\1".split(".", 2).last) { open_link("\1") }, "').
42
42
  gsub(/\[\[(\S+?) (.+?)\]\]/m, '", link("\2") { open_link("\1") }, "').
43
43
  gsub(IMAGE_RE, '", *args); stack(IMAGE_STYLE.merge({\2})) { image("#{DIR}/static/\3") }; #{ele}("')
44
- eval("#{ele}(#{str}, *args)")
44
+ #debug str if str =~ /The list of special keys/
45
+ a = str.split(', ", ", ')
46
+ if a.size == 1
47
+ eval("#{ele}(#{str}, *args)")
48
+ else
49
+ flow do
50
+ a[0...-1].each{|s| eval("#{ele}(#{s}, ',', *args)")}
51
+ eval("#{ele}(#{a[-1]}, *args)")
52
+ end
53
+ end
45
54
  end
46
55
 
47
56
  def dewikify_code(str)
@@ -73,6 +82,8 @@ module Shoes::Manual
73
82
  yield :colors, nil
74
83
  when /\A\{INDEX\}/
75
84
  yield :index, nil
85
+ when /\A\{SAMPLES\}/
86
+ yield :samples, nil
76
87
  when /\A \* (.+)/m
77
88
  yield :list, $1.split(/^ \* /)
78
89
  when /\A==== (.+) ====/
@@ -101,6 +112,8 @@ module Shoes::Manual
101
112
  color_page
102
113
  when :index
103
114
  index_page
115
+ when :samples
116
+ sample_page
104
117
  when :list
105
118
  text.each { |t| stack(:margin_left => 30) {
106
119
  fill black; oval -10, 7, 6; dewikify_p :para, t } }
@@ -111,6 +124,29 @@ module Shoes::Manual
111
124
  end
112
125
  end
113
126
 
127
+ def sample_page
128
+ folder = File.join DIR, 'samples'
129
+ h = {}
130
+ Dir.glob(File.join folder, '*').each do |file|
131
+ if File.extname(file) == '.rb'
132
+ key = File.basename(file).split('-')[0]
133
+ h[key] ? h[key].push(file) : h[key] = [file]
134
+ end
135
+ end
136
+ stack do
137
+ h.each do |k, v|
138
+ subtitle k
139
+ flow do
140
+ v.each do |file|
141
+ para link(File.basename(file).split('-')[1..-1].join('-')[0..-4]){
142
+ Dir.chdir(folder){eval IO.read(file), TOPLEVEL_BINDING}
143
+ }
144
+ end
145
+ end
146
+ end
147
+ end
148
+ end
149
+
114
150
  def color_page
115
151
  color_names = (Shoes::COLORS.keys*"\n").split("\n").sort
116
152
  flow do
@@ -152,7 +188,14 @@ module Shoes::Manual
152
188
  index_p = proc do |k, subs|
153
189
  unless shown.include? k
154
190
  stack :margin_left => 20 do
155
- para "▸ #{k}"
191
+ flow do
192
+ para "▸ ", :font => case RUBY_PLATFORM
193
+ when /mingw/; "MS UI Gothic"
194
+ when /darwin/; "AppleGothic, Arial"
195
+ else "Arial"
196
+ end
197
+ para k
198
+ end
156
199
  subs.uniq.sort.each do |s|
157
200
  index_p[s, tree[s]]
158
201
  end if subs
@@ -252,6 +295,9 @@ module Shoes::Manual
252
295
  elsif @mindex.has_key? head
253
296
  head, sub = @mindex[head]
254
297
  open_methods(head, nil, sub)
298
+ elsif head =~ /^http:\/\//
299
+ debug head
300
+ visit head
255
301
  end
256
302
  end
257
303
 
@@ -121,7 +121,7 @@ class TrueClass; make_inspect :to_s end
121
121
  class FalseClass; make_inspect :to_s end
122
122
  class NilClass; make_inspect end
123
123
 
124
- class Shoes::App
124
+ class Shoes::Types::App
125
125
  def inspect(hits = nil)
126
126
  "(#{self.class} #{name.dump})"
127
127
  end
data/shoes/libcairo-2.dll CHANGED
Binary file
data/shoes/libeay32.dll CHANGED
Binary file
data/shoes/libexpat-1.dll CHANGED
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
data/shoes/libiconv2.dll CHANGED
Binary file
data/shoes/libjpeg-8.dll CHANGED
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
data/shoes/libshoes.dll CHANGED
Binary file
data/shoes/libssl32.dll CHANGED
Binary file
data/shoes/libungif4.dll CHANGED
Binary file
Binary file
data/shoes/nsis/shoes.nsi CHANGED
@@ -2,7 +2,7 @@
2
2
  ;Definitions
3
3
  !define AppName "Shoes"
4
4
  !define AppRelease "Policeman"
5
- !define AppVersion "0.r1469"
5
+ !define AppVersion "0.r1480"
6
6
  !define AppMainEXE "shoes.exe"
7
7
  !define ShortName "shoes"
8
8
  !define InstallKey "Software\Hackety.org\${AppName}"
data/shoes/readline5.dll CHANGED
Binary file
Binary file
Binary file
data/shoes/shoes.exe CHANGED
Binary file
data/shoes/sqlite3.dll CHANGED
Binary file
Binary file
@@ -35,7 +35,7 @@ The whole sphere is drawn with blurred ovals and shadows. You can draw and anima
35
35
 
36
36
  ==== Windows ====
37
37
 
38
- Shoes runs on all versions of '''Microsoft Windows XP''', '''Microsoft Windows Vista''', and anything else '''Windows 2000''' compatible. !man-look-vista.png!
38
+ Shoes runs on all versions of '''Microsoft Windows XP''', '''Windows Vista''', '''Windows 7''', and anything else '''Windows 2000''' compatible. !man-look-vista.png!
39
39
 
40
40
  Above is pictured the `simple-clock.rb` sample running on Windows Vista. This example is also draws ovals and lines to build the clock, which is animated to repaint itself several times each second.
41
41
 
@@ -51,7 +51,7 @@ Shapes, text, images and videos all look the same on every platforms. However,
51
51
 
52
52
  == Installing Shoes ==
53
53
 
54
- Okay, on to installing Shoes. I'm sure you're wondering: do I need to install Ruby? Do I need to unzip anything? What commands to I need to type?
54
+ Okay, on to installing Shoes. I'm sure you're wondering: do I need to install Ruby? Do I need to unzip anything? What commands do I need to type?
55
55
 
56
56
  Nope. You don't need Ruby. You don't need WinZip. Nothing to type.
57
57
 
@@ -59,7 +59,7 @@ On most systems, starting Shoes is just a matter of running the installer and cl
59
59
 
60
60
  ==== Step 1: Installing Shoes ====
61
61
 
62
- You'll want to visit [[http://shoooes.net/ shoooes.net]] to download the Shoes installer. Usually, you'll just want one of the installers on the top corner of the home page. !man-builds.png!
62
+ You'll want to visit [[http://shoes.heroku.com/ the site of Shoes]] to download the Shoes installer. Usually, you'll just want one of the installers on the downloads page of the site. !man-builds1.png!
63
63
 
64
64
  Here's how to run the installer:
65
65
 
@@ -364,11 +364,15 @@ This is a good test because it proves that the edit box gives back UTF-8 charact
364
364
 
365
365
  '''Important note:''' if some UTF-8 characters don't display for you, you will need to change the paragraph's font. This is especially common on OS X.
366
366
 
367
- So, a good Japanese font on OS X is '''AppleGothic'''.
367
+ So, a good Japanese font on OS X is '''AppleGothic''' and on Windows is '''MS UI Gothic'''.
368
368
 
369
369
  {{{
370
370
  Shoes.app do
371
- para "てすと (te-su-to)", :font => "AppleGothic, Arial"
371
+ para "てすと (te-su-to)", :font => case RUBY_PLATFORM
372
+ when /mingw/; "MS UI Gothic"
373
+ when /darwin/; "AppleGothic, Arial"
374
+ else "Arial"
375
+ end
372
376
  end
373
377
  }}}
374
378
 
@@ -376,6 +380,8 @@ Again, anything which takes a string in Shoes will need a UTF-8 string. Edit bo
376
380
 
377
381
  ==== The Main App and Its Requires ====
378
382
 
383
+ '''NOTE:''' This rule is for Raisins. Policeman uses TOPLEVEL_BINDING. So, you can get `main`, Ruby top-level object, with the first snippet. Although you need to use `Shoes::Para` instead of `Para` outside `Shoes.app` block.
384
+
379
385
  Each Shoes app is given a little room where it can create itself. You can create classes and set variables and they won't be seen by other Shoes programs. Each program runs inside its own anonymous class.
380
386
 
381
387
  {{{
@@ -416,7 +422,7 @@ Shoes is all about drawing windows and the stuff inside those windows. Let's fo
416
422
 
417
423
  For here on, the manual reads more like a dictionary. Each page is mostly a list of methods you can use for each topic covered. The idea is to be very thorough and clear about everything.
418
424
 
419
- So, if you've hit this far in the manual and you're still hazy about getting started, you should probably either go back to the [[Hello! beginning]] of the manual. Or you could try [[http://hackety.org/press/ Nobody Knows Shoes]], the beginner's leaflet on the web.
425
+ So, if you've hit this far in the manual and you're still hazy about getting started, you should probably either go back to the [[Hello! beginning]] of the manual. Or you could try [[http://github.com/shoes/shoes/downloads Nobody Knows Shoes]], the beginner's leaflet PDF.
420
426
 
421
427
  ==== Finding Your Way ====
422
428
 
@@ -517,7 +523,9 @@ Pops up an "Open file..." window. It's the standard window which shows all of yo
517
523
  {{{
518
524
  #!ruby
519
525
  filename = ask_open_file
520
- puts File.read(filename)
526
+ Shoes.app do
527
+ para File.read(filename)
528
+ end
521
529
  }}}
522
530
 
523
531
  === ask_save_file() » a string ===
@@ -536,10 +544,12 @@ Pops up an "Open folder..." window. It's the standard window which shows all of
536
544
  {{{
537
545
  #!ruby
538
546
  folder = ask_open_folder
539
- puts Dir[folder].entries
547
+ Shoes.app do
548
+ para Dir.entries(folder)
549
+ end
540
550
  }}}
541
551
 
542
- === ask_save_folder() » a string ===»
552
+ === ask_save_folder() » a string ===
543
553
 
544
554
  Pops up a "Save folder..." window, similiar to `ask_open_folder`, described previously. On OS X, this method currently behaves like an alias of `ask_open_folder`.
545
555
 
@@ -556,7 +566,7 @@ Pops up a yes-or-no question. If the person at the computer, clicks '''yes''', y
556
566
  {{{
557
567
  #!ruby
558
568
  if confirm("Draw a circle?")
559
- oval :top => 0, :left => 0, :radius => 50
569
+ Shoes.app{ oval :top => 0, :left => 0, :radius => 50 }
560
570
  end
561
571
  }}}
562
572
 
@@ -632,6 +642,7 @@ Logs an informational message to the user in the Shoes console. So, where debug
632
642
 
633
643
  {{{
634
644
  #!ruby
645
+
635
646
  info("You just ran the info example on Shoes #{Shoes::RELEASE_NAME}.")
636
647
  }}}
637
648
 
@@ -1320,7 +1331,7 @@ To draw a star with an image pattern:
1320
1331
  {{{
1321
1332
  #!ruby
1322
1333
  Shoes.app do
1323
- fill "images/shiny.png"
1334
+ fill "static/avatar.png"
1324
1335
  star 200, 200, 5
1325
1336
  end
1326
1337
  }}}
@@ -1351,7 +1362,6 @@ Draws a circular form at pixel coordinates (left, top) with a width and height o
1351
1362
  stroke blue
1352
1363
  strokewidth 4
1353
1364
  fill black
1354
-
1355
1365
  oval 10, 10, 50
1356
1366
  end
1357
1367
  }}}
@@ -1382,7 +1392,7 @@ As with all other shapes, the rectangle is drawn using the stroke and fill color
1382
1392
  Shoes.app do
1383
1393
  stroke rgb(0.5, 0.5, 0.7)
1384
1394
  fill rgb(1.0, 1.0, 0.9)
1385
- rect 10, 10, self.width - 10, self.height - 10
1395
+ rect 10, 10, self.width - 20, self.height - 20
1386
1396
  end
1387
1397
  }}}
1388
1398
 
@@ -1488,7 +1498,7 @@ The block is given a `frame` number. Starting with zero, the `frame` number tel
1488
1498
  end
1489
1499
  }}}
1490
1500
 
1491
- The above animation is shown 24 times per second. If no number is give, the `fps` defaults to 10.
1501
+ The above animation is shown 24 times per second. If no number is given, the `fps` defaults to 10.
1492
1502
 
1493
1503
  === background(pattern) » Shoes::Background ===
1494
1504
 
@@ -1575,7 +1585,7 @@ Flows organize elements horizontally. Where one would use a [[Element.stack]] t
1575
1585
 
1576
1586
  Creates an [[Image]] element for displaying a picture. PNG, JPEG and GIF formats are allowed.
1577
1587
 
1578
- The `path` can be a file path or a URL. All images loaded are temporarily cached in memory, but remote images are also cached locally in the user's personal Shoes directory. Remote images are loaded in the background; as with browsers, the images will not appear right away, but will we shown when they are loaded.
1588
+ The `path` can be a file path or a URL. All images loaded are temporarily cached in memory, but remote images are also cached locally in the user's personal Shoes directory. Remote images are loaded in the background; as with browsers, the images will not appear right away, but will be shown when they are loaded.
1579
1589
 
1580
1590
  === imagesize(path) » [width, height] ===
1581
1591
 
@@ -1706,13 +1716,13 @@ So, let's say you want to change the background of a slot whenever the mouse flo
1706
1716
  {{{
1707
1717
  #!ruby
1708
1718
  Shoes.app do
1709
- stack :width => 200, :height => 200 do
1719
+ s = stack :width => 200, :height => 200 do
1710
1720
  background red
1711
1721
  hover do
1712
- clear { background blue }
1722
+ s.clear { background blue }
1713
1723
  end
1714
1724
  leave do
1715
- clear { background red }
1725
+ s.clear { background red }
1716
1726
  end
1717
1727
  end
1718
1728
  end
@@ -1805,9 +1815,14 @@ Adds elements to the end of a slot.
1805
1815
 
1806
1816
  {{{
1807
1817
  #!ruby
1808
- @slot.append do
1809
- title "Breaking News"
1810
- tagline "Astronauts arrested for space shuttle DUI."
1818
+ Shoes.app do
1819
+ @slot = stack { para 'Good Morning' }
1820
+ timer 3 do
1821
+ @slot.append do
1822
+ title "Breaking News"
1823
+ tagline "Astronauts arrested for space shuttle DUI."
1824
+ end
1825
+ end
1811
1826
  end
1812
1827
  }}}
1813
1828
 
@@ -1831,8 +1846,12 @@ The clear method also takes an optional block. The block will be used to replac
1831
1846
 
1832
1847
  {{{
1833
1848
  #!ruby
1834
- @slot = stack { para "Old text" }
1835
- @slot.clear { para "Brand new text" }
1849
+ Shoes.app do
1850
+ @slot = stack { para "Old text" }
1851
+ timer 3 do
1852
+ @slot.clear { para "Brand new text" }
1853
+ end
1854
+ end
1836
1855
  }}}
1837
1856
 
1838
1857
  In this example, the "Old text" paragraph will be cleared out, replaced by the "Brand new text" paragraph.
@@ -1843,8 +1862,11 @@ Adds elements to the beginning of a slot.
1843
1862
 
1844
1863
  {{{
1845
1864
  #!ruby
1846
- @slot.prepend do
1847
- para "Your car is ready."
1865
+ Shoes.app do
1866
+ @slot = stack { para 'Good Morning' }
1867
+ timer 3 do
1868
+ @slot.prepend { para "Your car is ready." }
1869
+ end
1848
1870
  end
1849
1871
  }}}
1850
1872
 
@@ -1858,7 +1880,9 @@ To set the width of a stack to 150 pixels:
1858
1880
 
1859
1881
  {{{
1860
1882
  #!ruby
1861
- stack(:width => 150) { para "Now that's precision." }
1883
+ Shoes.app do
1884
+ stack(:width => 150) { para "Now that's precision." }
1885
+ end
1862
1886
  }}}
1863
1887
 
1864
1888
  Each style setting also has a method, which can be used to grab that particular setting. (So,
@@ -1878,9 +1902,10 @@ This is commonly used to pad elements on the right, like so:
1878
1902
 
1879
1903
  {{{
1880
1904
  #!ruby
1881
- stack :margin_right => 20 + gutter do
1882
- para "Insert fat and ratified declaration of
1883
- independence here..."
1905
+ Shoes.app do
1906
+ stack :margin_right => 20 + gutter do
1907
+ para "Insert fat and ratified declaration of independence here..."
1908
+ end
1884
1909
  end
1885
1910
  }}}
1886
1911
 
@@ -1956,8 +1981,8 @@ Alter the slot using a hash of style settings. Any of the methods on this page
1956
1981
  {{{
1957
1982
  #!ruby
1958
1983
  Shoes.app do
1959
- @s = stack
1960
- @s.style(:width => 400)
1984
+ @s = stack { background green }
1985
+ @s.style(:width => 400, :height => 200)
1961
1986
  end
1962
1987
  }}}
1963
1988
 
@@ -2457,7 +2482,7 @@ To create an image, use the `image` method in a slot:
2457
2482
  #!ruby
2458
2483
  Shoes.app do
2459
2484
  para "Nice, nice, very nice. Busy, busy, busy."
2460
- image "static/disheveled.gif"
2485
+ image "static/shoes-manual-apps.gif"
2461
2486
  end
2462
2487
  }}}
2463
2488
 
@@ -2468,7 +2493,7 @@ You can use web URLs directly as well.
2468
2493
  {{{
2469
2494
  #!ruby
2470
2495
  Shoes.app do
2471
- image "http://hacketyhack.net/images/design/Hacky-Mouse-Hand.png"
2496
+ image "http://hacketyhack.heroku.com/images/logo.png"
2472
2497
  end
2473
2498
  }}}
2474
2499
 
@@ -2531,7 +2556,7 @@ Those are the basics. Might you also be persuaded to look at the [[Common]] met
2531
2556
 
2532
2557
  === change() { |self| ... } » self ===
2533
2558
 
2534
- Whenever someone highlights a new option in the list box (by clicking on an item, for instance,) its `change` block is called. The block is given `self`, which is the edit line object which has changed.
2559
+ Whenever someone highlights a new option in the list box (by clicking on an item, for instance,) its `change` block is called. The block is given `self`, which is the list box object which has changed.
2535
2560
 
2536
2561
  === choose(item: a string) » self ===
2537
2562
 
@@ -2781,3 +2806,20 @@ Set the position of the video to a time in milliseconds.
2781
2806
 
2782
2807
  Toggles the visibility of the video. If the video can be seen, then `hide` is called. Otherwise, `show` is called.
2783
2808
 
2809
+ = And so forth =
2810
+
2811
+ A place for some other information.
2812
+
2813
+ == Sample Apps ==
2814
+
2815
+ Have fun!
2816
+
2817
+ {SAMPLES}
2818
+
2819
+ == FAQ ==
2820
+
2821
+ Hope this helps:
2822
+
2823
+ * You can join [[http://librelist.com/browser/shoes/ Shoes ML]] and feel free ask your questions.
2824
+ * [[http://github.com/shoes/shoes/ Official Current Source Code]] is on GitHub.
2825
+ * [[http://wiki.github.com/shoes/shoes/recentbuilds/ Recent Builds]] for your platform.
data/shoes/zlib.dll CHANGED
Binary file
data/shoes/zlib1.dll CHANGED
Binary file
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shoesgem
3
3
  version: !ruby/object:Gem::Version
4
- hash: 5867
4
+ hash: 5951
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
- - 1469
8
+ - 1480
9
9
  - 0
10
- version: 0.1469.0
10
+ version: 0.1480.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - ashbb
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-07-11 00:00:00 +09:00
18
+ date: 2010-07-19 00:00:00 +09:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -812,6 +812,7 @@ files:
812
812
  - shoes/static/listbox_button2.png
813
813
  - shoes/static/man-app.png
814
814
  - shoes/static/man-builds.png
815
+ - shoes/static/man-builds1.png
815
816
  - shoes/static/man-editor-notepad.png
816
817
  - shoes/static/man-editor-osx.png
817
818
  - shoes/static/man-ele-background.png