Class: VER::MiniBuffer::Peer

Inherits:
VER::MiniBuffer show all
Defined in:
lib/ver/minibuffer.rb

Overview

NOTE:

{Text#dump} on a peer text widget causes segfault, I've reported the
issue to the tk maintainers and they are working on it.
All tcl/tk versions are affected AFAIK, take care.

Constant Summary

Constants inherited from VER::MiniBuffer

HISTORY

Instance Attribute Summary collapse

Attributes inherited from VER::MiniBuffer

#ask_stack, #asking, #at_insert, #char_width, #completion_buffer, #messages, #messages_expire, #messages_pending

Attributes included from Keymapped

#major_mode

Attributes inherited from Text

#lock

Instance Method Summary collapse

Methods inherited from VER::MiniBuffer

#abort, #adjust_size, #answer, #answer=, answer_from, #ask, #attempt, #claim_focus, #common_subchoice, #complete_large, #complete_small, #copy, #delete_next_char, #delete_next_word, #delete_prev_char, #delete_prev_word, #end_of_line, #events, #history, #insert_selection, #insert_string, #insert_tab, #invoke, #kill_end_of_line, #message, #message_expire, #message_notify, #next_char, #next_history, #on_destroy, #paste, #peer_create, #prev_char, #prev_history, #prompt, #prompt=, #release_focus, #setup, #setup_common, #show_completions, #start_of_line, #transpose_chars, #type, #warn

Methods included from Keymapped

#minor_mode, #minor_mode?

Methods inherited from Text

#execute, #execute_only, #focus, #index, #insert=, #inspect, #mark, #mark_next, #mark_previous, #marks, #place_forget, #range, #tag, #tag_ranges, #tags

Constructor Details

#initialize(text, parent, buffer, options = {}) ⇒ Peer

Returns a new instance of Peer.



12
13
14
15
16
17
18
# File 'lib/ver/minibuffer.rb', line 12

def initialize(text, parent, buffer, options = {})
  @tk_parent = parent
  @buffer = buffer
  @tk_pathname = Tk.register_object(parent, self)
  Tk.execute(text.tk_pathname, 'peer', 'create', @tk_pathname, options)
  setup_common
end

Instance Attribute Details

#bufferObject (readonly)

Returns the value of attribute buffer.



10
11
12
# File 'lib/ver/minibuffer.rb', line 10

def buffer
  @buffer
end