module Metasm::Gui::Msgbox
Public Instance Methods
inputbox(*a) { |*ya| ... }
click to toggle source
asks for user input, yields the result (unless 'cancel' clicked) args: prompt, :text => default text, :title => title
# File metasm/gui/gtk.rb, line 44 def inputbox(*a) InputBox.new(toplevel, *a) { |*ya| protect { yield(*ya) } } end
listwindow(*a) { |*ya| ... }
click to toggle source
displays a popup showing a table, yields the selected row args: title, [[col0 title, col1 title…], [col0 val0, col1 val0…], [val1], [val2]…]
# File metasm/gui/gtk.rb, line 61 def listwindow(*a) ListWindow.new(toplevel, *a) { |*ya| protect { yield(*ya) } } end
messagebox(*a)
click to toggle source
shows a message box (non-modal) args: message, title/optionhash
# File metasm/gui/gtk.rb, line 38 def messagebox(*a) MessageBox.new(toplevel, *a) end
openfile(*a) { |*ya| ... }
click to toggle source
asks to choose a file to open, yields filename args: title, :path => path
# File metasm/gui/gtk.rb, line 50 def openfile(*a) OpenFile.new(toplevel, *a) { |*ya| protect { yield(*ya) } } end
savefile(*a) { |*ya| ... }
click to toggle source
same as openfile, but for writing a (new) file
# File metasm/gui/gtk.rb, line 55 def savefile(*a) SaveFile.new(toplevel, *a) { |*ya| protect { yield(*ya) } } end
toplevel()
click to toggle source
Calls superclass method
# File metasm/gui/gtk.rb, line 28 def toplevel if self.kind_of? Gtk::Window self else super() end end