Class: VER::Buffer::Frame

Inherits:
Tk::Frame
  • Object
show all
Defined in:
lib/ver/buffer/frame.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

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

Returns a new instance of Frame.



8
9
10
11
12
13
14
15
16
17
18
19
20
# File 'lib/ver/buffer/frame.rb', line 8

def initialize(parent, buffer, options = {})
  @buffer = buffer
  options = options.dup
  options[:takefocus] ||= false
  # options[:style] ||= VER.obtain_style_name('Buffer', 'TFrame')
  # options[:padding] ||= 2
  # options[:relief] ||= :solid
  super(parent, options)

  @shown = true

  bind('<FocusIn>'){ buffer.focus; Tk.callback_break }
end

Instance Attribute Details

#bufferObject (readonly)

Returns the value of attribute buffer.



4
5
6
# File 'lib/ver/buffer/frame.rb', line 4

def buffer
  @buffer
end

#shownObject Also known as: shown?

Returns the value of attribute shown.



5
6
7
# File 'lib/ver/buffer/frame.rb', line 5

def shown
  @shown
end