| Class | Origami::Page |
| In: |
sources/parser/page.rb
|
| Parent: | Dictionary |
| Resources | = | Resources.new.pre_build unless has_field?(:Resources) |
| P | = | self if is_indirect? |
| O | = | action |
| C | = | action |
# File sources/parser/page.rb, line 283
283: def initialize(hash = {})
284: super(hash)
285:
286: set_indirect(true)
287: end
Add an Annotation to the Page.
# File sources/parser/page.rb, line 298
298: def add_annot(*annotations)
299:
300: unless annotations.all?{|annot| annot.is_a?(Annotation::Annotation)}
301: raise TypeError, "An Annotation object must be passed."
302: end
303:
304: self.Annots ||= Array.new
305: annotations.each do |annot|
306: annot.P = self if is_indirect?
307: self.Annots << annot
308: end
309: end
# File sources/parser/page.rb, line 323
323: def onClose(action)
324:
325: unless action.is_a?(Action::Action)
326: raise TypeError, "An Action object must be passed."
327: end
328:
329: self.AA ||= PageAdditionalActions.new
330: self.AA.C = action
331:
332: end
# File sources/parser/page.rb, line 311
311: def onOpen(action)
312:
313: unless action.is_a?(Action::Action)
314: raise TypeError, "An Action object must be passed."
315: end
316:
317: self.AA ||= PageAdditionalActions.new
318: self.AA.O = action
319:
320: self
321: end