Method: CDK::ENTRY#drawField

Defined in:
lib/cdk/components/entry.rb

#drawFieldObject



408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
# File 'lib/cdk/components/entry.rb', line 408

def drawField
  # Draw in the filler characters.
  @field_win.mvwhline(0, 0, @filler.ord, @field_width)

  # If there is information in the field then draw it in.
  if !(@info.nil?) && @info.size > 0
    # Redraw the field.
    if Display.isHiddenDisplayType(@disp_type)
      (@left_char...@info.size).each do |x|
        @field_win.mvwaddch(0, x - @left_char, @hidden)
      end
    else
      (@left_char...@info.size).each do |x|
        @field_win.mvwaddch(0, x - @left_char, @info[x].ord | @field_attr)
      end
    end
    @field_win.wmove(0, @screen_col)
  end

  wrefresh(@field_win)
end