Class: Interphase::Label

Inherits:
Widget
  • Object
show all
Defined in:
lib/interphase/widgets/label.rb

Overview

A text label.

Instance Attribute Summary collapse

Attributes inherited from Widget

#gtk_instance, #name, #parent

Instance Method Summary collapse

Methods inherited from Widget

#destroy, #method_missing, #on, #respond_to_missing?, #show, #size

Constructor Details

#initialize(text = '', **options, &block) ⇒ Label

Creates a new label.


11
12
13
14
# File 'lib/interphase/widgets/label.rb', line 11

def initialize(text = '', **options, &block)
  super(Gtk::Label.new(text), options, &block)
  @text = text
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Interphase::Widget

Instance Attribute Details

#textObject

Returns the value of attribute text


8
9
10
# File 'lib/interphase/widgets/label.rb', line 8

def text
  @text
end