Class: SKUI::Rect
- Inherits:
-
Object
- Object
- SKUI::Rect
- Defined in:
- src/SKUI/rect.rb
Overview
Returns the position and size of the control as reported by the WebDialog. The WebDialog must be ready and visible for these methods to work.
Instance Method Summary collapse
- #bottom ⇒ Integer
- #height ⇒ Integer
-
#initialize(control) ⇒ Rect
constructor
A new instance of Rect.
- #left ⇒ Integer
- #release ⇒ Nil
- #right ⇒ Integer
- #to_hash ⇒ Hash
- #top ⇒ Integer
- #width ⇒ Integer
Constructor Details
Instance Method Details
#bottom ⇒ Integer
38 39 40 |
# File 'src/SKUI/rect.rb', line 38 def bottom get_rect[ 'bottom' ] end |
#height ⇒ Integer
50 51 52 |
# File 'src/SKUI/rect.rb', line 50 def height get_rect[ 'height' ] end |
#left ⇒ Integer
20 21 22 |
# File 'src/SKUI/rect.rb', line 20 def left get_rect[ 'left' ] end |
#release ⇒ Nil
57 58 59 60 |
# File 'src/SKUI/rect.rb', line 57 def release @control = nil nil end |
#right ⇒ Integer
32 33 34 |
# File 'src/SKUI/rect.rb', line 32 def right get_rect[ 'right' ] end |
#to_hash ⇒ Hash
64 65 66 67 68 |
# File 'src/SKUI/rect.rb', line 64 def to_hash hash = get_rect keys = hash.keys.map { |string| string.intern } Hash[ *keys.zip(hash.values).flatten ] end |
#top ⇒ Integer
26 27 28 |
# File 'src/SKUI/rect.rb', line 26 def top get_rect[ 'top' ] end |
#width ⇒ Integer
44 45 46 |
# File 'src/SKUI/rect.rb', line 44 def width get_rect[ 'width' ] end |