Module: PDFWalker::PopupMenu
- Included in:
- PDFTree
- Defined in:
- lib/pdfwalker/menu.rb
Constant Summary collapse
Hash.new([])
Instance Method Summary collapse
Instance Method Details
#popup_menu(obj, event, path) ⇒ Object
176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 |
# File 'lib/pdfwalker/menu.rb', line 176 def (obj, event, path) = Menu.new type = (obj) # Create menu title. title = obj.is_a?(Origami::Object) ? "Object : " : "" title << type.to_s .append(MenuItem.new(title).set_sensitive(false).modify_text(Gtk::STATE_INSENSITIVE, Gdk::Color.new(255,0,255))) # Object information. (, obj) if obj.is_a?(Origami::Object) # Type-specific menu. (, type, path) .show_all .popup(nil, nil, event., event.time) end |