Class: Shoes::Pattern

Inherits:
Basic show all
Defined in:
lib/shoes/basic.rb

Direct Known Subclasses

Background, Border

Instance Attribute Summary

Attributes inherited from Basic

#args, #dps, #initials, #ln, #parent, #pl

Attributes included from Mod

#hover_proc, #hovered, #leave_proc, #margin_bottom, #margin_left, #margin_right, #margin_top

Instance Method Summary collapse

Methods inherited from Basic

#center_at, #clear, #fix_size, #hide, #initialize, #move, #move3, #set_args, #show, #style, #toggle

Methods included from Mod

#click, #hided, #hover, #leave, #release, #set_margin

Constructor Details

This class inherits a constructor from Shoes::Basic

Instance Method Details

#move2(x, y) ⇒ Object



143
144
145
146
147
148
149
150
151
152
153
154
# File 'lib/shoes/basic.rb', line 143

def move2 x, y
  @left, @top, @width, @height = parent.left, parent.top, parent.width, parent.height
  @width = @args[:width] unless @args[:width].zero?
  @height = @args[:height] unless @args[:height].zero?
  unless @real
    m = self.class.to_s.downcase[7..-1]
    args = eval "{#{@args.keys.map{|k| "#{k}: @#{k}"}.join(', ')}}"
    args = [@pattern, args.merge({create_real: true, nocontrol: true})]
    pt = @app.send(m, *args)
    @real = pt.real
  end
end

#positioning(x, y, max) ⇒ Object



139
140
141
142
# File 'lib/shoes/basic.rb', line 139

def positioning x, y, max
  self.width = self.height = 0
  super
end