Class: WR::Margin
- Inherits:
-
Object
- Object
- WR::Margin
- Defined in:
- lib/wrb/base.rb
Overview
Controls
Instance Attribute Summary collapse
-
#bottom ⇒ Object
(also: #b)
Returns the value of attribute bottom.
-
#h ⇒ Object
Returns the value of attribute h.
-
#left ⇒ Object
(also: #l)
Returns the value of attribute left.
-
#right ⇒ Object
(also: #r)
Returns the value of attribute right.
-
#target ⇒ Object
Returns the value of attribute target.
-
#top ⇒ Object
(also: #t)
Returns the value of attribute top.
-
#w ⇒ Object
Returns the value of attribute w.
-
#x ⇒ Object
Returns the value of attribute x.
-
#y ⇒ Object
Returns the value of attribute y.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(*args) ⇒ Margin
constructor
A new instance of Margin.
-
#move(x, y, w, h) ⇒ Object
; dpp x, y, w, h.
- #origin ⇒ Object
- #set(l, t, r, b) ⇒ Object
- #to_a ⇒ Object
- #to_s ⇒ Object
Constructor Details
Instance Attribute Details
#bottom ⇒ Object Also known as: b
Returns the value of attribute bottom.
591 592 593 |
# File 'lib/wrb/base.rb', line 591 def bottom @bottom end |
#h ⇒ Object
Returns the value of attribute h.
590 591 592 |
# File 'lib/wrb/base.rb', line 590 def h @h end |
#left ⇒ Object Also known as: l
Returns the value of attribute left.
591 592 593 |
# File 'lib/wrb/base.rb', line 591 def left @left end |
#right ⇒ Object Also known as: r
Returns the value of attribute right.
591 592 593 |
# File 'lib/wrb/base.rb', line 591 def right @right end |
#target ⇒ Object
Returns the value of attribute target.
591 592 593 |
# File 'lib/wrb/base.rb', line 591 def target @target end |
#top ⇒ Object Also known as: t
Returns the value of attribute top.
591 592 593 |
# File 'lib/wrb/base.rb', line 591 def top @top end |
#w ⇒ Object
Returns the value of attribute w.
590 591 592 |
# File 'lib/wrb/base.rb', line 590 def w @w end |
#x ⇒ Object
Returns the value of attribute x.
590 591 592 |
# File 'lib/wrb/base.rb', line 590 def x @x end |
#y ⇒ Object
Returns the value of attribute y.
590 591 592 |
# File 'lib/wrb/base.rb', line 590 def y @y end |
Class Method Details
.[](*args) ⇒ Object
593 594 595 |
# File 'lib/wrb/base.rb', line 593 def self.[](*args) self.new(*args) end |
Instance Method Details
#move(x, y, w, h) ⇒ Object
; dpp x, y, w, h
609 610 611 |
# File 'lib/wrb/base.rb', line 609 def move(x, y, w, h) #; dpp x, y, w, h @x, @y, @w, @h = x, y, w, h end |
#origin ⇒ Object
646 647 648 |
# File 'lib/wrb/base.rb', line 646 def origin() [@x, @y, @w, @h] end |
#set(l, t, r, b) ⇒ Object
617 618 619 620 |
# File 'lib/wrb/base.rb', line 617 def set(l, t, r, b) @left, @top, @right, @bottom = l, t, r, b @target.__move(0,0,*target.parent.clientsize) if @target.parent end |
#to_a ⇒ Object
642 643 644 |
# File 'lib/wrb/base.rb', line 642 def to_a() [@left, @top, @right, @bottom] end |
#to_s ⇒ Object
613 614 615 |
# File 'lib/wrb/base.rb', line 613 def to_s() [@left, @top, @right, @bottom].to_s end |