Class: Smartdict::Gui::TextView

Inherits:
Gtk::TextView
  • Object
show all
Extended by:
ActiveSupport::Autoload
Defined in:
lib/smartdict/gui/text_view.rb

Defined Under Namespace

Classes: Buffer

Instance Method Summary collapse

Constructor Details

#initialize(controller) ⇒ TextView

Returns a new instance of TextView.



5
6
7
8
9
# File 'lib/smartdict/gui/text_view.rb', line 5

def initialize(controller)
  super(Buffer.new)
  @controller = controller
  self.editable = false
end

Instance Method Details

#show_error(error) ⇒ Object



15
16
17
# File 'lib/smartdict/gui/text_view.rb', line 15

def show_error(error)
  buffer.set_error(error)
end

#show_translation(translation) ⇒ Object



11
12
13
# File 'lib/smartdict/gui/text_view.rb', line 11

def show_translation(translation)
  buffer.set_translation(translation)
end