10#ifndef SEEN_INKSCAPE_PAGE_MANAGER_H
11#define SEEN_INKSCAPE_PAGE_MANAGER_H
29class DocumentProperties;
44 std::vector<SPPage *>
getPages(
const std::string &
pages,
bool inverse)
const;
45 std::vector<SPPage *>
getPages(std::set<unsigned int> indexes,
bool inverse =
false)
const;
3x3 matrix representing an affine transformation.
Axis-aligned rectangle that can be empty.
Two-dimensional point that doubles as a vector.
Axis aligned, non-empty rectangle.
sigc::connection connectPagesChanged(const sigc::slot< void()> &slot)
static void enablePages(SPDocument *document)
Colors::Color const & getMarginColor() const
bool setDefaultAttributes(CanvasPage *item)
Update the canvas item with the default display attributes.
void disablePages()
Disables multi page supply by removing all the page objects.
void changeOrientation()
Change page orientation, landscape to portrait and back.
Geom::Affine getSelectedPageAffine() const
sigc::signal< void(SPPage *)> _page_selected_signal
void centerToPage(SPDesktop *desktop, SPPage *page)
Center without zooming on the given page.
Colors::Color const & getBorderColor() const
SPPage * getFirstPage() const
void scalePages(Geom::Scale const &scale)
Change page size, margins and bleeds by a set amount.
std::vector< SPPage * > getPagesFor(SPItem *item, bool contains) const
Return a list of pages this item is on.
void zoomToSelectedPage(SPDesktop *desktop, bool width_only=false)
sigc::connection connectPageSelected(const sigc::slot< void(SPPage *)> &slot)
sigc::signal< void()> _pages_changed_signal
void enablePages()
Enables multi page support by turning the document viewBox into the first page.
Colors::Color border_color
void zoomToPage(SPDesktop *desktop, SPPage *page, bool width_only=false)
Center/zoom on the given page.
SPPage * getLastPage() const
void fitToSelection(ObjectSet *selection, bool add_margins=true)
Resize the page to the given selection.
SPPage * findPageAt(Geom::Point pos) const
This provides a simple way of selecting a page based on their layering Pages which are entirely conta...
SPPage * getPageFor(SPItem *item, bool contains) const
Return the first page that contains the given item.
SPPage * newPage()
Add a new page of the default size, this will be either the size of the viewBox if no pages exist,...
void reorderPage(Inkscape::XML::Node *child)
Reorder page within the internal list to keep it up to date.
bool selectPage(int index)
Colors::Color background_color
void addPage(SPPage *page)
Add a page to this manager, called from namedview parent.
bool subset(SPAttr key, const gchar *value)
Manage the page subset of attributes from sp-namedview and store them.
std::string getSizeLabel(SPPage *page=nullptr)
Return a page's size label, or match via width and height.
sigc::signal< void(SPPage *)> _page_modified_signal
const std::vector< SPPage * > & getPages() const
void centerToSelectedPage(SPDesktop *desktop)
Colors::Color const & getBleedColor() const
bool selectPage(SPPage *page)
Set the given page as the selected page.
SPPage * getPage(int index) const
Get the page at the given position or return nullptr if out of range.
Geom::Rect getSelectedPageRect() const
Returns the selected page rect, OR the viewbox rect.
static void disablePages(SPDocument *document)
SPPage * getSelected() const
SPPage * getPageAt(Geom::Point pos) const
Get a page at a specific starting location.
Geom::Point nextPageLocation() const
Return the location of the next created page.
int getSelectedPageIndex() const
Return the index of the page in the index.
void movePages(Geom::Affine tr)
Called when the viewbox is resized.
void deletePage(SPPage *page, bool contents=false)
Delete the given page.
Colors::Color const & getBackgroundColor() const
SPPage * newDesktopPage(Geom::Rect rect, bool first_page=false)
Create a new page, resizing the rectangle from desktop coordinates.
bool showDefaultLabel() const
Colors::Color margin_color
SPPage * getViewportPage() const
Returns the page attached to the viewport, or nullptr if no pages or none of the pages are the viewpo...
void fitToRect(Geom::OptRect box, SPPage *page, bool add_margins=false)
Fit the selected page to the given rectangle.
void rotatePage(int turns)
Rotate the selected page by the given number of 90 degree rotations.
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)
sigc::connection _page_modified_connection
static bool move_objects()
void removePage(Inkscape::XML::Node *child)
Remove a page from this manager, called from namedview parent.
void pagesChanged()
Called when the pages vector is updated, either page deleted or page created (but not if the page is ...
Colors::Color const & getDefaultBackgroundColor() const
int getPageIndex(const SPPage *page) const
Get page index, returns -1 if the page is not found in this document.
void resizePage(double width, double height)
Colors::Color bleed_color
std::vector< SPPage * > pages
Geom::OptRect getDesktopRect() const
Returns the total area of all the pages in desktop units.
SPPage * newDocumentPage(Geom::Rect rect, bool first_page=false)
Create a new page, using document coordinates.
sigc::connection connectPageModified(const sigc::slot< void(SPPage *)> &slot)
static SPPage * newPage(SPDocument *document)
Interface for refcounted XML nodes.
To do: update description of desktop.
Typed SVG document implementation.
Inkscape::PageManager & getPageManager()
Base class for visual SVG elements.
Helper class to stream background task notifications as a series of messages.
static cairo_user_data_key_t key