Class: Gtk::Widget

Inherits:
Object show all
Defined in:
lib/unixcmd/aux.rb

Instance Method Summary collapse

Instance Method Details

#connect_bypath(path) ⇒ Object



123
124
125
126
# File 'lib/unixcmd/aux.rb', line 123

def connect_bypath(path)
    signal_connect('clicked') { $actMap[path].call }
    self
end

#inside?(widget) ⇒ Boolean

Returns:

  • (Boolean)


128
129
130
131
132
133
134
135
136
137
138
# File 'lib/unixcmd/aux.rb', line 128

def inside? widget
    w = self

    while w do
        return true if w == widget

        w = w.parent
    end

    false
end