green_shoes 0.129.0 → 0.131.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +37 -2
- data/lib/shoes/helper_methods.rb +1 -4
- metadata +6 -22
- data/README.rdoc +0 -23
- data/README_old.md +0 -132
data/README.md
CHANGED
@@ -41,6 +41,41 @@ Tiny Streaming Flash videos
|
|
41
41
|
|
42
42
|
recorded with [CamStudio](http://camstudio.org/).
|
43
43
|
|
44
|
+
Install and run
|
45
|
+
--------------
|
46
|
+
|
47
|
+
For Windows:
|
48
|
+
|
49
|
+
1. download and install [rubyinstaller-1.9.2-p136.exe](http://rubyinstaller.org/downloads/)
|
50
|
+
2. gem install gtk2 --no-ri --no-rdoc
|
51
|
+
3. gem install green_shoes --no-ri --no-rdoc
|
52
|
+
|
53
|
+
That's it!
|
54
|
+
|
55
|
+
Now open your text editor and write your first Green Shoes app like this:
|
56
|
+
|
57
|
+
#my_first_green_shoes_app.rb
|
58
|
+
require 'green_shoes'
|
59
|
+
Shoes.app{ title 'hello world' }
|
60
|
+
|
61
|
+
Then run your app on the console window:
|
62
|
+
|
63
|
+
ruby my_first_green_shoes_app.rb
|
64
|
+
|
65
|
+
You can see this snapshot:
|
66
|
+
|
67
|
+
![snapshot](https://github.com/ashbb/green_shoes/raw/master/snapshots/helloworld.png)
|
68
|
+
|
69
|
+
**NOTE: For now, have to do the following**
|
70
|
+
|
71
|
+
- make this file: %{your path of gtk2 gem}\vendor\local\etc\gtk-2.0\gtkrc
|
72
|
+
- store just one line: gtk-theme-name = "MS-Windows"
|
73
|
+
|
74
|
+
Then you can look at good-looking button on Green Shoes.
|
75
|
+
(left button of [this snapshot](http://www.rin-shun.com/tmp/ruby-gtk2-buttons.png))
|
76
|
+
|
77
|
+
Ruby-GNOME2 developer Kou (Kouhei Sutou) said he'd include gtkrc in the next distribution of Ruby/GTK2.
|
78
|
+
|
44
79
|
|
45
80
|
Mini Hackety Hack
|
46
81
|
------------------
|
@@ -93,8 +128,8 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
93
128
|
SOFTWARE.
|
94
129
|
|
95
130
|
|
96
|
-
Note
|
97
|
-
|
131
|
+
Note (old piece of information)
|
132
|
+
-----------------------------
|
98
133
|
|
99
134
|
- [Install Ruby/GTK2 and rcairo for Linux](https://github.com/ashbb/shoes_hack_note/tree/master/md/hack030.md).
|
100
135
|
- [Install Ruby/GTK2 and rcairo for Windows](https://github.com/ashbb/shoes_hack_note/tree/master/md/hack031.md).
|
data/lib/shoes/helper_methods.rb
CHANGED
@@ -217,10 +217,7 @@ class Shoes
|
|
217
217
|
mouse_x -= tb.left
|
218
218
|
mouse_y -= tb.top
|
219
219
|
tb.links.each_with_index do |e, n|
|
220
|
-
return [e.link_proc, n] if ((0..tb.width).include?(mouse_x) and (e.pos[1]..(e.pos[3]+e.pos[4])).include?(mouse_y)
|
221
|
-
and !((0..e.pos[0]).include?(mouse_x) and (e.pos[1]..(e.pos[1]+e.pos[4])).include?(mouse_y)) \
|
222
|
-
and !((e.pos[2]..tb.width).include?(mouse_x) and (e.pos[3]..(e.pos[3]+e.pos[4])).include?(mouse_y)) \
|
223
|
-
)
|
220
|
+
return [e.link_proc, n] if ((0..tb.width).include?(mouse_x) and (e.pos[1]..(e.pos[3]+e.pos[4])).include?(mouse_y) and !((0..e.pos[0]).include?(mouse_x) and (e.pos[1]..(e.pos[1]+e.pos[4])).include?(mouse_y)) and !((e.pos[2]..tb.width).include?(mouse_x) and (e.pos[3]..(e.pos[3]+e.pos[4])).include?(mouse_y)))
|
224
221
|
end
|
225
222
|
return false
|
226
223
|
end
|
metadata
CHANGED
@@ -4,9 +4,9 @@ version: !ruby/object:Gem::Version
|
|
4
4
|
prerelease: false
|
5
5
|
segments:
|
6
6
|
- 0
|
7
|
-
-
|
7
|
+
- 131
|
8
8
|
- 0
|
9
|
-
version: 0.
|
9
|
+
version: 0.131.0
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- ashbb
|
@@ -14,23 +14,11 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2011-02-
|
17
|
+
date: 2011-02-02 00:00:00 +09:00
|
18
18
|
default_executable:
|
19
|
-
dependencies:
|
20
|
-
|
21
|
-
|
22
|
-
prerelease: false
|
23
|
-
requirement: &id001 !ruby/object:Gem::Requirement
|
24
|
-
none: false
|
25
|
-
requirements:
|
26
|
-
- - ">="
|
27
|
-
- !ruby/object:Gem::Version
|
28
|
-
segments:
|
29
|
-
- 0
|
30
|
-
version: "0"
|
31
|
-
type: :development
|
32
|
-
version_requirements: *id001
|
33
|
-
description: Green Shoes is one of colorful Shoes. It's written in pure Ruby with Ruby/GTK2.
|
19
|
+
dependencies: []
|
20
|
+
|
21
|
+
description: Green Shoes is one of colorful Shoes, written in pure Ruby with Ruby/GTK2.
|
34
22
|
email: ashbbb@gmail.com
|
35
23
|
executables: []
|
36
24
|
|
@@ -39,8 +27,6 @@ extensions: []
|
|
39
27
|
extra_rdoc_files:
|
40
28
|
- LICENSE
|
41
29
|
- README.md
|
42
|
-
- README.rdoc
|
43
|
-
- README_old.md
|
44
30
|
files:
|
45
31
|
- lib/ext/bloops.rb
|
46
32
|
- lib/ext/bloops/bloops.so
|
@@ -108,8 +94,6 @@ files:
|
|
108
94
|
- static/shoes-manual-apps.png
|
109
95
|
- LICENSE
|
110
96
|
- README.md
|
111
|
-
- README.rdoc
|
112
|
-
- README_old.md
|
113
97
|
has_rdoc: true
|
114
98
|
homepage: http://github.com/ashbb/green_shoes
|
115
99
|
licenses: []
|
data/README.rdoc
DELETED
@@ -1,23 +0,0 @@
|
|
1
|
-
= green_shoes
|
2
|
-
|
3
|
-
Green Shoes is one of colorful Shoes. It's written in pure Ruby with Ruby/GTK2.
|
4
|
-
|
5
|
-
== Write your Green Shoes app
|
6
|
-
|
7
|
-
* gem install gtk2
|
8
|
-
* gem install green_shoes
|
9
|
-
* write your app like this
|
10
|
-
|
11
|
-
# my_first_green_shoes_app.rb
|
12
|
-
require 'green_shoes'
|
13
|
-
Shoes.app do
|
14
|
-
para 'hello world!'
|
15
|
-
end
|
16
|
-
|
17
|
-
* ruby my_first_green_shoes_app.rb
|
18
|
-
|
19
|
-
== Copyright
|
20
|
-
|
21
|
-
Green Shoes was developed by ashbb.
|
22
|
-
|
23
|
-
See LICENSE for details.
|
data/README_old.md
DELETED
@@ -1,132 +0,0 @@
|
|
1
|
-
Green Shoes
|
2
|
-
=========
|
3
|
-
|
4
|
-
This is *NOT* [Shoes](http://shoes.heroku.com/), but looks alike. So, named **Green Shoes**. This is written in Ruby. ;-)
|
5
|
-
|
6
|
-
Fantastic logo icon was created by [Zachary Scott](https://github.com/zacharyscott). Thanks!
|
7
|
-
|
8
|
-
sample 1
|
9
|
-
--------
|
10
|
-
|
11
|
-
[snapshot](https://github.com/ashbb/green_shoes/raw/master/snapshots/sample1.png)
|
12
|
-
|
13
|
-
Online demo is [here](http://www.rin-shun.com/shoes/green-shoes-sample1.swf.html).
|
14
|
-
|
15
|
-
sample 2
|
16
|
-
--------
|
17
|
-
|
18
|
-
[snapshot](https://github.com/ashbb/green_shoes/raw/master/snapshots/sample2.png)
|
19
|
-
|
20
|
-
sample 3
|
21
|
-
--------
|
22
|
-
|
23
|
-
[snapshot](https://github.com/ashbb/green_shoes/raw/master/snapshots/sample3.png)
|
24
|
-
|
25
|
-
As like as the last sample of [_why's tutorial](https://github.com/ashbb/shoes_tutorial_walkthrough).
|
26
|
-
|
27
|
-
sample 4
|
28
|
-
--------
|
29
|
-
|
30
|
-
[snapshot](https://github.com/ashbb/green_shoes/raw/master/snapshots/sample4.png)
|
31
|
-
|
32
|
-
edit_line with block is nice to display realtime change.
|
33
|
-
Online demo is [here](http://www.rin-shun.com/shoes/green-shoes-sample4.swf.html).
|
34
|
-
|
35
|
-
sample 5
|
36
|
-
--------
|
37
|
-
|
38
|
-
![sample5.png](https://github.com/ashbb/green_shoes/raw/master/snapshots/sample5.png)
|
39
|
-
|
40
|
-
Launch multi Green Shoes Apps.
|
41
|
-
|
42
|
-
sample 6
|
43
|
-
--------
|
44
|
-
|
45
|
-
Added module Types. Now Green Shoes can use both module Shoes and class Shoes as like as (Red) Shoes.
|
46
|
-
|
47
|
-
sample 7-9
|
48
|
-
----------
|
49
|
-
|
50
|
-
[snapshot](https://github.com/ashbb/green_shoes/raw/master/snapshots/sample8.png)
|
51
|
-
|
52
|
-
Online demo is [sample 7](http://www.rin-shun.com/shoes/green-shoes-sample7.swf.html) and [sample 9](http://www.rin-shun.com/shoes/green-shoes-sample9.swf.html).
|
53
|
-
|
54
|
-
sample 10
|
55
|
-
----------
|
56
|
-
|
57
|
-
[snapshot](https://github.com/ashbb/green_shoes/raw/master/snapshots/sample10.png)
|
58
|
-
|
59
|
-
First shot of background feature implementation. Para got a transparent background.
|
60
|
-
|
61
|
-
sample 11
|
62
|
-
----------
|
63
|
-
|
64
|
-
[snapshot](https://github.com/ashbb/green_shoes/raw/master/snapshots/sample11.png)
|
65
|
-
|
66
|
-
Online demo is [sample 11](http://www.rin-shun.com/shoes/green-shoes-sample11.swf.html). This is [the same snippet](http://shoes.heroku.com/manual/Events.html#motion{|left,top|...}) on Shoes manual.
|
67
|
-
|
68
|
-
sample 12
|
69
|
-
----------
|
70
|
-
|
71
|
-
[snapshot](https://github.com/ashbb/green_shoes/raw/master/snapshots/sample12.png)
|
72
|
-
|
73
|
-
Online demo is [sample 12](http://www.rin-shun.com/shoes/green-shoes-sample12.swf.html). First attempt for useful style method.
|
74
|
-
|
75
|
-
sample 13
|
76
|
-
----------
|
77
|
-
|
78
|
-
[snapshot](https://github.com/ashbb/green_shoes/raw/master/snapshots/sample13.png)
|
79
|
-
|
80
|
-
Online demo is [sample 13](http://www.rin-shun.com/shoes/green-shoes-sample13.swf.html). This is [the same as sample60](http://shoes-tutorial-note.heroku.com/html/00535_Scope__local_variable_and_instance_variable.html) on Shoes Tutorial Note.
|
81
|
-
|
82
|
-
sample 14
|
83
|
-
----------
|
84
|
-
|
85
|
-
[snapshot](https://github.com/ashbb/green_shoes/raw/master/snapshots/sample14.png)
|
86
|
-
|
87
|
-
Online demo is [sample 14](http://www.rin-shun.com/shoes/green-shoes-sample14.swf.html). This is *flowers.rb* from [shoes/shoes-contrib](https://github.com/shoes/shoes-contrib). Edited a little bit for Green Shoes. It works, but very slow. Need more improvement.
|
88
|
-
|
89
|
-
sample 15
|
90
|
-
----------
|
91
|
-
|
92
|
-
[snapshot](https://github.com/ashbb/green_shoes/raw/master/snapshots/sample15.png)
|
93
|
-
|
94
|
-
Online demo is [sample 15](http://www.rin-shun.com/shoes/green-shoes-sample15.swf.html). Para is synchronized with slot size and re-layouted immediately.
|
95
|
-
|
96
|
-
sample 16-17
|
97
|
-
-------------
|
98
|
-
|
99
|
-
snapshots:[sample 16](https://github.com/ashbb/green_shoes/raw/master/snapshots/sample16.png), [sample 17](https://github.com/ashbb/green_shoes/raw/master/snapshots/sample17.png)
|
100
|
-
|
101
|
-
Implemented the following methods: `banner, title, subtitle, tagline, caption, para, inscription, code, del, em, ins, strong, sub, sup`. And added new methods `bg` and `fg` for convenience to use Pango magic.
|
102
|
-
|
103
|
-
sample 18
|
104
|
-
----------
|
105
|
-
|
106
|
-
[snapshot](https://github.com/ashbb/green_shoes/raw/master/snapshots/sample18.png)
|
107
|
-
|
108
|
-
Online demo is [sample 18](http://www.rin-shun.com/shoes/green-shoes-sample18.swf.html). Implemented *link* method. Now Link text block will be changed between Link style and LinkHover style and used with all text fragments.
|
109
|
-
|
110
|
-
sample 19
|
111
|
-
----------
|
112
|
-
|
113
|
-
[snapshot](https://github.com/ashbb/green_shoes/raw/master/snapshots/sample19.png)
|
114
|
-
|
115
|
-
Online demo is [sample 19](http://www.rin-shun.com/shoes/green-shoes-sample19.swf.html). Pong in Green Shoes! Almost the same code as (Red) Shoes [sample58](http://shoes-tutorial-note.heroku.com/html/00704_Assignment_4_Pong_in_Shoes.html).
|
116
|
-
|
117
|
-
sample 20
|
118
|
-
----------
|
119
|
-
|
120
|
-
[snapshot](https://github.com/ashbb/green_shoes/raw/master/snapshots/sample20.png)
|
121
|
-
|
122
|
-
Online demo is [sample 20](http://www.rin-shun.com/shoes/green-shoes-sample20.swf.html). Potacho in Green Shoes! Code is a little bit changed from (Red) Shoes [gallery5](http://shoes-tutorial-note.heroku.com/html/01110_Fancy_Gallery_1-5.html).
|
123
|
-
|
124
|
-
Note
|
125
|
-
----
|
126
|
-
|
127
|
-
- [Install Ruby/GTK2 and rcairo for Linux](https://github.com/ashbb/shoes_hack_note/tree/master/md/hack030.md).
|
128
|
-
- [Install Ruby/GTK2 and rcairo for Windows](https://github.com/ashbb/shoes_hack_note/tree/master/md/hack031.md).
|
129
|
-
|
130
|
-
For fun. :-D
|
131
|
-
|
132
|
-
ashbb
|