Inkscape
Vector Graphics Editor
|
#include <page-manager.h>
Public Member Functions | |
PageManager (SPDocument *document) | |
~PageManager () | |
const std::vector< SPPage * > & | getPages () const |
std::vector< SPPage * > | getPages (const std::string &pages, bool inverse) const |
Get the pages from a set of pages in the given set. | |
std::vector< SPPage * > | getPages (std::set< unsigned int > indexes, bool inverse=false) const |
Get the pages from a set of pages in the given set. | |
void | addPage (SPPage *page) |
Add a page to this manager, called from namedview parent. | |
void | removePage (Inkscape::XML::Node *child) |
Remove a page from this manager, called from namedview parent. | |
void | reorderPage (Inkscape::XML::Node *child) |
Reorder page within the internal list to keep it up to date. | |
SPPage * | getSelected () const |
SPPage * | getPage (int index) const |
Get the page at the given position or return nullptr if out of range. | |
SPPage * | getPageAt (Geom::Point pos) const |
Get a page at a specific starting location. | |
SPPage * | getFirstPage () const |
SPPage * | getLastPage () const |
SPPage * | getViewportPage () const |
Returns the page attached to the viewport, or nullptr if no pages or none of the pages are the viewport page. | |
std::vector< SPPage * > | getPagesFor (SPItem *item, bool contains) const |
Return a list of pages this item is on. | |
SPPage * | getPageFor (SPItem *item, bool contains) const |
Return the first page that contains the given item. | |
Geom::OptRect | getDesktopRect () const |
Returns the total area of all the pages in desktop units. | |
bool | hasPages () const |
int | getPageCount () const |
int | getPageIndex (const SPPage *page) const |
Get page index, returns -1 if the page is not found in this document. | |
int | getSelectedPageIndex () const |
Return the index of the page in the index. | |
Geom::Rect | getSelectedPageRect () const |
Returns the selected page rect, OR the viewbox rect. | |
Geom::Affine | getSelectedPageAffine () const |
Geom::Point | nextPageLocation () const |
Return the location of the next created page. | |
SPPage * | findPageAt (Geom::Point pos) const |
This provides a simple way of selecting a page based on their layering Pages which are entirely contained within another are selected before their larger parents. | |
void | enablePages () |
Enables multi page support by turning the document viewBox into the first page. | |
void | disablePages () |
Disables multi page supply by removing all the page objects. | |
void | pagesChanged () |
Called when the pages vector is updated, either page deleted or page created (but not if the page is modified) | |
bool | selectPage (SPPage *page) |
Set the given page as the selected page. | |
bool | selectPage (SPItem *item, bool contains) |
Select the first page the given sp-item object is within. | |
bool | selectPage (int index) |
bool | selectNextPage () |
bool | selectPrevPage () |
bool | hasNextPage () const |
bool | hasPrevPage () const |
Colors::Color const & | getDefaultBackgroundColor () const |
void | zoomToPage (SPDesktop *desktop, SPPage *page, bool width_only=false) |
Center/zoom on the given page. | |
void | zoomToSelectedPage (SPDesktop *desktop, bool width_only=false) |
void | centerToPage (SPDesktop *desktop, SPPage *page) |
Center without zooming on the given page. | |
void | centerToSelectedPage (SPDesktop *desktop) |
SPPage * | newPage () |
Add a new page of the default size, this will be either the size of the viewBox if no pages exist, or the size of the selected page. | |
SPPage * | newPage (double width, double height) |
Add a new page of the given width and height. | |
SPPage * | newPage (Geom::Rect rect, bool first_page=false) |
Add a new page with the given rectangle. | |
SPPage * | newDesktopPage (Geom::Rect rect, bool first_page=false) |
Create a new page, resizing the rectangle from desktop coordinates. | |
SPPage * | newDocumentPage (Geom::Rect rect, bool first_page=false) |
Create a new page, using document coordinates. | |
void | deletePage (SPPage *page, bool contents=false) |
Delete the given page. | |
void | deletePage (bool contents=false) |
Delete the selected page. | |
void | resizePage (double width, double height) |
void | resizePage (SPPage *page, double width, double height) |
void | scalePages (Geom::Scale const &scale) |
Change page size, margins and bleeds by a set amount. | |
void | rotatePage (int turns) |
Rotate the selected page by the given number of 90 degree rotations. | |
void | changeOrientation () |
Change page orientation, landscape to portrait and back. | |
void | fitToSelection (ObjectSet *selection, bool add_margins=true) |
Resize the page to the given selection. | |
void | fitToRect (Geom::OptRect box, SPPage *page, bool add_margins=false) |
Fit the selected page to the given rectangle. | |
bool | subset (SPAttr key, const gchar *value) |
Manage the page subset of attributes from sp-namedview and store them. | |
bool | setDefaultAttributes (CanvasPage *item) |
Update the canvas item with the default display attributes. | |
bool | showDefaultLabel () const |
std::string | getSizeLabel (SPPage *page=nullptr) |
Return a page's size label, or match via width and height. | |
std::string | getSizeLabel (double width, double height) |
Loop through all page sizes to find a matching one for this width and height. | |
sigc::connection | connectPageSelected (const sigc::slot< void(SPPage *)> &slot) |
sigc::connection | connectPageModified (const sigc::slot< void(SPPage *)> &slot) |
sigc::connection | connectPagesChanged (const sigc::slot< void()> &slot) |
Colors::Color const & | getBackgroundColor () const |
Colors::Color const & | getMarginColor () const |
Colors::Color const & | getBleedColor () const |
Colors::Color const & | getBorderColor () const |
void | movePages (Geom::Affine tr) |
Called when the viewbox is resized. | |
std::vector< SPItem * > | getOverlappingItems (SPDesktop *desktop, SPPage *page, bool hidden=true, bool in_bleed=false, bool in_layers=true) |
Return a list of objects touching this page, or viewbox (of single page document) | |
Static Public Member Functions | |
static bool | move_objects () |
static void | enablePages (SPDocument *document) |
static void | disablePages (SPDocument *document) |
static SPPage * | newPage (SPDocument *document) |
Protected Attributes | |
SVGBool | border_show |
SVGBool | border_on_top |
SVGBool | shadow_show |
SVGBool | checkerboard |
std::string | label_style = "default" |
Private Attributes | |
SPDocument * | _document |
SPPage * | _selected_page = nullptr |
std::vector< SPPage * > | pages |
sigc::signal< void(SPPage *)> | _page_selected_signal |
sigc::signal< void(SPPage *)> | _page_modified_signal |
sigc::signal< void()> | _pages_changed_signal |
sigc::connection | _page_modified_connection |
Colors::Color | background_color |
Colors::Color | margin_color |
Colors::Color | bleed_color |
Colors::Color | border_color |
Friends | |
class | Inkscape::UI::Dialog::DocumentProperties |
Definition at line 36 of file page-manager.h.
Inkscape::PageManager::PageManager | ( | SPDocument * | document | ) |
Definition at line 42 of file page-manager.cpp.
References _document.
Inkscape::PageManager::~PageManager | ( | ) |
Definition at line 55 of file page-manager.cpp.
References _document, _selected_page, and pages.
void Inkscape::PageManager::addPage | ( | SPPage * | page | ) |
Add a page to this manager, called from namedview parent.
Definition at line 65 of file page-manager.cpp.
References _document, page, pages, and pagesChanged().
Referenced by SPNamedView::build(), and SPNamedView::child_added().
Center without zooming on the given page.
Definition at line 548 of file page-manager.cpp.
References _document, desktop, page, SPDocument::preferredBounds(), and SPDesktop::set_display_center().
Referenced by centerToSelectedPage().
|
inline |
Definition at line 87 of file page-manager.h.
References _selected_page, centerToPage(), and desktop.
Referenced by canvas_transform().
void Inkscape::PageManager::changeOrientation | ( | ) |
Change page orientation, landscape to portrait and back.
Definition at line 611 of file page-manager.cpp.
References getSelectedPageRect(), and resizePage().
Referenced by Inkscape::UI::Toolbar::PageToolbar::PageToolbar().
|
inline |
Definition at line 118 of file page-manager.h.
References _page_modified_signal.
Referenced by SPGrid::build().
|
inline |
Definition at line 122 of file page-manager.h.
References _pages_changed_signal.
Referenced by Inkscape::UI::Toolbar::PageToolbar::setDesktop(), Inkscape::UI::Dialog::BatchExport::setDocument(), and Inkscape::UI::Widget::PageSelector::setDocument().
|
inline |
Definition at line 114 of file page-manager.h.
References _page_selected_signal.
Referenced by SPGrid::build(), Inkscape::UI::Tools::PagesTool::connectDocument(), and Inkscape::UI::Dialog::SingleExport::setDocument().
void Inkscape::PageManager::deletePage | ( | bool | content = false | ) |
Delete the selected page.
content | - Also remove the svg objects that are inside the page. |
Definition at line 279 of file page-manager.cpp.
References _selected_page, and deletePage().
void Inkscape::PageManager::deletePage | ( | SPPage * | page, |
bool | content = false |
||
) |
Delete the given page.
page | - The page to be deleted. |
content | - Also remove the svg objects that are inside the page. |
Definition at line 233 of file page-manager.cpp.
References _document, deletePage(), SPDocument::fitToRect(), getDesktopRect(), getFirstPage(), getPageCount(), getPagesFor(), item, and page.
Referenced by deletePage(), deletePage(), disablePages(), Inkscape::UI::Dialog::Export::exportVector(), and page_delete().
void Inkscape::PageManager::disablePages | ( | ) |
Disables multi page supply by removing all the page objects.
Definition at line 287 of file page-manager.cpp.
References deletePage(), getLastPage(), and hasPages().
Referenced by disablePages(), and Inkscape::UI::Dialog::Export::exportVector().
|
inlinestatic |
Definition at line 111 of file page-manager.h.
References disablePages(), and SPDocument::getPageManager().
void Inkscape::PageManager::enablePages | ( | ) |
Enables multi page support by turning the document viewBox into the first page.
Definition at line 137 of file page-manager.cpp.
References _document, _selected_page, hasPages(), newDocumentPage(), and SPDocument::preferredBounds().
Referenced by Inkscape::UI::Toolbar::PageToolbar::bleedsEdited(), enablePages(), Inkscape::UI::Dialog::Export::exportVector(), Inkscape::UI::Tools::PagesTool::marginKnotMoved(), Inkscape::UI::Toolbar::PageToolbar::marginsEdited(), Inkscape::UI::Toolbar::PageToolbar::marginSideEdited(), newPage(), newPage(), and Inkscape::Extension::Internal::PdfOutput::save().
|
inlinestatic |
Definition at line 110 of file page-manager.h.
References enablePages(), and SPDocument::getPageManager().
SPPage * Inkscape::PageManager::findPageAt | ( | Geom::Point | pos | ) | const |
This provides a simple way of selecting a page based on their layering Pages which are entirely contained within another are selected before their larger parents.
Definition at line 484 of file page-manager.cpp.
References Geom::GenericRect< C >::contains(), getPages(), SPPage::getSensitiveRect(), and page.
void Inkscape::PageManager::fitToRect | ( | Geom::OptRect | box, |
SPPage * | page, | ||
bool | add_margins = false |
||
) |
Fit the selected page to the given rectangle.
Definition at line 648 of file page-manager.cpp.
References _document, SPDocument::fitToRect(), and page.
Referenced by fitToSelection(), and rotatePage().
void Inkscape::PageManager::fitToSelection | ( | ObjectSet * | selection, |
bool | add_margins = true |
||
) |
Resize the page to the given selection.
If nothing is selected, Resize to all the items on the selected page.
Definition at line 621 of file page-manager.cpp.
References _document, _selected_page, Inkscape::ObjectSet::desktop(), desktop, Inkscape::ObjectSet::documentPreferredBounds(), SPItem::documentPreferredBounds(), fitToRect(), fitToSelection(), getOverlappingItems(), SPDocument::getRoot(), and Inkscape::ObjectSet::isEmpty().
Referenced by fitToSelection(), and page_fit_to_selection().
|
inline |
Definition at line 127 of file page-manager.h.
References background_color.
Referenced by setDefaultAttributes().
|
inline |
Definition at line 129 of file page-manager.h.
References bleed_color.
Referenced by setDefaultAttributes().
|
inline |
Definition at line 130 of file page-manager.h.
References border_color.
Referenced by setDefaultAttributes().
|
inline |
Definition at line 81 of file page-manager.h.
References background_color.
Referenced by Inkscape::UI::Tools::DropperTool::root_handler(), and Inkscape::UI::Dialog::sp_icon_doc_icon().
Geom::OptRect Inkscape::PageManager::getDesktopRect | ( | ) | const |
Returns the total area of all the pages in desktop units.
Definition at line 517 of file page-manager.cpp.
References page, pages, and Geom::GenericOptRect< C >::unionWith().
Referenced by deletePage(), and Inkscape::UI::Dialog::Print::setup_page().
|
inline |
Definition at line 55 of file page-manager.h.
References getPage().
Referenced by deletePage(), Inkscape::UI::Dialog::Export::exportVector(), and removePage().
|
inline |
Definition at line 56 of file page-manager.h.
References getPage(), and pages.
Referenced by disablePages().
|
inline |
Definition at line 128 of file page-manager.h.
References margin_color.
Referenced by setDefaultAttributes().
std::vector< SPItem * > Inkscape::PageManager::getOverlappingItems | ( | SPDesktop * | desktop, |
SPPage * | page, | ||
bool | hidden = true , |
||
bool | in_bleed = false , |
||
bool | in_layers = true |
||
) |
Return a list of objects touching this page, or viewbox (of single page document)
Definition at line 670 of file page-manager.cpp.
References _document, desktop, SPDesktop::dkey, SPDocument::getItemsPartiallyInBox(), page, and SPDocument::preferredBounds().
Referenced by fitToSelection().
SPPage * Inkscape::PageManager::getPage | ( | int | index | ) | const |
Get the page at the given position or return nullptr if out of range.
index | - The page index (from 0) of the page. |
Definition at line 399 of file page-manager.cpp.
Referenced by Inkscape::UI::Dialog::Print::draw_page(), getFirstPage(), getLastPage(), and selectPage().
SPPage * Inkscape::PageManager::getPageAt | ( | Geom::Point | pos | ) | const |
Get a page at a specific starting location.
Definition at line 469 of file page-manager.cpp.
Referenced by SPNamedView::updateViewPort().
|
inline |
Definition at line 62 of file page-manager.h.
References pages.
Referenced by deletePage(), getPages(), and Inkscape::UI::Dialog::SingleExport::refreshPage().
Return the first page that contains the given item.
Definition at line 457 of file page-manager.cpp.
References item, page, and pages.
Referenced by Inkscape::Extension::Internal::PdfBuilder::Document::get_anchors_for_page().
int Inkscape::PageManager::getPageIndex | ( | const SPPage * | page | ) | const |
Get page index, returns -1 if the page is not found in this document.
Definition at line 298 of file page-manager.cpp.
Referenced by SPPage::getPageIndex(), getSelectedPageIndex(), and selectPage().
|
inline |
Definition at line 43 of file page-manager.h.
References pages.
Referenced by findPageAt(), getPages(), SPNamedView::hide(), Inkscape::UI::Dialog::BatchExport::refreshItems(), Inkscape::Extension::Internal::CairoRenderer::renderPages(), SPNamedView::show(), and SPNamedView::temporarily_show_guides().
std::vector< SPPage * > Inkscape::PageManager::getPages | ( | const std::string & | pages, |
bool | inverse | ||
) | const |
Get the pages from a set of pages in the given set.
pages | - A set of page positions in the format "1,2-3...etc" |
inverse | - Reverse the selection, selecting pages not in page_pos. |
Definition at line 415 of file page-manager.cpp.
References getPageCount(), getPages(), pages, and Inkscape::parseIntRange().
std::vector< SPPage * > Inkscape::PageManager::getPages | ( | std::set< unsigned int > | page_pos, |
bool | inverse = false |
||
) | const |
Get the pages from a set of pages in the given set.
page_pos | - A set of page positions indexed from 1. |
inverse | - Reverse the selection, selecting pages not in page_pos. |
Definition at line 428 of file page-manager.cpp.
Return a list of pages this item is on.
Definition at line 443 of file page-manager.cpp.
References item, page, and pages.
Referenced by deletePage(), and selectPage().
|
inline |
Definition at line 52 of file page-manager.h.
References _selected_page.
Referenced by Inkscape::UI::Toolbar::PageToolbar::labelEdited(), Inkscape::UI::Toolbar::PageToolbar::pagesChanged(), Inkscape::UI::Toolbar::PageToolbar::PageToolbar(), Inkscape::UI::Tools::PagesTool::resizeKnotFinished(), Inkscape::UI::Tools::PagesTool::resizeKnotMoved(), Inkscape::UI::Toolbar::PageToolbar::setSizeText(), and sp_import_document().
Geom::Affine Inkscape::PageManager::getSelectedPageAffine | ( | ) | const |
Definition at line 326 of file page-manager.cpp.
References _selected_page, SPPage::getDesktopAffine(), and Geom::identity().
Referenced by Inkscape::UI::Dialog::GuidelinePropertiesDialog::_modeChanged(), SPGrid::getEffectiveOriginAndSpacing(), and Inkscape::UI::Tools::MeasureTool::showInfoBox().
int Inkscape::PageManager::getSelectedPageIndex | ( | ) | const |
Return the index of the page in the index.
Definition at line 313 of file page-manager.cpp.
References _selected_page, and getPageIndex().
Referenced by hasNextPage(), hasPrevPage(), pagesChanged(), selectNextPage(), and selectPrevPage().
Geom::Rect Inkscape::PageManager::getSelectedPageRect | ( | ) | const |
Returns the selected page rect, OR the viewbox rect.
Definition at line 321 of file page-manager.cpp.
References _document, _selected_page, SPPage::getDesktopRect(), and SPDocument::preferredBounds().
Referenced by Inkscape::UI::Toolbar::SelectToolbar::any_value_changed(), changeOrientation(), Inkscape::UI::Toolbar::SelectToolbar::layout_widget_update(), Inkscape::UI::Dialog::SingleExport::refreshArea(), rotatePage(), Inkscape::UI::Toolbar::PageToolbar::sizeChoose(), sp_guide_create_guides_around_page(), and Inkscape::UI::Toolbar::NodeToolbar::value_changed().
std::string Inkscape::PageManager::getSizeLabel | ( | double | width, |
double | height | ||
) |
Loop through all page sizes to find a matching one for this width and height.
width | - The X axis size in pixels |
height | - The Y axis size in pixels |
Definition at line 775 of file page-manager.cpp.
References _document, Inkscape::Util::UnitTable::get(), Inkscape::Extension::Template::get_any_preset(), SPDocument::getDisplayUnit(), Inkscape::Util::UnitTable::getUnit(), height, and width.
std::string Inkscape::PageManager::getSizeLabel | ( | SPPage * | page = nullptr | ) |
Return a page's size label, or match via width and height.
Definition at line 757 of file page-manager.cpp.
References _document, getSizeLabel(), label, page, and SPDocument::preferredBounds().
Referenced by getSizeLabel(), and Inkscape::UI::Toolbar::PageToolbar::setSizeText().
SPPage * Inkscape::PageManager::getViewportPage | ( | ) | const |
Returns the page attached to the viewport, or nullptr if no pages or none of the pages are the viewport page.
Definition at line 504 of file page-manager.cpp.
|
inline |
Definition at line 78 of file page-manager.h.
References getSelectedPageIndex(), and pages.
Referenced by Inkscape::UI::Widget::PageSelector::selectonChanged().
|
inline |
Definition at line 61 of file page-manager.h.
References pages.
Referenced by disablePages(), enablePages(), newPage(), Inkscape::UI::Dialog::BatchExport::pagesChanged(), Inkscape::UI::Tools::PagesTool::PagesTool(), removePage(), and Inkscape::UI::Dialog::BatchExport::setDefaultSelectionMode().
|
inline |
Definition at line 79 of file page-manager.h.
References getSelectedPageIndex().
Referenced by Inkscape::UI::Widget::PageSelector::selectonChanged().
|
static |
Definition at line 36 of file page-manager.cpp.
References Inkscape::Preferences::get(), and Inkscape::Preferences::getBool().
Referenced by page_delete().
void Inkscape::PageManager::movePages | ( | Geom::Affine | tr | ) |
Called when the viewbox is resized.
Definition at line 794 of file page-manager.cpp.
SPPage * Inkscape::PageManager::newDesktopPage | ( | Geom::Rect | rect, |
bool | first_page = false |
||
) |
Create a new page, resizing the rectangle from desktop coordinates.
Definition at line 213 of file page-manager.cpp.
References _document, SPDocument::dt2doc(), and newDocumentPage().
SPPage * Inkscape::PageManager::newDocumentPage | ( | Geom::Rect | rect, |
bool | first_page = false |
||
) |
Create a new page, using document coordinates.
Definition at line 222 of file page-manager.cpp.
References _document, SPDocument::getDocumentScale(), Geom::Scale::inverse(), and newPage().
Referenced by enablePages(), and newDesktopPage().
SPPage * Inkscape::PageManager::newPage | ( | ) |
Add a new page of the default size, this will be either the size of the viewBox if no pages exist, or the size of the selected page.
Definition at line 149 of file page-manager.cpp.
References _selected_page, enablePages(), SPPage::getRect(), and newPage().
Referenced by newDocumentPage(), newPage(), newPage(), newPage(), and page_new().
SPPage * Inkscape::PageManager::newPage | ( | double | width, |
double | height | ||
) |
Add a new page of the given width and height.
Definition at line 161 of file page-manager.cpp.
References Geom::GenericRect< Coord >::from_xywh(), height, newPage(), nextPageLocation(), and width.
SPPage * Inkscape::PageManager::newPage | ( | Geom::Rect | rect, |
bool | first_page = false |
||
) |
Add a new page with the given rectangle.
Definition at line 187 of file page-manager.cpp.
References _document, Inkscape::XML::Document::createElement(), enablePages(), SPDocument::getNamedView(), SPDocument::getReprDoc(), hasPages(), Geom::GenericRect< C >::height(), Geom::GenericRect< C >::left(), page, Inkscape::GC::release(), Inkscape::XML::Node::setAttributeSvgDouble(), Geom::GenericRect< C >::top(), and Geom::GenericRect< C >::width().
|
inlinestatic |
Definition at line 112 of file page-manager.h.
References SPDocument::getPageManager(), and newPage().
Geom::Point Inkscape::PageManager::nextPageLocation | ( | ) | const |
Return the location of the next created page.
Definition at line 170 of file page-manager.cpp.
Referenced by newPage().
void Inkscape::PageManager::pagesChanged | ( | ) |
Called when the pages vector is updated, either page deleted or page created (but not if the page is modified)
Definition at line 335 of file page-manager.cpp.
References _pages_changed_signal, _selected_page, getSelectedPageIndex(), page, pages, and selectPage().
Referenced by addPage(), removePage(), and reorderPage().
void Inkscape::PageManager::removePage | ( | Inkscape::XML::Node * | child | ) |
Remove a page from this manager, called from namedview parent.
Definition at line 90 of file page-manager.cpp.
References _document, _selected_page, child, SPDocument::fitToRect(), SPPage::getDesktopRect(), getFirstPage(), hasPages(), page, pages, pagesChanged(), and selectPage().
Referenced by SPNamedView::remove_child().
void Inkscape::PageManager::reorderPage | ( | Inkscape::XML::Node * | child | ) |
Reorder page within the internal list to keep it up to date.
Definition at line 121 of file page-manager.cpp.
References _document, child, SPDocument::getNamedView(), page, pages, and pagesChanged().
Referenced by SPNamedView::order_changed().
void Inkscape::PageManager::resizePage | ( | double | width, |
double | height | ||
) |
Definition at line 568 of file page-manager.cpp.
References _selected_page, height, resizePage(), and width.
Referenced by changeOrientation(), Inkscape::Extension::Internal::TemplateBase::resize_to_template(), resizePage(), and Inkscape::UI::Toolbar::PageToolbar::sizeChanged().
void Inkscape::PageManager::resizePage | ( | SPPage * | page, |
double | width, | ||
double | height | ||
) |
Definition at line 573 of file page-manager.cpp.
References _document, SPDocument::fitToRect(), height, page, pages, and width.
void Inkscape::PageManager::rotatePage | ( | int | turns | ) |
Rotate the selected page by the given number of 90 degree rotations.
Definition at line 589 of file page-manager.cpp.
References _document, _selected_page, fitToRect(), Geom::Rotate::from_degrees(), SPPage::getOverlappingItems(), SPDocument::getRoot(), getSelectedPageRect(), Geom::Translate::inverse(), SPGroup::item_list(), Geom::GenericRect< C >::max(), Geom::GenericRect< C >::midpoint(), and Geom::GenericRect< C >::min().
Referenced by page_rotate().
void Inkscape::PageManager::scalePages | ( | Geom::Scale const & | scale | ) |
Change page size, margins and bleeds by a set amount.
Definition at line 557 of file page-manager.cpp.
References page, pages, and scale.
Referenced by Inkscape::UI::Dialog::DocumentProperties::set_content_scale().
|
inline |
Definition at line 76 of file page-manager.h.
References getSelectedPageIndex(), and selectPage().
Referenced by Inkscape::UI::Widget::PageSelector::nextPage().
|
inline |
Definition at line 75 of file page-manager.h.
References getPage(), index, and selectPage().
Referenced by selectPage().
bool Inkscape::PageManager::selectPage | ( | SPItem * | item, |
bool | contains | ||
) |
Select the first page the given sp-item object is within.
If the item is between two pages and one of them is already selected then don't change the selection.
Definition at line 383 of file page-manager.cpp.
References _selected_page, getPagesFor(), item, SPPage::itemOnPage(), page, and selectPage().
bool Inkscape::PageManager::selectPage | ( | SPPage * | page | ) |
Set the given page as the selected page.
page | - The page to set as the selected page. |
Definition at line 356 of file page-manager.cpp.
References _page_modified_connection, _page_modified_signal, _page_selected_signal, _selected_page, SPObject::connectModified(), getPageIndex(), and page.
Referenced by Inkscape::Selection::_emitChanged(), Inkscape::Selection::_emitModified(), Inkscape::UI::Dialog::DocumentProperties::build_page(), page_new(), pagesChanged(), removePage(), selectNextPage(), selectPage(), selectPrevPage(), and Inkscape::UI::Widget::PageSelector::setSelectedPage().
|
inline |
Definition at line 77 of file page-manager.h.
References getSelectedPageIndex(), and selectPage().
Referenced by Inkscape::UI::Widget::PageSelector::prevPage().
bool Inkscape::PageManager::setDefaultAttributes | ( | Inkscape::CanvasPage * | item | ) |
Update the canvas item with the default display attributes.
Definition at line 726 of file page-manager.cpp.
References _document, border_on_top, border_show, checkerboard, getBackgroundColor(), getBleedColor(), getBorderColor(), SPNamedView::getDeskColor(), getMarginColor(), SPDocument::getNamedView(), item, label_style, and shadow_show.
Referenced by SPNamedView::modified(), SPNamedView::set_desk_color(), SPPage::setDefaultAttributes(), and SPNamedView::show().
|
inline |
Definition at line 106 of file page-manager.h.
References label_style.
Referenced by SPPage::update().
bool Inkscape::PageManager::subset | ( | SPAttr | key, |
const gchar * | value | ||
) |
Manage the page subset of attributes from sp-namedview and store them.
Definition at line 682 of file page-manager.cpp.
References _document, background_color, border_color, border_on_top, border_show, BORDERCOLOR, BORDERLAYER, BORDEROPACITY, checkerboard, Inkscape::default_background_color, Inkscape::default_border_color, SPDocument::getActionGroup(), Inkscape::Colors::Color::getOpacity(), INKSCAPE_DESK_CHECKERBOARD, key, label_style, PAGECOLOR, PAGELABELSTYLE, SVGBool::readOrUnset(), Inkscape::Colors::Color::setOpacity(), shadow_show, SHOWBORDER, and SHOWPAGESHADOW.
Referenced by SPNamedView::set().
void Inkscape::PageManager::zoomToPage | ( | SPDesktop * | desktop, |
SPPage * | page, | ||
bool | width_only = false |
||
) |
Center/zoom on the given page.
Definition at line 533 of file page-manager.cpp.
References _document, desktop, Geom::GenericRect< C >::minExtent(), page, SPDocument::preferredBounds(), SPDesktop::set_display_area(), and SPDesktop::set_display_width().
Referenced by zoomToSelectedPage().
|
inline |
Definition at line 85 of file page-manager.h.
References _selected_page, desktop, and zoomToPage().
Referenced by canvas_transform(), Inkscape::UI::Widget::PageSelector::nextPage(), Inkscape::UI::Widget::PageSelector::prevPage(), and Inkscape::UI::Widget::PageSelector::setSelectedPage().
|
friend |
Definition at line 136 of file page-manager.h.
|
private |
Definition at line 147 of file page-manager.h.
Referenced by addPage(), centerToPage(), deletePage(), enablePages(), fitToRect(), fitToSelection(), getOverlappingItems(), getSelectedPageRect(), getSizeLabel(), getSizeLabel(), newDesktopPage(), newDocumentPage(), newPage(), PageManager(), removePage(), reorderPage(), resizePage(), rotatePage(), setDefaultAttributes(), subset(), zoomToPage(), and ~PageManager().
|
private |
Definition at line 155 of file page-manager.h.
Referenced by selectPage().
|
private |
Definition at line 152 of file page-manager.h.
Referenced by connectPageModified(), and selectPage().
|
private |
Definition at line 151 of file page-manager.h.
Referenced by connectPageSelected(), and selectPage().
|
private |
Definition at line 153 of file page-manager.h.
Referenced by connectPagesChanged(), and pagesChanged().
|
private |
Definition at line 148 of file page-manager.h.
Referenced by centerToSelectedPage(), deletePage(), enablePages(), fitToSelection(), getSelected(), getSelectedPageAffine(), getSelectedPageIndex(), getSelectedPageRect(), newPage(), pagesChanged(), removePage(), resizePage(), rotatePage(), selectPage(), selectPage(), zoomToSelectedPage(), and ~PageManager().
|
private |
Definition at line 157 of file page-manager.h.
Referenced by getBackgroundColor(), getDefaultBackgroundColor(), and subset().
|
private |
Definition at line 159 of file page-manager.h.
Referenced by getBleedColor().
|
private |
Definition at line 160 of file page-manager.h.
Referenced by getBorderColor(), and subset().
|
protected |
Definition at line 140 of file page-manager.h.
Referenced by setDefaultAttributes(), and subset().
|
protected |
Definition at line 139 of file page-manager.h.
Referenced by setDefaultAttributes(), and subset().
|
protected |
Definition at line 142 of file page-manager.h.
Referenced by setDefaultAttributes(), and subset().
|
protected |
Definition at line 144 of file page-manager.h.
Referenced by setDefaultAttributes(), showDefaultLabel(), and subset().
|
private |
Definition at line 158 of file page-manager.h.
Referenced by getMarginColor().
|
private |
Definition at line 149 of file page-manager.h.
Referenced by addPage(), getDesktopRect(), getLastPage(), getPage(), getPageAt(), getPageCount(), getPageFor(), getPageIndex(), getPages(), getPages(), getPages(), getPagesFor(), getViewportPage(), hasNextPage(), hasPages(), movePages(), nextPageLocation(), pagesChanged(), removePage(), reorderPage(), resizePage(), scalePages(), and ~PageManager().
|
protected |
Definition at line 141 of file page-manager.h.
Referenced by setDefaultAttributes(), and subset().