Class: Arrolio::Flowables::PageSequenceStart
- Inherits:
-
Arrolio::Flowable
- Object
- Arrolio::Flowable
- Arrolio::Flowables::PageSequenceStart
- Defined in:
- lib/arrolio/flowables/page_sequence_start.rb
Overview
Forces a page break AND switches the active page sequence: role + header/footer templates apply to subsequent pages until the next PageSequenceStart.
Instance Attribute Summary collapse
-
#footer_align ⇒ Object
readonly
Returns the value of attribute footer_align.
-
#footer_template ⇒ Object
readonly
Returns the value of attribute footer_template.
-
#header_align ⇒ Object
readonly
Returns the value of attribute header_align.
-
#header_template ⇒ Object
readonly
Returns the value of attribute header_template.
-
#initial_page_number ⇒ Object
readonly
Returns the value of attribute initial_page_number.
-
#role ⇒ Object
readonly
Returns the value of attribute role.
-
#title_template ⇒ Object
readonly
Returns the value of attribute title_template.
Attributes inherited from Arrolio::Flowable
Instance Method Summary collapse
- #emit(_x, _y, _width, _context = nil) ⇒ Object
- #height(_width, _context = nil) ⇒ Object
-
#initialize(role:, header_template: nil, footer_template: nil, header_align: nil, footer_align: :center, initial_page_number: nil, title_template: nil) ⇒ PageSequenceStart
constructor
header_alignnil means "no flavor opinion" — the engine picks left/right from page parity (XSL-FO odd/even headers).
Methods inherited from Arrolio::Flowable
#do_split, #keep_together?, #keep_with_next?, #min_keep_height, #page_break_after?, #page_break_before?, #space_after, #space_before, #split, #splittable?
Constructor Details
#initialize(role:, header_template: nil, footer_template: nil, header_align: nil, footer_align: :center, initial_page_number: nil, title_template: nil) ⇒ PageSequenceStart
header_align nil means "no flavor opinion" — the engine
picks left/right from page parity (XSL-FO odd/even headers).
15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/arrolio/flowables/page_sequence_start.rb', line 15 def initialize(role:, header_template: nil, footer_template: nil, header_align: nil, footer_align: :center, initial_page_number: nil, title_template: nil) @role = role.to_sym @header_template = header_template @footer_template = @header_align = header_align&.to_sym @footer_align = .to_sym @initial_page_number = initial_page_number @title_template = title_template end |
Instance Attribute Details
#footer_align ⇒ Object (readonly)
Returns the value of attribute footer_align.
9 10 11 |
# File 'lib/arrolio/flowables/page_sequence_start.rb', line 9 def @footer_align end |
#footer_template ⇒ Object (readonly)
Returns the value of attribute footer_template.
9 10 11 |
# File 'lib/arrolio/flowables/page_sequence_start.rb', line 9 def @footer_template end |
#header_align ⇒ Object (readonly)
Returns the value of attribute header_align.
9 10 11 |
# File 'lib/arrolio/flowables/page_sequence_start.rb', line 9 def header_align @header_align end |
#header_template ⇒ Object (readonly)
Returns the value of attribute header_template.
9 10 11 |
# File 'lib/arrolio/flowables/page_sequence_start.rb', line 9 def header_template @header_template end |
#initial_page_number ⇒ Object (readonly)
Returns the value of attribute initial_page_number.
9 10 11 |
# File 'lib/arrolio/flowables/page_sequence_start.rb', line 9 def initial_page_number @initial_page_number end |
#role ⇒ Object (readonly)
Returns the value of attribute role.
9 10 11 |
# File 'lib/arrolio/flowables/page_sequence_start.rb', line 9 def role @role end |
#title_template ⇒ Object (readonly)
Returns the value of attribute title_template.
9 10 11 |
# File 'lib/arrolio/flowables/page_sequence_start.rb', line 9 def title_template @title_template end |
Instance Method Details
#emit(_x, _y, _width, _context = nil) ⇒ Object
29 |
# File 'lib/arrolio/flowables/page_sequence_start.rb', line 29 def emit(_x, _y, _width, _context = nil) = [[], 0.0] |
#height(_width, _context = nil) ⇒ Object
27 |
# File 'lib/arrolio/flowables/page_sequence_start.rb', line 27 def height(_width, _context = nil) = 0.0 |