Class: Reline::LineEditor::Dialog
Relationships & Source Files | |
Inherits: | Object |
Defined in: | lib/reline/line_editor.rb |
Class Method Summary
- .new(name, config, proc_scope) ⇒ Dialog constructor
Instance Attribute Summary
- #column rw
- #contents rw
- #contents=(contents) rw
- #lines_backup rw
- #name readonly
- #pointer rw
- #scroll_top rw
- #scrollbar_pos rw
- #trap_key rw
- #vertical_offset rw
- #width rw
- #width=(v) rw
Instance Method Summary
Constructor Details
.new(name, config, proc_scope) ⇒ Dialog
Instance Attribute Details
#column (rw)
[ GitHub ]# File 'lib/reline/line_editor.rb', line 594
attr_accessor :scroll_top, :, :pointer, :column, :vertical_offset, :lines_backup, :trap_key
#contents (rw)
[ GitHub ]#contents=(contents) (rw)
[ GitHub ]#lines_backup (rw)
[ GitHub ]# File 'lib/reline/line_editor.rb', line 594
attr_accessor :scroll_top, :, :pointer, :column, :vertical_offset, :lines_backup, :trap_key
#name (readonly)
[ GitHub ]#pointer (rw)
[ GitHub ]# File 'lib/reline/line_editor.rb', line 594
attr_accessor :scroll_top, :, :pointer, :column, :vertical_offset, :lines_backup, :trap_key
#scroll_top (rw)
[ GitHub ]# File 'lib/reline/line_editor.rb', line 594
attr_accessor :scroll_top, :, :pointer, :column, :vertical_offset, :lines_backup, :trap_key
#scrollbar_pos (rw)
[ GitHub ]# File 'lib/reline/line_editor.rb', line 594
attr_accessor :scroll_top, :, :pointer, :column, :vertical_offset, :lines_backup, :trap_key
#trap_key (rw)
[ GitHub ]# File 'lib/reline/line_editor.rb', line 594
attr_accessor :scroll_top, :, :pointer, :column, :vertical_offset, :lines_backup, :trap_key
#vertical_offset (rw)
[ GitHub ]# File 'lib/reline/line_editor.rb', line 594
attr_accessor :scroll_top, :, :pointer, :column, :vertical_offset, :lines_backup, :trap_key
#width (rw)
[ GitHub ]#width=(v) (rw)
[ GitHub ]# File 'lib/reline/line_editor.rb', line 609
def width=(v) @width = v end
Instance Method Details
#call(key)
[ GitHub ]# File 'lib/reline/line_editor.rb', line 620
def call(key) @proc_scope.set_dialog(self) @proc_scope.set_key(key) dialog_render_info = @proc_scope.call if @trap_key if @trap_key.any?{ |i| i.is_a?(Array) } # multiple trap @trap_key.each do |t| @config.add_oneshot_key_binding(t, @name) end elsif @trap_key.is_a?(Array) @config.add_oneshot_key_binding(@trap_key, @name) elsif @trap_key.is_a?(Integer) or @trap_key.is_a?(Reline::Key) @config.add_oneshot_key_binding([@trap_key], @name) end end dialog_render_info end
#set_cursor_pos(col, row)
[ GitHub ]# File 'lib/reline/line_editor.rb', line 605
def set_cursor_pos(col, row) @proc_scope.set_cursor_pos(col, row) end