Sha256: b157ad3ad2ae2431ac412230ca96e268e4a77ddbcffe765754ae9e27cd334fca

Contents?: true

Size: 639 Bytes

Versions: 23

Compression:

Stored size: 639 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
  end
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
redcar-0.7 plugins/edit_view/lib/edit_view/edit_tab.rb
redcar-0.6.1 plugins/edit_view/lib/edit_view/edit_tab.rb
redcar-0.6 plugins/edit_view/lib/edit_view/edit_tab.rb
redcar-0.6.1dev plugins/edit_view/lib/edit_view/edit_tab.rb
redcar-0.5.1 plugins/edit_view/lib/edit_view/edit_tab.rb
redcar-0.5 plugins/edit_view/lib/edit_view/edit_tab.rb
redcar-0.5.6dev plugins/edit_view/lib/edit_view/edit_tab.rb
redcar-0.5.5dev plugins/edit_view/lib/edit_view/edit_tab.rb
redcar-0.5.4dev plugins/edit_view/lib/edit_view/edit_tab.rb
redcar-0.5.3dev plugins/edit_view/lib/edit_view/edit_tab.rb
redcar-0.5.2dev plugins/edit_view/lib/edit_view/edit_tab.rb
redcar-0.5.1dev plugins/edit_view/lib/edit_view/edit_tab.rb
redcar-0.4.1 plugins/edit_view/lib/edit_view/edit_tab.rb
redcar-0.4 plugins/edit_view/lib/edit_view/edit_tab.rb
redcar-0.3.10.1dev plugins/edit_view/lib/edit_view/edit_tab.rb
redcar-0.3.10.0dev plugins/edit_view/lib/edit_view/edit_tab.rb
redcar-0.3.9 plugins/edit_view/lib/edit_view/edit_tab.rb
redcar-0.3.9.0dev plugins/edit_view/lib/edit_view/edit_tab.rb
redcar-0.3.8.4 plugins/edit_view/lib/edit_view/edit_tab.rb
redcar-0.3.8.3 plugins/edit_view/lib/edit_view/edit_tab.rb