Class: Gtk::Window

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

Instance Method Summary collapse

Constructor Details

#initialize(type = :toplevel) ⇒ Window

Returns a new instance of Window


20
21
22
23
24
25
26
27
# File 'lib/gtk3/window.rb', line 20

def initialize(type=:toplevel)
  if type.is_a?(String)
    initialize_raw(:toplevel)
    self.title = type
  else
    initialize_raw(type)
  end
end

Instance Method Details

#initialize_rawObject


19
# File 'lib/gtk3/window.rb', line 19

alias_method :initialize_raw, :initialize

#set_icon(icon_or_file_name) ⇒ Object Also known as: icon=


30
31
32
33
34
35
36
37
# File 'lib/gtk3/window.rb', line 30

def set_icon(icon_or_file_name)
  case icon_or_file_name
  when String
    set_icon_from_file(icon_or_file_name)
  else
    set_icon_raw(icon_or_file_name)
  end
end

#set_icon_rawObject


29
# File 'lib/gtk3/window.rb', line 29

alias_method :set_icon_raw, :set_icon