Class: VRLayoutFrame

Inherits:
Object show all
Defined in:
lib/vr/vrlayout2.rb

Instance Method Summary collapse

Constructor Details

#initializeVRLayoutFrame

VRLayoutFrame

This is a base class for layout frames.

Methods

— register(*controls)

Registers controls for LayoutFrame

— move(x,y,w,h)

Resizes the layout frame size.
This re-calculate the registered controls coordinates.


27
28
29
30
# File 'lib/vr/vrlayout2.rb', line 27

def initialize()
  @_vr_layoutclients=[]
  @_vr_lx,@_vr_ly,@_vr_lw,@_vr_lh = 0,0,10,10
end

Instance Method Details

#_vr_relayoutObject



42
43
# File 'lib/vr/vrlayout2.rb', line 42

def _vr_relayout
end

#move(x, y, w, h) ⇒ Object



37
38
39
40
# File 'lib/vr/vrlayout2.rb', line 37

def move(x,y,w,h)
  @_vr_lx,@_vr_ly,@_vr_lw,@_vr_lh = x,y,w,h
  _vr_relayout
end

#register(*cntl) ⇒ Object



32
33
34
35
# File 'lib/vr/vrlayout2.rb', line 32

def register(*cntl)
  @_vr_layoutclients.concat cntl
  _vr_relayout
end