class Canis::LabeledField

trying to take out the label thing from field to keep it as simple as possible. 2014-07-09

Public Instance Methods

repaint() click to toggle source
Calls superclass method Canis::Field#repaint
# File lib/canis/core/widgets/rwidget.rb, line 2817
def repaint
  return unless @repaint_required
  _lrow = @lrow || @row
  # the next was nice, but in some cases this goes out of screen. and the container
  # only sets row and col for whatever is added, it does not know that lcol has to be
  # taken into account
  #_lcol = @lcol || (@col - @label.length  - 2)
  unless @lcol
    @lcol = @col
    @col = @lcol + @label.length + 2
  end
  _lcol = @lcol
  @graphic = @form.window if @graphic.nil?
  lcolor = @label_color_pair || $datacolor # this should be the same color as window bg XXX
  lattr = @label_attr || NORMAL
  @graphic.printstring _lrow, _lcol, @label, lcolor, lattr
  ##c += @label.length + 2
  #@col_offset = c-@col            # required so cursor lands in right place
  super
end