Sha256: b1e1cc165156ea34972427ea7356887965765f907f0e38ae86942e9ef3a3562d
Contents?: true
Size: 1013 Bytes
Versions: 1
Compression:
Stored size: 1013 Bytes
Contents
require 'Context/Gtk/Widget' require 'gtk2' module JLDrill::Gtk class InfoWindow < Gtk::Dialog include Context::Gtk::Widget def initialize(view) @view = view super("Info", nil, Gtk::Dialog::DESTROY_WITH_PARENT, [Gtk::Stock::OK, Gtk::Dialog::RESPONSE_ACCEPT]) sw = Gtk::ScrolledWindow.new sw.set_policy(Gtk::POLICY_AUTOMATIC, Gtk::POLICY_AUTOMATIC) sw.shadow_type = Gtk::SHADOW_IN self.vbox.add(sw) @contents = Gtk::TextView.new @contents.wrap_mode = Gtk::TextTag::WRAP_WORD @contents.editable = false @contents.cursor_visible = false sw.add(@contents) self.set_default_size(600, 360) end def addContents(string) @contents.buffer.text = string end def execute(string) addContents(string) run end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
jldrill-0.5.1.7 | lib/jldrill/views/gtk/widgets/InfoWindow.rb |