Class: RETerm::Components::CloseButton

Inherits:
Button show all
Defined in:
lib/reterm/components/close_button.rb

Constant Summary

Constants included from LogHelpers

LogHelpers::LOG_FILE

Instance Attribute Summary

Attributes inherited from Button

#title

Attributes inherited from RETerm::Component

#activatable, #activate_focus, #highlight_focus, #window

Instance Method Summary collapse

Methods inherited from Button

#activate!, #click!, #requested_cols, #requested_rows, #skip_formatting=

Methods included from RETerm::CDKComponent

#_component, #activatable?, #activate!, #bind_key, #cdk?, #colors=, #component, #deactivate!, #draw!, #early_exit?, #erase, #escape_hit?, #init?, #init_cdk, #normal_exit?, #strip_formatting, #title_attrib=, #value

Methods inherited from RETerm::Component

#activatable?, #activate!, #cdk?, #colored?, #colors=, #deactivate!, #deactivate?, #distance_from, #extra_padding, #finalize!, #highlight_focus?, #reactivate!, #requested_cols, #requested_rows, #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 = {}) ⇒ CloseButton

Returns a new instance of CloseButton.



4
5
6
# File 'lib/reterm/components/close_button.rb', line 4

def initialize(args={})
  super({:title => "X"}.merge(args))
end

Instance Method Details

#activate_focus?Boolean

Returns:

  • (Boolean)


8
9
10
# File 'lib/reterm/components/close_button.rb', line 8

def activate_focus?
  true
end