green_shoes 0.207.0 → 0.214.0
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/shoes/app.rb +2 -2
- data/lib/shoes/basic.rb +7 -2
- data/lib/shoes/helper_methods.rb +6 -4
- data/lib/shoes/ruby.rb +1 -1
- data/lib/shoes/slot.rb +1 -1
- data/static/manual-en.txt +22 -2
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.214.0
|
data/lib/shoes/app.rb
CHANGED
@@ -29,7 +29,7 @@ class Shoes
|
|
29
29
|
end
|
30
30
|
|
31
31
|
attr_accessor :cslot, :cmask, :top_slot, :contents, :canvas, :app, :mccs, :mrcs, :mmcs,
|
32
|
-
:mhcs, :mlcs, :shcs, :mcs, :win, :swin, :width_pre, :height_pre, :order, :dics
|
32
|
+
:mhcs, :mlcs, :shcs, :mcs, :win, :swin, :width_pre, :height_pre, :order, :dics, :fronts, :backs
|
33
33
|
attr_writer :mouse_button, :mouse_pos
|
34
34
|
attr_reader :link_style, :linkhover_style, :animates, :owner, :textcursors
|
35
35
|
|
@@ -82,7 +82,7 @@ class Shoes
|
|
82
82
|
args[:links] = make_link_index(msg) unless args[:links]
|
83
83
|
|
84
84
|
if !(args[:left].zero? and args[:top].zero?) and (args[:width].zero? or args[:height].zero?)
|
85
|
-
args[:nocontrol], args[:width], args[:height] = true, self.width, self.height
|
85
|
+
args[:nocontrol], args[:add_mlcs], args[:width], args[:height] = true, true, self.width, self.height
|
86
86
|
layout_control = false
|
87
87
|
else
|
88
88
|
layout_control = true
|
data/lib/shoes/basic.rb
CHANGED
@@ -27,6 +27,8 @@ class Shoes
|
|
27
27
|
@args = args
|
28
28
|
@hovered = false
|
29
29
|
@hidden ? (@hided, @shows = true, false) : (@hided, @shows = false, true)
|
30
|
+
@app.fronts.push self if @front
|
31
|
+
@app.backs.push self if @back
|
30
32
|
end
|
31
33
|
|
32
34
|
attr_reader :args, :shows, :initials
|
@@ -85,7 +87,8 @@ class Shoes
|
|
85
87
|
@app.cslot.contents.delete self
|
86
88
|
remove
|
87
89
|
@real = nil
|
88
|
-
else
|
90
|
+
else
|
91
|
+
@real.clear if @real
|
89
92
|
end
|
90
93
|
end
|
91
94
|
|
@@ -158,7 +161,8 @@ class Shoes
|
|
158
161
|
class TextBlock < Basic
|
159
162
|
def initialize args
|
160
163
|
super
|
161
|
-
@app.mlcs << self
|
164
|
+
@app.mlcs << self if !@real or @add_mlcs
|
165
|
+
@add_mlcs = false
|
162
166
|
end
|
163
167
|
|
164
168
|
def text
|
@@ -166,6 +170,7 @@ class Shoes
|
|
166
170
|
end
|
167
171
|
|
168
172
|
def text= s
|
173
|
+
@args[:add_mlcs] = false
|
169
174
|
style markup: s if !@hided or @args[:hidden]
|
170
175
|
end
|
171
176
|
|
data/lib/shoes/helper_methods.rb
CHANGED
@@ -36,8 +36,8 @@ class Shoes
|
|
36
36
|
|
37
37
|
module Mod2
|
38
38
|
def init_app_vars
|
39
|
-
@contents, @mccs, @mrcs, @mmcs, @mhcs, @mlcs, @shcs, @mcs, @order, @dics, @animates, @radio_groups, @textcursors =
|
40
|
-
[], [], [], [], [], [], [], [], [], [], [], {}, {}
|
39
|
+
@contents, @mccs, @mrcs, @mmcs, @mhcs, @mlcs, @shcs, @mcs, @order, @dics, @animates, @radio_groups, @textcursors, @fronts, @backs =
|
40
|
+
[], [], [], [], [], [], [], [], [], [], [], {}, {}, [], []
|
41
41
|
@cmask = nil
|
42
42
|
@mouse_button, @mouse_pos = 0, [0, 0]
|
43
43
|
@fill, @stroke = black, black
|
@@ -161,7 +161,9 @@ class Shoes
|
|
161
161
|
end
|
162
162
|
|
163
163
|
def self.repaint_all_by_order app
|
164
|
-
app.order
|
164
|
+
tmp = app.order
|
165
|
+
(app.fronts + app.backs).each{|e| tmp.delete e}
|
166
|
+
(app.backs + tmp + app.fronts).each do |e|
|
165
167
|
if e.real and !e.is_a?(Pattern) and !e.hided
|
166
168
|
app.canvas.remove e.real
|
167
169
|
app.canvas.put e.real, e.left, e.top
|
@@ -251,7 +253,7 @@ class Shoes
|
|
251
253
|
end
|
252
254
|
|
253
255
|
app.mlcs.each do |tb|
|
254
|
-
|
256
|
+
next if tb.hided
|
255
257
|
tb.text = tb.text unless tb.real
|
256
258
|
tb.real.window.cursor = ARROW if tb.real.window
|
257
259
|
if ret = mouse_on_link(tb, app)
|
data/lib/shoes/ruby.rb
CHANGED
data/lib/shoes/slot.rb
CHANGED
data/static/manual-en.txt
CHANGED
@@ -229,8 +229,6 @@ These instance variables will all end up inside the App object.
|
|
229
229
|
end
|
230
230
|
}}}
|
231
231
|
|
232
|
-
''Note: para method displays self with [ and ] in Green Shoes.''
|
233
|
-
|
234
232
|
==== Block Redirection ====
|
235
233
|
|
236
234
|
The `stack` block is a different story, though. It doesn't change `self` and
|
@@ -1168,6 +1166,22 @@ will start without asking the user.
|
|
1168
1166
|
|
1169
1167
|
'''Note:''' Green Shoes doesn't support ''video''.
|
1170
1168
|
|
1169
|
+
=== :back » true or false ===
|
1170
|
+
|
1171
|
+
For: ''shapes, image, textblocks''.
|
1172
|
+
|
1173
|
+
Comes to the back of the other elements.
|
1174
|
+
|
1175
|
+
{{{
|
1176
|
+
Shoes.app do
|
1177
|
+
rect 100, 100, 100, 100, fill: green
|
1178
|
+
rect 120, 120, 100, 100, fill: yellow
|
1179
|
+
para 'hello', left: 150, top: 150, front: true
|
1180
|
+
oval 150, 150, 100, 100, fill: red
|
1181
|
+
oval 180, 180, 100, 100, fill: gray, back: true
|
1182
|
+
end
|
1183
|
+
}}}
|
1184
|
+
|
1171
1185
|
=== :bottom » a number ===
|
1172
1186
|
|
1173
1187
|
For: ''all slots and elements''.
|
@@ -1308,6 +1322,12 @@ number (size in points) or optionally followed by the unit modifier "px" for
|
|
1308
1322
|
absolute size. Any one of the options may be absent. If FAMILY-LIST is absent,
|
1309
1323
|
then the default font family (Arial) will be used.
|
1310
1324
|
|
1325
|
+
=== :front » true or false ===
|
1326
|
+
|
1327
|
+
For: ''shapes, image, textblocks''.
|
1328
|
+
|
1329
|
+
Comes to the front of the other elements.
|
1330
|
+
|
1311
1331
|
=== :group » a string ===
|
1312
1332
|
|
1313
1333
|
For: ''radio''.
|
metadata
CHANGED
@@ -4,9 +4,9 @@ version: !ruby/object:Gem::Version
|
|
4
4
|
prerelease: false
|
5
5
|
segments:
|
6
6
|
- 0
|
7
|
-
-
|
7
|
+
- 214
|
8
8
|
- 0
|
9
|
-
version: 0.
|
9
|
+
version: 0.214.0
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- ashbb
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2011-04-
|
17
|
+
date: 2011-04-29 00:00:00 +09:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|