Module: Rumai::WidgetImpl

Included in:
Area, View, WidgetNode
Defined in:
lib/rumai/wm.rb

Overview

Note:

Inheritors must define a curr class method.

Note:

Inheritors must override the focus method.

The basic building block of the WM hierarchy.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#idObject (readonly)

Returns the value of attribute id.



67
68
69
# File 'lib/rumai/wm.rb', line 67

def id
  @id
end

Instance Method Details

#==(other) ⇒ Object



69
70
71
# File 'lib/rumai/wm.rb', line 69

def == other
  @id == other.id
end

#current?Boolean Also known as: focus?

Checks if this widget currently has focus.

Returns:

  • (Boolean)


76
77
78
# File 'lib/rumai/wm.rb', line 76

def current?
  self == self.class.curr
end