Class: Pdfrb::Model::Type::ActionSetOCGState
- Inherits:
-
Action
- Object
- Object
- Cos::Dictionary
- Action
- Pdfrb::Model::Type::ActionSetOCGState
- Defined in:
- lib/pdfrb/model/type/action_set_ocg_state.rb
Overview
Set OCG State action (s12.6.4.13). Toggle visibility of optional-content groups.
Instance Attribute Summary
Attributes inherited from Object
Instance Method Summary collapse
Methods inherited from Action
#d, for_subtype, #goto?, #javascript?, #launch?, #named?, #next_action, #next_actions, register_subtype, #subtype, subtype_map, #uri, #uri?
Methods inherited from Cos::Dictionary
#[], #[]=, arlington_available?, arlington_default, arlington_key_to_symbol, arlington_loaded_for?, arlington_mark_loaded, arlington_object, arlington_one_type_to_ruby, arlington_required?, arlington_types_to_ruby, arlington_version, define_field, define_field_from_arlington, #delete, #each, each_field, #each_raw, #empty?, field, #initialize, #key?, #keys, lookup_type, own_fields, #pdf_type, register_type, type_map, #validate
Methods inherited from Object
#==, define_type, #deref, #indirect?, #initialize, #must_be_indirect?, #pdf_type, pdf_type
Constructor Details
This class inherits a constructor from Pdfrb::Model::Cos::Dictionary
Instance Method Details
#each_state_transition ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/pdfrb/model/type/action_set_ocg_state.rb', line 14 def each_state_transition return enum_for(:each_state_transition) unless block_given? return unless state arr = state.is_a?(Pdfrb::Model::PdfArray) ? state.to_a : state return unless arr.is_a?(Array) current_op = :ON arr.each do |entry| case entry when :ON, :OFF, :Toggle then current_op = entry else yield current_op, entry end end end |
#preserve_rb? ⇒ Boolean
12 |
# File 'lib/pdfrb/model/type/action_set_ocg_state.rb', line 12 def preserve_rb?; self[:PreserveRB] == true; end |
#state ⇒ Object
11 |
# File 'lib/pdfrb/model/type/action_set_ocg_state.rb', line 11 def state; self[:State]; end |