Module: VRVertLayoutManager

Includes:
VRLayoutManager
Included in:
VRFullsizeLayoutManager
Defined in:
lib/vr/vrlayout.rb,
lib/vr/vrlayout.old.rb

Constant Summary collapse

VR_ADDCONTROL_FEWARGS =
true

Constants included from VRMessageHandler

VRMessageHandler::PREHANDLERSTR

Instance Method Summary collapse

Methods included from VRLayoutManager

#rearrange, #self_vrlayoutresize, #vrLayoutinit, #vrinit

Methods included from VRMessageHandler

#acceptEvents, #addHandler, #addNoRelayMessages, #controlmsg_dispatching, #deleteHandler, #msghandlerinit, #selfmsg_dispatching, #vrinit

Instance Method Details

#addControl(type, name, caption, style = 0) ⇒ Object



84
85
86
87
88
89
90
# File 'lib/vr/vrlayout.rb', line 84

def addControl(type,name,caption,style=0)
  @_vr_layoutframe = VRVertLayoutFrame.new unless @_vr_layoutframe
  r=vr_addControlOriginal(type,name,caption,0,@controls.size*10,10,10,style)
  @_vr_layoutframe.register(r)
  rearrange
  return r
end

#self_layout_arrange(width, fheight) ⇒ Object



80
81
82
83
84
85
86
87
# File 'lib/vr/vrlayout.old.rb', line 80

def self_layout_arrange(width,fheight)
  return unless @_vr_c_order
  height=(@_vr_c_order.size>0)? (fheight.to_f / @_vr_c_order.size) : fheight
  
  @_vr_c_order.each_index do |i|
    @_vr_c_order[i].move( 0,i*height, width,height )
  end
end