Module: Prawn::Blank
- Defined in:
- lib/prawn/blank.rb,
lib/prawn/blank/radio.rb,
lib/prawn/blank/appearance.rb,
lib/prawn/blank/text_style.rb,
lib/prawn/blank/radio_group.rb
Defined Under Namespace
Classes: Appearance, Checkbox, Field, FieldBase, Form, Radio, RadioGroup, Select, TextField, TextStyle
Instance Attribute Summary collapse
Instance Method Summary
collapse
Instance Attribute Details
#default_appearance ⇒ Object
Returns the value of attribute default_appearance.
76
77
78
|
# File 'lib/prawn/blank.rb', line 76
def default_appearance
@default_appearance
end
|
Instance Method Details
71
72
73
74
|
# File 'lib/prawn/blank.rb', line 71
def acroform
state.store.root.data[:AcroForm] ||= ref!(Form.new)
state.store.root.data[:AcroForm].data
end
|
#checkbox(options = {}) ⇒ Object
41
42
43
44
45
46
47
48
49
50
|
# File 'lib/prawn/blank.rb', line 41
def checkbox(options={})
if options[:at]
options[:at] = self.send(:map_to_absolute,options[:at])
end
f=Checkbox.create(self,options)
if block_given?
yield(f)
end
add_field(f)
end
|
#radio(options = {}) ⇒ Object
60
61
62
63
64
65
66
67
68
69
|
# File 'lib/prawn/blank.rb', line 60
def radio(options={})
if options[:at]
options[:at] = self.send(:map_to_absolute,options[:at])
end
f=Radio.create(self,options)
if block_given?
yield(f)
end
return add_field(f)
end
|
#radiogroup(options = {}) ⇒ Object
52
53
54
55
56
57
58
|
# File 'lib/prawn/blank.rb', line 52
def radiogroup(options={})
f=RadioGroup.create(self,options)
if block_given?
yield(f)
end
return add_field(f)
end
|
#select(options = {}) ⇒ Object
30
31
32
33
34
35
36
37
38
39
|
# File 'lib/prawn/blank.rb', line 30
def select(options={})
if options[:at]
options[:at] = self.send(:map_to_absolute,options[:at])
end
f=Select.create(self,options)
if block_given?
yield(f)
end
add_field(f)
end
|
#text_field(options = {}) ⇒ Object
18
19
20
21
22
23
24
25
26
27
28
|
# File 'lib/prawn/blank.rb', line 18
def text_field(options={})
if options[:at]
options[:at] = self.send(:map_to_absolute,options[:at])
end
f=TextField.create(self,options)
if block_given?
yield(f)
end
add_field(f)
end
|