Class: RubyCurses::ComboBoxCellRenderer

Inherits:
ListCellRenderer show all
Includes:
ConfigSetup, Utils
Defined in:
lib/rbcurse/comboboxcellrenderer.rb

Overview

This is a list cell renderer that will render combo boxes. Since a combo box extends a field therefore the repaint of field is used. In other words there is nothing much to do here.

Instance Method Summary collapse

Methods included from Utils

#_process_key, #bind_key, #clean_string!, #get_color, #keycode_tos, #repeatm, #wrap_text

Methods included from ConfigSetup

#cget, #config_setup, #configure, #variable_set

Methods inherited from ListCellRenderer

#prepare_default_colors, #repaint

Constructor Details

#initialize(text = "", config = {}, &block) ⇒ ComboBoxCellRenderer

Returns a new instance of ComboBoxCellRenderer.



23
24
25
26
27
28
29
30
# File 'lib/rbcurse/comboboxcellrenderer.rb', line 23

def initialize text="", config={}, &block
  @text = text
  @editable = false
  @focusable = false
  config_setup config # @config.each_pair { |k,v| variable_set(k,v) }
  instance_eval &block if block_given?
  init_vars
end

Instance Method Details

#getvalueObject

me thinks this is unused



36
37
38
39
# File 'lib/rbcurse/comboboxcellrenderer.rb', line 36

def getvalue
  raise "I think this is unused. comboboxcellrenderer line 36"
  @text
end

#init_varsObject



31
32
33
34
# File 'lib/rbcurse/comboboxcellrenderer.rb', line 31

def init_vars
  @justify ||= :left
  @display_length ||= 10
end