Class: Gtk3App::Widget::MainWindow
- Inherits:
-
Such::Window
- Object
- Such::Window
- Gtk3App::Widget::MainWindow
- Defined in:
- lib/gtk3app/widget/widgets.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(*par, &block) ⇒ MainWindow
constructor
A new instance of MainWindow.
- #minime(x = CONFIG[:SlotsScale]) ⇒ Object
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
.icon ⇒ Object
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 |