|
rigProject 0.1.1
RigKit pack API - rigProject
|
Page board helpers - make CPage entities and pan / zoom the board. More...
#include <algorithm>#include <cmath>#include <entt/entt.hpp>#include <string>#include <vector>#include "ecs/MEcs.h"#include "CAnchor.h"#include "CDrawStyle.h"#include "CGroup.h"#include "CLayer.h"#include "CPage.h"#include "CProject.h"#include "CRectangle.h"#include "CRelationship.h"#include "CTransform.h"Classes | |
| struct | rig::PageNavInput |
| Pointer + view for pollPageNav - same space as CTransform (design). More... | |
Enumerations | |
| enum class | rig::PageLayout { Stack , Single , Spread } |
| Stacked CPage board - include this header and call; no extra system. More... | |
Functions | |
| entt::entity | rig::pageBoard () |
| Board group pages parent to. | |
| entt::entity | rig::currentPage () |
| Page later placeOnPage / sketch shapes parent to, or entt::null. | |
| void | rig::setPage (int index) |
Point later placeOnPage / sketch shapes at page index. | |
| void | rig::placeOnPage (entt::entity child) |
Parent child to currentPage when one exists. | |
| void | rig::pollPageScroll (float wheel, bool uiWantsMouse) |
| Wheel over the canvas - pans Y. | |
| void | rig::pollPageNav (const PageNavInput &in) |
| Pan / zoom / first-fit. | |
| void | rig::clearPages () |
| Destroy board / pages / plates this helper created. | |
| void | rig::resetPages () |
| Forget board state after the app already destroyed the entities. | |
| void | rig::ensureProject (rigkit::MEcs &ecs) |
| Find or create the document CProject and bind it to the page board. | |
| void | rig::adoptPages (rigkit::MEcs &ecs, const std::vector< entt::entity > &sortedPages) |
| Adopt existing document pages onto the page board. | |
| void | rig::pages_detail::armSketchPlacement () |
| First call installs sketch placeOnPage; later calls leave a custom hook. | |
Page board helpers - make CPage entities and pan / zoom the board.
Header-only over rigComponent POD, so an app includes it and calls; there is no page system to register. PDF emit is rigPdfWrite.
|
strong |
Stacked CPage board - include this header and call; no extra system.
First makePage writes a CProject (or reuses one) and a board group. Later pages sit under the last, centered on the board X. Shapes stay page-local; sketch primitives parent to currentPage(). Call placeOnPage after make*. Board CTransform is the view (pan + zoom). PDF emit is rigPdfWrite.
| Enumerator | |
|---|---|
| Stack | Pages sit under each other; pan the board to scroll. |
| Single | Only the active page is visible. |
| Spread | Facing pairs side by side (recto-first: page 0 alone on the right). |
|
inline |
Adopt existing document pages onto the page board.
Resets board state, parents sortedPages to the board, and records them as the current sequence. Does not change PageLayout.
|
inline |
Destroy board / pages / plates this helper created.
Keeps a found CProject.
|
inline |
Board group pages parent to.
Created on first makePage.
|
inline |
Pan / zoom / first-fit.
No-op when in.blocked except for storing the view.
|
inline |
Wheel over the canvas - pans Y.
Prefer pollPageNav for zoom + pan.
|
inline |
Point later placeOnPage / sketch shapes at page index.
Leaves the board view and activePageIndex alone. Out-of-range index is a no-op. focusPage still pans onto a page and updates this too.