Method: CDK::DIALOG#draw

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

#draw(box) ⇒ Object

This function draws the dialog widget.



225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
# File 'lib/cdk/components/dialog.rb', line 225

def draw(box)
  # Is there a shadow?
  unless @shadow_win.nil?
    Draw.drawShadow(@shadow_win)
  end

  # Box the widget if they asked.
  if box
    Draw.drawObjBox(@win, self)
  end

  # Draw in the message.
  (0...@message_rows).each do |x|
    Draw.writeChtype(@win,
        @info_pos[x] + @border_size, x + @border_size, @info[x],
        CDK::HORIZONTAL, 0, @info_len[x])
  end

  # Draw in the buttons.
  self.drawButtons

  wrefresh(@win)
end