Module: GtkApp::SignalSupport::ClassMethods
- Defined in:
- lib/gtk_app/signal_support.rb
Instance Attribute Summary collapse
-
#signal_connections ⇒ Object
readonly
Returns the value of attribute signal_connections.
Instance Method Summary collapse
Instance Attribute Details
#signal_connections ⇒ Object (readonly)
Returns the value of attribute signal_connections.
10 11 12 |
# File 'lib/gtk_app/signal_support.rb', line 10 def signal_connections @signal_connections end |
Instance Method Details
#on(widget_name, signal_name, receiver_method = nil) {|...| ... } ⇒ Object
16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/gtk_app/signal_support.rb', line 16 def on(, signal_name, receiver_method=nil, &block) sc = SignalConnection.new do @widget_name = @signal_name = signal_name @receiver_method = receiver_method @receiver_block = block if block_given? end @signal_connections ||= [] @signal_connections << sc end |