Module: Origami::Field
- Included in:
- Annotation::Widget, Subform
- Defined in:
- lib/origami/acroform.rb
Defined Under Namespace
Modules: Flags, TextAlign, Type Classes: AdditionalActions, CertificateSeedValue, SignatureLock, SignatureSeedValue, Subform
Class Method Summary collapse
-
.included(receiver) ⇒ Object
:nodoc:.
Instance Method Summary collapse
- #onCalculate(action) ⇒ Object
- #onFormat(action) ⇒ Object
- #onKeyStroke(action) ⇒ Object
- #onValidate(action) ⇒ Object
-
#pre_build ⇒ Object
:nodoc:.
Class Method Details
.included(receiver) ⇒ Object
:nodoc:
148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 |
# File 'lib/origami/acroform.rb', line 148 def self.included(receiver) #:nodoc: receiver.field :FT, :Type => Name, :Required => true receiver.field :Parent, :Type => Dictionary receiver.field :Kids, :Type => Array receiver.field :T, :Type => String receiver.field :TU, :Type => String, :Version => "1.3" receiver.field :TM, :Type => String, :Version => "1.3" receiver.field :Ff, :Type => Integer, :Default => 0 receiver.field :V, :Type => Object receiver.field :DV, :Type => Object receiver.field :AA, :Type => Dictionary, :Version => "1.2" # Variable text fields receiver.field :DA, :Type => String, :Default => "/F1 10 Tf 0 g", :Required => true receiver.field :Q, :Type => Integer, :Default => TextAlign::LEFT receiver.field :DS, :Type => ByteString, :Version => "1.5" receiver.field :RV, :Type => [ String, Stream ], :Version => "1.5" end |
Instance Method Details
#onCalculate(action) ⇒ Object
211 212 213 214 215 216 217 218 219 220 |
# File 'lib/origami/acroform.rb', line 211 def onCalculate(action) unless action.is_a?(Action) raise TypeError, "An Action object must be passed." end self.AA ||= AdditionalActions.new self.AA.C = action end |
#onFormat(action) ⇒ Object
189 190 191 192 193 194 195 196 197 198 |
# File 'lib/origami/acroform.rb', line 189 def onFormat(action) unless action.is_a?(Action) raise TypeError, "An Action object must be passed." end self.AA ||= AdditionalActions.new self.AA.F = action end |
#onKeyStroke(action) ⇒ Object
178 179 180 181 182 183 184 185 186 187 |
# File 'lib/origami/acroform.rb', line 178 def onKeyStroke(action) unless action.is_a?(Action) raise TypeError, "An Action object must be passed." end self.AA ||= AdditionalActions.new self.AA.K = action end |
#onValidate(action) ⇒ Object
200 201 202 203 204 205 206 207 208 209 |
# File 'lib/origami/acroform.rb', line 200 def onValidate(action) unless action.is_a?(Action) raise TypeError, "An Action object must be passed." end self.AA ||= AdditionalActions.new self.AA.V = action end |