Class: Pdfrb::Model::Type::OutlineItem
Overview
Single bookmark entry. Lives in its own file so the autoload
path matches the TSV-derived class name.
Instance Attribute Summary
Attributes inherited from Object
#document, #gen, #oid, #value
Instance Method Summary
collapse
#[], #[]=, 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
Instance Method Details
19
|
# File 'lib/pdfrb/model/type/outline_item.rb', line 19
def action; self[:A]; end
|
#bold? ⇒ Boolean
28
29
30
|
# File 'lib/pdfrb/model/type/outline_item.rb', line 28
def bold?
f&.anybits?(1)
end
|
21
|
# File 'lib/pdfrb/model/type/outline_item.rb', line 21
def c; self[:C]; end
|
#child_count ⇒ Object
46
47
48
49
50
|
# File 'lib/pdfrb/model/type/outline_item.rb', line 46
def child_count
return 0 unless count
count.abs
end
|
24
25
26
|
# File 'lib/pdfrb/model/type/outline_item.rb', line 24
def color
c if c && (!c.is_a?(Array) || !c.empty?)
end
|
17
|
# File 'lib/pdfrb/model/type/outline_item.rb', line 17
def count; self[:Count]; end
|
18
|
# File 'lib/pdfrb/model/type/outline_item.rb', line 18
def dest; self[:Dest]; end
|
#destination ⇒ Object
52
53
54
|
# File 'lib/pdfrb/model/type/outline_item.rb', line 52
def destination
dest || (action && action[:D])
end
|
22
|
# File 'lib/pdfrb/model/type/outline_item.rb', line 22
def f; self[:F]; end
|
15
|
# File 'lib/pdfrb/model/type/outline_item.rb', line 15
def first; self[:First]; end
|
#has_children? ⇒ Boolean
36
37
38
|
# File 'lib/pdfrb/model/type/outline_item.rb', line 36
def has_children?
!!(count && count.nonzero?)
end
|
#italic? ⇒ Boolean
32
33
34
|
# File 'lib/pdfrb/model/type/outline_item.rb', line 32
def italic?
f&.anybits?(2)
end
|
16
|
# File 'lib/pdfrb/model/type/outline_item.rb', line 16
def last; self[:Last]; end
|
14
|
# File 'lib/pdfrb/model/type/outline_item.rb', line 14
def next; self[:Next]; end
|
#open? ⇒ Boolean
40
41
42
43
44
|
# File 'lib/pdfrb/model/type/outline_item.rb', line 40
def open?
return true unless count
count.positive?
end
|
12
|
# File 'lib/pdfrb/model/type/outline_item.rb', line 12
def parent; self[:Parent]; end
|
13
|
# File 'lib/pdfrb/model/type/outline_item.rb', line 13
def prev; self[:Prev]; end
|
20
|
# File 'lib/pdfrb/model/type/outline_item.rb', line 20
def se; self[:SE]; end
|
11
|
# File 'lib/pdfrb/model/type/outline_item.rb', line 11
def title; self[:Title]; end
|