Class: Gtk::Widget

Inherits:
Object
  • Object
show all
Extended by:
GLib::Deprecatable
Defined in:
lib/gtk3/deprecated.rb

Instance Method Summary collapse

Instance Method Details

#set_allocation(*args) ⇒ Object



980
981
982
983
984
985
986
987
988
989
990
# File 'lib/gtk3/deprecated.rb', line 980

def set_allocation(*args)
  case args.size
  when 1
    __set_allocation__(args.first)
  when 4
    warn "#{caller[0]}: '#{self.class}#set_allocation(x, y, width, height)' style has been deprecated. Use '#{self.class}#set_allocation(alloc)' style."
    __set_allocation__(Gtk::Allocation.new(*args))
  else
    raise ArgumentError.new("need 1 or 4 arguments.")
  end
end