Sha256: da9c61fb569290b594c4c1c7a692b87d5f5fe91551fc0ee07b07755464686012
Contents?: true
Size: 767 Bytes
Versions: 9
Compression:
Stored size: 767 Bytes
Contents
module Redcar class EditTab < Tab attr_reader :edit_view def initialize(*args) super create_edit_view end def create_edit_view @edit_view = Redcar::EditView.new @edit_view.add_listener(:focussed, &method(:edit_view_focussed)) @edit_view.document.add_listener(:changed) { notify_listeners(:changed, self) } @edit_view.document.add_listener(:selection_range_changed) { notify_listeners(:selection_changed) } @edit_view.add_listener(:title_changed) { |newt| self.title = newt } end def edit_view_focussed notify_listeners(:focus) end def serialize { :title => title } end def deserialize(data) self.title = data[:title] end end end
Version data entries
9 entries across 9 versions & 1 rubygems