Class: VRVertTwoPaneFrame
- Inherits:
-
VRTwoPaneFrame
- Object
- VRTwoPaneFrame
- VRVertTwoPaneFrame
- Defined in:
- lib/vr/vrlayout2.rb
Constant Summary collapse
- Cursor =
"SizeNS"
Constants inherited from VRTwoPaneFrame
VRTwoPaneFrame::PatBlt, VRTwoPaneFrame::SPLITTER_DRAWLINE, VRTwoPaneFrame::SPLITTER_MOVEWINDOW
Instance Attribute Summary
Attributes inherited from VRTwoPaneFrame
Instance Method Summary collapse
- #_vr_relayout(ys = (@_vr_lh*@ratio).to_i) ⇒ Object
- #splitterDragEnd ⇒ Object
- #splitterDragging(x, y) ⇒ Object
Methods inherited from VRTwoPaneFrame
#dragend, #dragstart, #hittest, #initialize, #move, #setDragCur, #setup, #splitter_operation_type, #splitter_operation_type=, #window_parent
Constructor Details
This class inherits a constructor from VRTwoPaneFrame
Instance Method Details
#_vr_relayout(ys = (@_vr_lh*@ratio).to_i) ⇒ Object
293 294 295 296 297 298 299 300 |
# File 'lib/vr/vrlayout2.rb', line 293 def _vr_relayout( ys = (@_vr_lh*@ratio).to_i) sh=(@separatorheight/2).to_i @_vr_lxs,@_vr_lxe = @_vr_lx,@_vr_lx+@_vr_lw @_vr_lys,@_vr_lye = @_vr_ly+ys-sh,@_vr_ly+ys+sh @pane1.move @_vr_lx,@_vr_ly, @_vr_lw,ys-sh @pane2.move @_vr_lx,@_vr_lys+@separatorheight, @_vr_lw,@_vr_lh-ys-sh end |
#splitterDragEnd ⇒ Object
268 269 270 271 |
# File 'lib/vr/vrlayout2.rb', line 268 def splitterDragEnd @_vr_splitter_last=nil _vr_relayout end |
#splitterDragging(x, y) ⇒ Object
272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 |
# File 'lib/vr/vrlayout2.rb', line 272 def splitterDragging(x,y) return if y<@separatorheight+@_vr_ly or y>@_vr_ly+@_vr_lh-@separatorheight @ratio=(y-@_vr_ly).to_f/@_vr_lh case(splitter_operation_type) when SPLITTER_MOVEWINDOW _vr_relayout(y-@_vr_ly) when SPLITTER_DRAWLINE w = window_parent w.dopaint do |hdc| w.setBrush(RGB(0x255,0x255,0x255)) if @_vr_splitter_last then VRTwoPaneFrame::PatBlt.call(hdc,*@_vr_splitter_last) end current=[@_vr_lx,y,@_vr_lw,@separatorheight,0x5a0049] # PATINVERT VRTwoPaneFrame::PatBlt.call(hdc,*current) @_vr_splitter_last = current end end end |