Method: CDK::DIALOG#drawButtons

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

#drawButtonsObject

This draws the dialog buttons and the separation line.



301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
# File 'lib/cdk/components/dialog.rb', line 301

def drawButtons
  (0...@button_count).each do |x|
    Draw.writeChtype(@win, @button_pos[x],
        @box_height -1 - @border_size,
        @button_label[x], CDK::HORIZONTAL, 0,
        @button_len[x])
  end

  # Draw the separation line.
  if @separator
    boxattr = @BXAttr

    (1...@box_width).each do |x|
      @win.mvwaddch(@box_height - 2 - @border_size, x,
          Ncurses::ACS_HLINE | boxattr)
    end
    @win.mvwaddch(@box_height - 2 - @border_size, 0,
        Ncurses::ACS_LTEE | boxattr)
    @win.mvwaddch(@box_height - 2 - @border_size, @win.getmaxx - 1,
        Ncurses::ACS_RTEE | boxattr)
  end
  Draw.writeChtypeAttrib(@win, @button_pos[@current_button],
      @box_height - 1 - @border_size, @button_label[@current_button],
      @highlight, CDK::HORIZONTAL, 0, @button_len[@current_button])
end