Class: VRGridLayoutFrame
- Inherits:
-
VRLayoutFrame
- Object
- VRLayoutFrame
- VRGridLayoutFrame
- Defined in:
- lib/vr/vrlayout2.rb
Instance Method Summary collapse
- #_vr_relayout ⇒ Object
-
#initialize(xs, ys) ⇒ VRGridLayoutFrame
constructor
A new instance of VRGridLayoutFrame.
- #register(cntl, x, y, w, h) ⇒ Object
- #setDimention(xs, ys) ⇒ Object
Methods inherited from VRLayoutFrame
Constructor Details
#initialize(xs, ys) ⇒ VRGridLayoutFrame
Returns a new instance of VRGridLayoutFrame.
95 96 97 98 99 100 |
# File 'lib/vr/vrlayout2.rb', line 95 def initialize(xs,ys) super() @_vr_xsize=xs @_vr_ysize=ys @_vr_layoutclients = Array.new end |
Instance Method Details
#_vr_relayout ⇒ Object
111 112 113 114 115 116 117 118 |
# File 'lib/vr/vrlayout2.rb', line 111 def _vr_relayout @_vr_layoutclients.each do |c| c[0].move( @_vr_lw/@_vr_xsize * c[1], @_vr_lh/@_vr_ysize * c[2], @_vr_lw/@_vr_xsize * c[3], @_vr_lh/@_vr_ysize * c[4]) end end |
#register(cntl, x, y, w, h) ⇒ Object
106 107 108 109 |
# File 'lib/vr/vrlayout2.rb', line 106 def register(cntl,x,y,w,h) @_vr_layoutclients.push [cntl,x,y,w,h] _vr_relayout end |
#setDimention(xs, ys) ⇒ Object
101 102 103 104 |
# File 'lib/vr/vrlayout2.rb', line 101 def setDimention(xs,ys) @_vr_xsize=x @_vr_ysize=y end |