Class: Gtk2AppLib::Dialogs::TextView
- Inherits:
-
Gtk::Dialog
- Object
- Gtk::Dialog
- Gtk2AppLib::Dialogs::TextView
- Defined in:
- lib/gtk2applib/dialogs/text_view.rb
Overview
creates a TextView dialog
Instance Method Summary (collapse)
-
- (TextView) initialize(message, options)
constructor
A new instance of TextView.
- - (Object) run
Constructor Details
- (TextView) initialize(message, options)
A new instance of TextView
8 9 10 11 12 13 14 15 16 17 |
# File 'lib/gtk2applib/dialogs/text_view.rb', line 8 def initialize(, ) @options = super(@options[:TITLE], @options[:WINDOW], @options[:FLAGS], *@options[:DIALOG_BUTTONS]) box = self.vbox if @options[:SCROLLED_WINDOW] then box = Widgets::ScrolledWindow.new(box, *@options[:ScrolledWindow]) end @text_view = Widgets::TextView.new(, box, *@options[:TextView]) end |
Instance Method Details
- (Object) run
19 20 21 22 23 24 25 |
# File 'lib/gtk2applib/dialogs/text_view.rb', line 19 def run = nil self.show_all super { |response| = @text_view.text if response == 1 } self.destroy end |