purple_shoes 0.5.149 → 0.6.153

Sign up to get free protection for your applications and to get access to all the features.
Files changed (53) hide show
  1. data/VERSION +1 -1
  2. data/lib/shoes/basic.rb +5 -5
  3. data/samples/sample24.rb +1 -1
  4. data/samples/sample58.rb +7 -5
  5. data/snapshots/sample1.png +0 -0
  6. data/snapshots/sample10.png +0 -0
  7. data/snapshots/sample11.png +0 -0
  8. data/snapshots/sample12.png +0 -0
  9. data/snapshots/sample13.png +0 -0
  10. data/snapshots/sample14.png +0 -0
  11. data/snapshots/sample15.png +0 -0
  12. data/snapshots/sample16.png +0 -0
  13. data/snapshots/sample17.png +0 -0
  14. data/snapshots/sample18.png +0 -0
  15. data/snapshots/sample19.png +0 -0
  16. data/snapshots/sample2.png +0 -0
  17. data/snapshots/sample20.png +0 -0
  18. data/snapshots/sample22.png +0 -0
  19. data/snapshots/sample23.png +0 -0
  20. data/snapshots/sample24.png +0 -0
  21. data/snapshots/sample25.png +0 -0
  22. data/snapshots/sample27.png +0 -0
  23. data/snapshots/sample28.png +0 -0
  24. data/snapshots/sample29.png +0 -0
  25. data/snapshots/sample3.png +0 -0
  26. data/snapshots/sample30.png +0 -0
  27. data/snapshots/sample31.png +0 -0
  28. data/snapshots/sample34.png +0 -0
  29. data/snapshots/sample35.png +0 -0
  30. data/snapshots/sample36.png +0 -0
  31. data/snapshots/sample37.png +0 -0
  32. data/snapshots/sample38.png +0 -0
  33. data/snapshots/sample4.png +0 -0
  34. data/snapshots/sample40.png +0 -0
  35. data/snapshots/sample42.png +0 -0
  36. data/snapshots/sample43.png +0 -0
  37. data/snapshots/sample44.png +0 -0
  38. data/snapshots/sample45.png +0 -0
  39. data/snapshots/sample47.png +0 -0
  40. data/snapshots/sample48.png +0 -0
  41. data/snapshots/sample49.png +0 -0
  42. data/snapshots/sample5.png +0 -0
  43. data/snapshots/sample50.png +0 -0
  44. data/snapshots/sample52.png +0 -0
  45. data/snapshots/sample58.png +0 -0
  46. data/snapshots/sample6.png +0 -0
  47. data/snapshots/sample7.png +0 -0
  48. data/snapshots/sample8.png +0 -0
  49. data/snapshots/sample9.png +0 -0
  50. data/snapshots/sample99.png +0 -0
  51. data/static/man-editor-notepad.png +0 -0
  52. data/static/manual-en.txt +40 -25
  53. metadata +4 -4
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.5.149
1
+ 0.6.153
data/lib/shoes/basic.rb CHANGED
@@ -236,21 +236,21 @@ class Shoes
236
236
 
237
237
  class Native < Basic
238
238
  def text
239
- @real.getText
239
+ @real.getText unless @real.isDisposed
240
240
  end
241
241
  def text=(s)
242
- @real.setText s.to_s
242
+ @real.setText s.to_s unless @real.isDisposed
243
243
  end
244
244
  def move x, y
245
- @real.setLocation x, y
245
+ @real.setLocation x, y unless @real.isDisposed
246
246
  super
247
247
  end
248
248
  def move2 x, y
249
- @real.setLocation x, y
249
+ @real.setLocation x, y unless @real.isDisposed
250
250
  super
251
251
  end
252
252
  def clear
253
- @real.dispose
253
+ @real.dispose unless @real.isDisposed
254
254
  @parent.contents -= [self]
255
255
  end
256
256
  def toggle
data/samples/sample24.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  require 'purple_shoes'
2
2
 
3
3
  Shoes.app width: 400, height: 400 do
4
- #cap [:rect, :curve, :project][rand 3]
4
+ cap [:rect, :curve, :project][rand 3]
5
5
  background yellow
6
6
  rect 0, 0, 100, 100
7
7
  rect 100, 100, 100, 100
