Public Member Functions |
| | Page () |
| void | saveAsXml (Stream &stream) const |
| void | saveAsIpePage (Stream &stream) const |
| void | saveSelection (Stream &stream) const |
| int | countLayers () const |
| String | layer (int index) const |
| bool | isLocked (int i) const |
| bool | hasSnapping (int i) const |
| void | setLocked (int i, bool flag) |
| void | setSnapping (int i, bool flag) |
| void | moveLayer (int index, int newIndex) |
| int | findLayer (String name) const |
| void | addLayer (String name) |
| void | addLayer () |
| void | removeLayer (String name) |
| void | renameLayer (String oldName, String newName) |
| int | countViews () const |
| int | countMarkedViews () const |
| Attribute | effect (int index) const |
| void | setEffect (int index, Attribute sym) |
| String | active (int index) const |
| void | setActive (int index, String name) |
| bool | markedView (int index) const |
| void | setMarkedView (int index, bool marked) |
| void | insertView (int i, String active) |
| void | removeView (int i) |
| void | clearViews () |
| bool | visible (int view, int layer) const |
| bool | objectVisible (int view, int objno) const |
| void | setVisible (int view, String layer, bool vis) |
| Rect | textBox (const Cascade *sheet) const |
| String | title () const |
| void | setTitle (String title) |
| String | section (int level) const |
| void | setSection (int level, bool useTitle, String name) |
| bool | sectionUsesTitle (int level) const |
| const Text * | titleText () const |
| void | applyTitleStyle (const Cascade *sheet) |
| bool | marked () const |
| void | setMarked (bool marked) |
| String | notes () const |
| void | setNotes (String notes) |
| int | count () const |
| Object * | object (int i) |
| const Object * | object (int i) const |
| TSelect | select (int i) const |
| int | layerOf (int i) const |
| void | setSelect (int i, TSelect sel) |
| void | setLayerOf (int i, int layer) |
| Rect | pageBBox (const Cascade *sheet) const |
| Rect | viewBBox (const Cascade *sheet, int view) const |
| Rect | bbox (int i) const |
| void | transform (int i, const Matrix &m) |
| double | distance (int i, const Vector &v, double bound) const |
| void | snapVtx (int i, const Vector &mouse, Vector &pos, double &bound) const |
| void | snapBnd (int i, const Vector &mouse, Vector &pos, double &bound) const |
| void | invalidateBBox (int i) const |
| void | insert (int i, TSelect sel, int layer, Object *obj) |
| void | append (TSelect sel, int layer, Object *obj) |
| void | remove (int i) |
| void | replace (int i, Object *obj) |
| bool | setAttribute (int i, Property prop, Attribute value, Attribute stroke, Attribute fill) |
| int | primarySelection () const |
| bool | hasSelection () const |
| void | deselectAll () |
| void | ensurePrimarySelection () |
An Ipe document page.
Its main ingredients are a sequence of Objects (with selection state, layer, and a cached bounding box), a set of Layers, and a sequence of Views.
Each object on a Page belongs to one of the layers of the page. Layers are orthogonal to the back-to-front ordering of objects (in particular, they are not "layered" - the word is a misnomer). The "layer" is really just another attribute of the object.
- Layers are either editable or locked. Objects in a locked layer cannot be selected, and a locked layer cannot be made active in the UI. This more or less means that the contents of such a layer cannot be modified—but that's a consequence of the UI, Ipelib contains no special handling of locked layers.
- A layer may have snapping on or off—objects will behave magnetically only if their layer has snapping on.
A Page is presented in a number of views. Each view presents some of the layers of the page. In addition, each view has an active layer (where objects are added when this view is shown in the UI), and possibly a transition effect (Acrobat Reader eye candy).
A Page can be copied and assigned. The operation takes time linear in the number of top-level object on the page.