Class: Layout::Pages
- Inherits:
-
Object
- Object
- Layout::Pages
- Includes:
- Enumerable
Overview
A collection of drawing pages in the document, enumerated in drawing order.
Instance Method Summary # collapse
-
#length ⇒ Integer
Pages.
-
#size ⇒ Integer
Alias for #length.
-
#each ⇒ Layout::Pages
Iterate through the pages in order.
-
#[] ⇒ Layout::Page, nil
Retrieve a page by its index or name.
-
#index(page) ⇒ Integer
The position of the pages.
-
#add(name = nil) ⇒ Layout::Page
Create a new page at the end, with one step of undo. The paper size, margins, and drawing sheet are inherited from the first page; if no pages exist, it takes the first page from the template, or uses the document's default paper size without a drawing sheet. Page numbers are automatically assigned as 1…N.
-
#remove(page) ⇒ Layout::Pages
Remove the page, one step undo. It moves its shared layer objects to the remaining first page, consistent with the interface.
-
#reorder(page, index) ⇒ Layout::Pages
Reorder pages to new positions and perform a single undo step.
Instance Method Details
pages.length ⇒ Integer
Pages.
pages.size ⇒ Integer
Alias for #length.
pages.each { |page| ... } ⇒ Layout::Pages
Iterate through the pages in order.
pages[index] ⇒ Layout::Pagepages[name] ⇒ Layout::Page, nil
Retrieve a page by its index or name.
pages.index(page) ⇒ Integer
The position of the pages.
pages.add(name = nil) ⇒ Layout::Page
Create a new page at the end, with one step of undo. The paper size, margins, and drawing sheet are inherited from the first page; if no pages exist, it takes the first page from the template, or uses the document's default paper size without a drawing sheet. Page numbers are automatically assigned as 1…N.
pages.remove(page) ⇒ Layout::Pages
Remove the page, one step undo. It moves its shared layer objects to the remaining first page, consistent with the interface.
pages.reorder(page, index) ⇒ Layout::Pages
Reorder pages to new positions and perform a single undo step.