Class: Wee::TextAreaDialog

Inherits:
TextInputDialog show all
Defined in:
lib/wee/dialog.rb

Overview

class TextInputDialog

Constant Summary

Constants inherited from Component

Component::NO_CHILDREN

Instance Attribute Summary

Attributes inherited from TextInputDialog

#text

Instance Method Summary collapse

Methods inherited from TextInputDialog

#buttons, #cancel, #ok, #set_text, #state

Methods inherited from FormDialog

#buttons, #render, #render_buttons, #render_caption, #render_form

Methods inherited from Component

#add_decoration, #children, #choose_from, #confirm, #decoration, #decoration=, depends, #each_decoration, #find_decoration, #inform, instanciate, #process_callbacks, #remove_decoration, #remove_decoration_if, #render, #state

Methods inherited from Presenter

#process_callbacks, #render, #render!, #renderer_class, #state

Constructor Details

#initialize(caption = nil, text = "", cols = 50, rows = 5) ⇒ TextAreaDialog

Returns a new instance of TextAreaDialog.



144
145
146
147
# File 'lib/wee/dialog.rb', line 144

def initialize(caption=nil, text="", cols=50, rows=5)
  super(caption, text, cols)
  @rows = rows
end

Instance Method Details

#render_body(r) ⇒ Object



149
150
151
# File 'lib/wee/dialog.rb', line 149

def render_body(r)
  r.text_area.cols(@size).rows(@rows).callback_method(:set_text).with(@text || "")
end