Module: Shoes::Swt::Common::Container

Defined in:
shoes-swt/lib/shoes/swt/common/container.rb

Overview

Container methods

Instance Method Summary collapse

Instance Method Details

#add_listener(event, listener) ⇒ Object


20
21
22
# File 'shoes-swt/lib/shoes/swt/common/container.rb', line 20

def add_listener(event, listener)
  @real.add_listener event, listener
end

#add_paint_listener(painter) ⇒ Object

Adds a painter to be executed when this object needs to be repainted. Delegates to `@real`

Parameters:

  • painter (Painter)

    The code to be executed on paint


12
13
14
# File 'shoes-swt/lib/shoes/swt/common/container.rb', line 12

def add_paint_listener(painter)
  @real.add_paint_listener painter
end

#remove_listener(event, listener) ⇒ Object


24
25
26
# File 'shoes-swt/lib/shoes/swt/common/container.rb', line 24

def remove_listener(event, listener)
  @real.remove_listener event, listener if listener
end

#remove_paint_listener(painter) ⇒ Object


16
17
18
# File 'shoes-swt/lib/shoes/swt/common/container.rb', line 16

def remove_paint_listener(painter)
  @real.remove_paint_listener painter if painter
end