Class: MittensUi::Label

Inherits:
Core
  • Object
show all
Defined in:
lib/mittens_ui/label.rb

Instance Attribute Summary

Attributes inherited from Core

#core_widget

Instance Method Summary collapse

Methods inherited from Core

#hidden?, #hide, #remove, #show

Methods included from Helpers

#icon_map, #list_system_icons, #set_margin_from_opts_for

Constructor Details

#initialize(text, options) ⇒ Label

Returns a new instance of Label.



5
6
7
8
9
10
11
12
# File 'lib/mittens_ui/label.rb', line 5

def initialize(text, options)
  if text.nil? || text == "" || text == " "
    text = "Label"
  end

  @label = Gtk::Label.new(text)
  super(@label, options)
end

Instance Method Details

#renderObject



14
15
16
17
# File 'lib/mittens_ui/label.rb', line 14

def render
  $vertical_box.pack_start(@label)
  return self
end