Module: VRHorizLayoutManager

Includes:
VRLayoutManager
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



111
112
113
114
115
116
117
# File 'lib/vr/vrlayout.rb', line 111

def addControl(type,name,caption,style=0)
  @_vr_layoutframe = VRHorizLayoutFrame.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(fwidth, height) ⇒ Object



116
117
118
119
120
121
122
123
# File 'lib/vr/vrlayout.old.rb', line 116

def self_layout_arrange(fwidth,height)
  return unless @_vr_c_order
  width =(@_vr_c_order.size>0)? (fwidth.to_f / @_vr_c_order.size) : fwidth

  @_vr_c_order.each_index do |i|
    @_vr_c_order[i].move( i*width,0, width,height )
  end
end