Class: JLDrill::Gtk::OptionsWindow::Section
- Inherits:
-
Object
- Object
- JLDrill::Gtk::OptionsWindow::Section
- Defined in:
- lib/jldrill/views/gtk/widgets/OptionsWindow.rb
Overview
A vertical box with a label at the top
Instance Attribute Summary collapse
-
#box ⇒ Object
readonly
Returns the value of attribute box.
-
#contents ⇒ Object
readonly
Returns the value of attribute contents.
-
#label ⇒ Object
readonly
Returns the value of attribute label.
Instance Method Summary collapse
-
#add(widget) ⇒ Object
Add a widget to the bottom of the box.
-
#initialize(label) ⇒ Section
constructor
A new instance of Section.
Constructor Details
#initialize(label) ⇒ Section
Returns a new instance of Section.
49 50 51 52 53 54 55 56 57 58 59 60 |
# File 'lib/jldrill/views/gtk/widgets/OptionsWindow.rb', line 49 def initialize(label) @box = Gtk::VBox.new() @label = Gtk::Label.new() @label.set_markup("<big><b>#{label}</b></big>") @label.set_alignment(0.0, 0.0) @box.pack_start(@label, true, true) indent = Gtk::HBox.new() indent.pack_start(Gtk::VBox.new(), false, false, 25) @contents = Gtk::VBox.new() indent.pack_start(@contents, true, true) @box.pack_start(indent) end |
Instance Attribute Details
#box ⇒ Object (readonly)
Returns the value of attribute box.
47 48 49 |
# File 'lib/jldrill/views/gtk/widgets/OptionsWindow.rb', line 47 def box @box end |
#contents ⇒ Object (readonly)
Returns the value of attribute contents.
47 48 49 |
# File 'lib/jldrill/views/gtk/widgets/OptionsWindow.rb', line 47 def contents @contents end |
#label ⇒ Object (readonly)
Returns the value of attribute label.
47 48 49 |
# File 'lib/jldrill/views/gtk/widgets/OptionsWindow.rb', line 47 def label @label end |
Instance Method Details
#add(widget) ⇒ Object
Add a widget to the bottom of the box
63 64 65 |
# File 'lib/jldrill/views/gtk/widgets/OptionsWindow.rb', line 63 def add() @contents.add() end |