Class: Context::Widget

Inherits:
Object show all
Defined in:
lib/Context/Widget.rb

Direct Known Subclasses

Gtk::Widget

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(delegate) ⇒ Widget

Returns a new instance of Widget.



7
8
9
# File 'lib/Context/Widget.rb', line 7

def initialize(delegate)
	@delegate = delegate
end

Instance Attribute Details

#delegateObject (readonly)

Returns the value of attribute delegate.



5
6
7
# File 'lib/Context/Widget.rb', line 5

def delegate
  @delegate
end

Instance Method Details

#add(widget) ⇒ Object

Use this widget as a container for the passed widget



26
27
28
29
# File 'lib/Context/Widget.rb', line 26

def add(widget)
	# This is an abstract method, the child classes should
	# implement this
end

#addedTo(widget) ⇒ Object

This method is called after the widget has been successfully added to another widget



13
14
15
16
# File 'lib/Context/Widget.rb', line 13

def addedTo(widget)
	# This is an abstract method, the child classes should
	# implement this		    
end

#eql?(widget) ⇒ Boolean

Returns:

  • (Boolean)


36
37
38
# File 'lib/Context/Widget.rb', line 36

def eql?(widget)
	@delegate.eql?(widget.delegate)
end

#remove(widget) ⇒ Object



31
32
33
34
# File 'lib/Context/Widget.rb', line 31

def remove(widget)
	# This is an abstract method, the child classes should
	# implement this
end

#removedFrom(widget) ⇒ Object

This method is called after the widget has been successfully removed from another widget



20
21
22
23
# File 'lib/Context/Widget.rb', line 20

def removedFrom(widget)
	# This is an abstract method, the child classes should
	# implement this		    
end