data/samples/sample58.rb CHANGED
@@ -1,19 +1,21 @@
1
1
  require 'purple_shoes'
2
2
 
3
- Shoes.app height: 30 do
3
+ Shoes.app do
4
+ title 'Sample Sounds', align: 'center', margin: 50
5
+
4
6
  button "Boing WAV (740ms)" do
5
- video("./sounds/61847__simon-rue__boink-v3.wav").play
7
+ video(File.join DIR, "../samples/sounds/61847__simon-rue__boink-v3.wav").play
6
8
  end
7
9
 
8
10
  button "Fog Horn AIFF (18.667s)" do
9
- video("./sounds/145622__andybrannan__train-fog-horn-long-wyomming.aiff").play
11
+ video(File.join DIR, "../samples/sounds/145622__andybrannan__train-fog-horn-long-wyomming.aiff").play
10
12
  end
11
13
 
12
14
  button "Explosion MP3 (4.800s)" do
13
- video("./sounds/102719__sarge4267__explosion.mp3").play
15
+ video(File.join DIR, "../samples/sounds/102719__sarge4267__explosion.mp3").play
14
16
  end
15
17
 
16
18
  button "Shields UP! OGG (2.473s)" do
17
- video("./sounds/46492__phreaksaccount__shields1.ogg").play
19
+ video(File.join DIR, "../samples/sounds/46492__phreaksaccount__shields1.ogg").play
18
20
  end
19
21
  end
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
data/static/manual-en.txt CHANGED
@@ -4,7 +4,7 @@
4
4
  Shoes is a tiny graphics toolkit. It's simple and straightforward. Shoes was
5
5
  born to be easy! Really, it was made for absolute beginners. There's really
6
6
  nothing to it. Purple Shoes is one of colorful Shoes. It is written in JRuby
7
- with SWT.
7
+ and SWT.
8
8
 
9
9
  You see, the trivial Shoes program can be just one line:
10
10
 
@@ -2605,21 +2605,21 @@ hand corner of the slot.
2605
2605
  Removes the slot. It will no longer be displayed and will not be listed in its
2606
2606
  parent's contents. It's gone.
2607
2607
 
2608
- '''Note:''' Purple Shoes doesn't support `remove` method. Use `clear` method.
2608
+ '''Note:''' Purple Shoes doesn't support `remove` method. Use `clear` method without block.
2609
2609
 
2610
2610
  === scroll() » true or false ===
2611
2611
 
2612
2612
  Is this slot allowed to show a scrollbar? True or false. The scrollbar will
2613
2613
  only appear if the height of the slot is also fixed.
2614
2614
 
2615
- '''Note:''' Purple Shoes doesn't support `scroll` method.
2615
+ '''Note:''' Purple Shoes doesn't support `scroll` method.
2616
+ `scroll_height`, `scroll_max`, `scroll_top`, `scroll_top=` are available,
2617
+ but for the topslot only.
2616
2618
 
2617
2619
  === scroll_height() » a number ===
2618
2620
 
2619
2621
  The vertical size of the full slot, including any of it which is hidden by scrolling.
2620
2622
 
2621
- '''Note:''' Purple Shoes doesn't support `scroll_height` method.
2622
-
2623
2623
  === scroll_max() » a number ===
2624
2624
 
2625
2625
  The top coordinate which this slot can be scrolled down to. The top coordinate
@@ -2631,22 +2631,16 @@ This is basically a shortcut for writing `slot.scroll_height - slot.height`.
2631
2631
 
2632
2632
  To scroll to the bottom of a slot, use `slot.scroll_top = slot.scroll_max`.
2633
2633
 
2634
- '''Note:''' Purple Shoes doesn't support `scroll_max` method.
2635
-
2636
2634
  === scroll_top() » a number ===
2637
2635
 
2638
2636
  The top coordinate which this slot is scrolled down to. So, if the slot is
2639
2637
  scrolled down twenty pixels, this method will return `20`.
2640
2638
 
2641
- '''Note:''' Purple Shoes doesn't support `scroll_top` method.
2642
-
2643
2639
  === scroll_top = a number ===
2644
2640
 
2645
2641
  Scrolls the slot to a certain coordinate. This must be between zero and
2646
2642
  `scroll_max`.
2647
2643
 
