Class: GerminalResizeMessage
- Inherits:
-
Gtk::Box
- Object
- Gtk::Box
- GerminalResizeMessage
- Defined in:
- lib/resize_message.rb
Overview
Copyright 2015-2016 Cédric LE MOIGNE, [email protected] This file is part of Germinal.
Germinal is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or any later version.
Germinal is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with Germinal. If not, see <www.gnu.org/licenses/>.
Instance Method Summary collapse
-
#initialize(text) ⇒ GerminalResizeMessage
constructor
A new instance of GerminalResizeMessage.
- #text=(text) ⇒ Object
Constructor Details
#initialize(text) ⇒ GerminalResizeMessage
Returns a new instance of GerminalResizeMessage.
17 18 19 20 21 22 23 24 25 26 |
# File 'lib/resize_message.rb', line 17 def initialize(text) super(:vertical) text = text || "" add(Gtk::Label.new(text)) set_halign(:end) set_valign(:end) set_border_width(4) show_all set_name("resize_box") end |
Instance Method Details
#text=(text) ⇒ Object
28 29 30 31 |
# File 'lib/resize_message.rb', line 28 def text=(text) children[0].text = text show_all end |