Class: RETerm::Components::Template

Inherits:
RETerm::Component show all
Defined in:
lib/reterm/components/template.rb

Overview

Template which may be used as the basis for other components

Constant Summary

Constants included from LogHelpers

LogHelpers::LOG_FILE

Instance Attribute Summary

Attributes inherited from RETerm::Component

#activatable, #activate_focus, #highlight_focus, #window

Instance Method Summary collapse

Methods inherited from RETerm::Component

#activate_focus?, #cdk?, #colored?, #colors=, #deactivate!, #deactivate?, #distance_from, #extra_padding, #finalize!, #highlight_focus?, #reactivate!, #resize, #sync!, #sync_getch

Methods included from KeyBindings

#bind_key, #invoke_key_bindings, #key_bindings, #key_bound?

Methods included from LogHelpers

#logger

Methods included from EventDispatcher

#dispatch, #handle

Constructor Details

#initialize(args = {}) ⇒ Template

All components must accept args hash (specified via loader)



6
7
8
# File 'lib/reterm/components/template.rb', line 6

def initialize(args={})
  super
end

Instance Method Details

#activatable?Boolean

Return true if the user should be able to focus and interact with this component, default to false

Returns:

  • (Boolean)


26
27
# File 'lib/reterm/components/template.rb', line 26

def activatable?
end

#activate!(*input) ⇒ Object

Method call when this component is activated



30
31
# File 'lib/reterm/components/template.rb', line 30

def activate!(*input)
end

#draw!Object

Override this method to draw component on screen



21
22
# File 'lib/reterm/components/template.rb', line 21

def draw!
end

#requested_colsObject

Override this to request minimum cols for window allocation



17
18
# File 'lib/reterm/components/template.rb', line 17

def requested_cols
end

#requested_rowsObject

Override this to request minimum rows for window allocation



12
13
# File 'lib/reterm/components/template.rb', line 12

def requested_rows
end