2648
- '''Note:''' Purple Shoes doesn't support `scroll_top=` method.
2649
-
2650
2644
  === show() » self ===
2651
2645
 
2652
2646
  Reveals the slot, if it is hidden. See also [[Position.hide]] and
@@ -2740,7 +2734,7 @@ ListBox, the Progress meter, the Check box and the Radio. By "native"
2740
2734
  controls, we mean that each of these seven elements is drawn by SWT apis
2741
2735
  directly. So, a Progress bar will never convert to the PNG image data.
2742
2736
 
2743
- Greem Shoes also has seven basic other types of elements: Background, Border, Image,
2737
+ Purple Shoes also has seven basic other types of elements: Background, Border, Image,
2744
2738
  Shape, TextBlock, Animate and Video. These all should look and act the same on
2745
2739
  every operating system.
2746
2740
 
@@ -2774,7 +2768,7 @@ covered as the [[Position.style]] method for slots.)
2774
2768
 
2775
2769
  # And so, both can be styled.
2776
2770
  @text.style size: 12,
2777
- markup: fg(@text.text, red), margin: 10
2771
+ markup: @text.text, margin: 10, stroke: red
2778
2772
  @press.style width: 400
2779
2773
  @back.style height: 10
2780
2774
  end
@@ -3233,10 +3227,9 @@ every time someone types into or deletes from the box.
3233
3227
  #!ruby
3234
3228
  Shoes.app do
3235
3229
  edit_box do |e|
3236
- @counter.text =
3237
- strong("#{e.text.size}") + " characters"
3230
+ @counter.text = "%3d characters" % e.text.size
3238
3231
  end
3239
- @counter = para strong("0"), " characters"
3232
+ @counter = para strong(" 0"), " characters"
3240
3233
  end
3241
3234
  }}}
3242
3235
 
@@ -3517,13 +3510,13 @@ marked.
3517
3510
  para "Among these films, which do you prefer?\n"
3518
3511
  radio
3519
3512
  para strong("The Taste of Tea"),
3520
- " by Katsuhito Ishii\n", width: 570
3513
+ " by Katsuhito Ishii\n", width: 580
3521
3514
  radio
3522
3515
  para strong("Kin-Dza-Dza"),
3523
- " by Georgi Danelia\n", width: 570
3516
+ " by Georgi Danelia\n", width: 580
3524
3517
  radio
3525
3518
  para strong("Children of Heaven"),
3526
- " by Majid Majidi\n", width: 570
3519
+ " by Majid Majidi\n", width: 580
3527
3520
  end
3528
3521
  }}}
3529
3522
 
@@ -3561,8 +3554,10 @@ you just have to give them all the same group name.
3561
3554
 
3562
3555
  Here, let's group all these radios in the `:films` group.
3563
3556
 
