Class: Gtk3App::Widget::MainWindow

Inherits:
Such::Window
  • Object
show all
Defined in:
lib/gtk3app/widget/widgets.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(*par, &block) ⇒ MainWindow

Returns a new instance of MainWindow.



44
45
46
47
# File 'lib/gtk3app/widget/widgets.rb', line 44

def initialize(*par, &block)
  super(*par, &block)
  self.set_icon MainWindow.icon
end

Class Method Details

.iconObject



40
41
42
# File 'lib/gtk3app/widget/widgets.rb', line 40

def self.icon
  @@icon
end

.set_icon(file) ⇒ Object



36
37
38
# File 'lib/gtk3app/widget/widgets.rb', line 36

def self.set_icon(file)
  @@icon = GdkPixbuf::Pixbuf.new(file: file)
end

Instance Method Details

#minime(x = CONFIG[:SlotsScale]) ⇒ Object



49
50
51
52
# File 'lib/gtk3app/widget/widgets.rb', line 49

def minime(x=CONFIG[:SlotsScale])
  self.set_default_size(x,x)
  self.add Gtk::Image.new(pixbuf: MainWindow.icon.scale(x,x)).show
end