3557
+ '''Note:''' Purple Shoes doesn't support `group`.
3558
+
3564
3559
  {{{
3565
- #!ruby
3560
+ # Not yet available
3566
3561
  Shoes.app do
3567
3562
  stack do
3568
3563
  para "Among these films, which do you prefer?"
@@ -3645,6 +3640,8 @@ Lists all of the strings and styled text objects inside this block.
3645
3640
  Return a text cursor position. That is an index of the text which is a string
3646
3641
  of all of the characters in this text box.
3647
3642
 
3643
+ '''Note:''' Purple Shoes doesn't support `cursor` method.
3644
+
3648
3645
  === cursor = an index or nil ===
3649
3646
 
3650
3647
  Shows or hides the text cursor.
@@ -3653,6 +3650,7 @@ Using `cursor = -1` shows the text cursor at the end of the text.
3653
3650
  Using `cursor = nil` hides the text cursor.
3654
3651
 
3655
3652
  {{{
3653
+ # Not yet available
3656
3654
  Shoes.app do
3657
3655
  msg = para 'hello ' * 20
3658
3656
  msg.cursor = -1
@@ -3672,6 +3670,8 @@ Using `cursor = nil` hides the text cursor.
3672
3670
  end
3673
3671
  }}}
3674
3672
 
3673
+ '''Note:''' Purple Shoes doesn't support `cursor=` method.
3674
+
3675
3675
  === highlight() » an array ===
3676
3676
 
3677
3677
  Return an array which includes a text marker start position and highlighted length.
@@ -3682,6 +3682,7 @@ Return an index of the text at which the mouse cursor points on.
3682
3682
  The `left` and `top` are the mouse coordinates.
3683
3683
 
3684
3684
  {{{
3685
+ # Not yet available
3685
3686
  Shoes.app do
3686
3687
  para 'index: ', width: 50
3687
3688
  index = para '', width: 20
@@ -3692,15 +3693,20 @@ The `left` and `top` are the mouse coordinates.
3692
3693
  end
3693
3694
  }}}
3694
3695
 
3696
+ '''Note:''' Purple Shoes doesn't support `hit` method.
3697
+
3695
3698
  === marker() » an index ===
3696
3699
 
3697
3700
  Return a text marker start position.
3698
3701
 
3702
+ '''Note:''' Purple Shoes doesn't support `marker` method.
3703
+
3699
3704
  === marker = an index ===
3700
3705
 
3701
3706
  Highlight a part of text from marker start position to cursor position.
3702
3707
 
3703
3708
  {{{
3709
+ # Not yet available
3704
3710
  Shoes.app do
3705
3711
  background gainsboro
3706
3712
  extend HH::Markup
@@ -3716,9 +3722,11 @@ Highlight a part of text from marker start position to cursor position.
3716
3722
  end
3717
3723
  }}}
3718
3724
 
3719
- === markup() » a text ===
3725
+ '''Note:''' Purple Shoes doesn't support `marker=` method.
3726
+
3727
+ === markup() » a string ===
3720
3728
 
3721
- Return some marked-up text for Pango.
3729
+ Return a string as same as text().
3722
3730
 
3723
3731
  === replace(a string) ===
3724
3732
 
@@ -3776,6 +3784,7 @@ Purple Shoes supports embedding of MP4, AVI, WMV, QuickTime and various other po
3776
3784
  This is all thanks to Ruby/GStreamer. Use the `video` method to setup a Shoes::Video object. !{:margin_left => 30}man-ele-video.png!
3777
3785
 
3778
3786
  {{{
3787
+ # Not yet available
3779
3788
  Shoes.app width: 400, height: 300 do
3780
3789
  background gold..cyan, angle: 90
3781
3790
  space = ' ' * 3
@@ -3925,21 +3934,27 @@ the `parent.width`.
3925
3934
 
3926
3935
  For more information, go to [[http://ashbb.github.com/green_shoes/Red_Shoes_and_Green_Shoes.html Red Shoes and Green Shoes]].
3927
3936
 
3928
- == gshoes ==
3937
+ == pshoes ==
3929
3938
 
3930
- '''gshoes''' is a gem executable command which has some options. Just open console window and try to run `gshoes (options or app.rb or app.gsy)`.
3939
+ '''pshoes''' is a gem executable command which has some options. Just open console window and try to run `pshoes (options or app.rb)`.
3931
3940
 
3932
3941
  === -m, -men ===
3933
3942
 
3934
3943
  Open the built-in English manual.
3935
3944
 
3945
+ '''Note:''' Need to install Hpricot: `jruby --1.9 -S gem install hpricot`
3946
+
3936
3947
  === -mjp ===
3937
3948
 
3938
3949
  Open the built-in Japanese manual.
3939
3950
 
3951
+ '''Note:''' Need to install Hpricot: `jruby --1.9 -S gem install hpricot`
3952
+
3940
3953
  === -p ===
3941
3954
 
3942
- Package a Purple Shoes app as a .gsy file. GSY, which stands for Purple Shoes YAML.
3955
+ Package a Purple Shoes app as a .jar file.
3956
+
3957
+ '''Note:''' Purple Shoes doesn't support `-p` option so far.
3943
3958
 
3944
3959
  === -v ===
3945
3960
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: purple_shoes
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.149
4
+ version: 0.6.153
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-04-29 00:00:00.000000000 Z
12
+ date: 2012-05-02 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: swt
16
- requirement: &16443456 !ruby/object:Gem::Requirement
16
+ requirement: &16509060 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,7 +21,7 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *16443456
24
+ version_requirements: *16509060
25
25
  description: Purple Shoes is one of colorful Shoes, written in JRuby and SWT.
26
26
  email: ashbbb@gmail.com
27
27
  executables: