Main Page | Modules | Class Hierarchy | Class List | Directories | Class Members

IpePage Class Reference
[Ipe Document]

An Ipe document page. More...

List of all members.

Public Member Functions


Detailed Description

An Ipe document page.

Its main ingredients are a sequence of IpePgObjects, a list of IpeLayers, and a list of IpeViews.

If you need to keep track of whether a document has been modified, you have to call SetEdited(true) whenever you modify an IpePgObject.

The functions to modify the layer sequence and the views set the edited flag themselves.


Constructor & Destructor Documentation

IpePage::IpePage  )  [explicit]
 

The default constructor creates a new empty page.

This page still needs a layer and a view to be usable!


Member Function Documentation

void IpePage::SaveAsXml IpePainter painter,
IpeStream stream
const
 

Save page in XML format.

int IpePage::CountLayers  )  const [inline]
 

Return number of layers.

const IpeLayer& IpePage::Layer int  index  )  const [inline]
 

Return a layer.

IpeLayer& IpePage::Layer int  index  )  [inline]
 

Return a layer.

int IpePage::FindLayer IpeString  name  )  const
 

Find layer with given name.

Returns -1 if not found.

int IpePage::AddLayer const IpeLayer layer,
int  index = -1
 

Add a new layer at index (at the end if index is negative).

Returns index of new layer, and sets edited flag. Layer numbers of all objects on page are adjusted if necessary.

int IpePage::NewLayer int  index  ) 
 

Create a new layer with unique name.

The layer is inserted at index index, or appended if index is negative. Returns index of new layer.

void IpePage::DeleteLayer int  index  ) 
 

Deletes an empty layer from the page.

All objects are adjusted. Panics if there are objects in the deleted layer, of if it is the only layer. The layer is also removed from all views.

bool IpePage::IsLayerActiveInView int  index  )  const
 

Does a view exist where this layer is active?

const IpeViewSeq& IpePage::Views  )  const [inline]
 

Return presentation sequence of this page.

int IpePage::CountViews  )  const [inline]
 

Return number of views.

const IpeView& IpePage::View int  index  )  const [inline]
 

Return a view.

IpeView& IpePage::View int  index  )  [inline]
 

Return a view.

void IpePage::SetView int  index,
const IpeView view
 

Sets one view of the page.

This sets the edited flag.

void IpePage::AddView const IpeView view,
int  index = -1
 

Add a view at position index.

The view is appended at the end if index is negative.

void IpePage::DeleteView int  index  ) 
 

Delete view at index.

IpeRect IpePage::TextBox const IpeRect media,
const IpeStyleSheet sheet
const
 

Computes text box.

Takes into account media size, margins, and text objects already on the page .

void IpePage::SetEdited bool  edited  ) 
 

Set whether page has been edited.

bool IpePage::IsEdited  )  const [inline]
 

Return true if page has been modified since last save.

void IpePage::SetSection int  level,
IpeString  name
 

Set the section title at level.

Level 0 is the section, level 1 the subsection. This marks the page as edited.

void IpePage::DeselectAll  ) 
 

Deselect all objects.

void IpePage::DeselectLayer int  layer  ) 
 

Deselect all objects in this layer.

void IpePage::DeselectNotInView int  view  ) 
 

Deselect all objects not in a layer of this view, or in a locked layer.

bool IpePage::HasSelection  )  const
 

Returns true iff any object on the page is selected.

IpePage::iterator IpePage::PrimarySelection  ) 
 

Returns the primary selection, or end().

void IpePage::EnsurePrimarySelection  ) 
 

If no object is the primary selection, make the topmost secondary selection the primary one.

void IpePage::ExtractSelection IpePgObjectSeq &  seq  ) 
 

Removes all selected objects from the page.

They are added, in the same order, to seq.

bool IpePage::UpdateCloseSelection const IpeVector pos,
double  d,
bool  primaryOnly,
int  view
 

If no selected object is close, select closest object.

If there is a selected object at distance at most d from pos, return true. Otherwise, check whether the closest object to pos has distance at most d. If so, unselect everything, make this object the primary selection, and return true. If not, return whether the page has a selection at all.

If primaryOnly is true, the primary selection has to be at distance at most d, otherwise it'll be replaced as above.

void IpePage::Copy IpeStream stream,
const IpeStyleSheet sheet
const
 

Copy selected objects into the stream.

bool IpePage::Paste int  layer,
IpeDataSource source,
IpeRepository rep
 

Paste objects from XML source into layer.

Returns false if XML source cannot be parsed.

void IpePage::CopyPage IpeStream stream,
const IpeStyleSheet sheet
const
 

Copy whole page into the stream.

void IpePage::MakeLayerTable std::vector< bool > &  layers,
int  view,
bool  excludeLocked
const
 

Make a table of layers, indicating whether visible (and unlocked).

Must be called with an empty layers vector.

void IpePage::MoveToLayer int  layer  ) 
 

Move selected objects to indicated layer.

void IpePage::Delete  ) 
 

Delete currently selected objects.

void IpePage::SelectAll int  view  ) 
 

Select all objects visible and not locked in the view.

void IpePage::SelectAllInLayer int  layer  ) 
 

Select all objects in the given layer.

void IpePage::Group int  layer  ) 
 

Group the selected objects together as a new group object.

The new object is placed in layer.

bool IpePage::Ungroup int  layer  ) 
 

Ungroup the primary selection, place objects in layer.

Panics if no primary selection, returns false if primary selection is not a group.

void IpePage::Front  ) 
 

Move selected objects to front.

void IpePage::Back  ) 
 

Move selected objects to back.

void IpePage::forward  ) 
 

Move selected objects one step forward.

void IpePage::backward  ) 
 

Move selected objects one step backward.

void IpePage::movePrimaryBeforeSecondary  ) 
 

Moves the primary selection just before the highest secondary.

void IpePage::movePrimaryBehindSecondary  ) 
 

Moves the primary selection just behind the lowest secondary.

void IpePage::Duplicate int  layer  ) 
 

Duplicate the selected objects into layer.

void IpePage::SetStroke IpeAttribute  color  ) 
 

Set stroke color of selected objects.

void IpePage::SetFill IpeAttribute  color  ) 
 

Set fill color of selected objects.

void IpePage::SetLineWidth IpeAttribute  attr  ) 
 

Set line width of selected objects.

void IpePage::SetDashStyle IpeAttribute  attr  ) 
 

Set line style of selected objects.

void IpePage::SetArrows bool  forward,
bool  backward,
IpeAttribute  size
 

Set arrows of selected objects.

void IpePage::SetArrowSize IpeAttribute  size  ) 
 

Set arrow size of selected objects.

void IpePage::SetMarkShape int  shape  ) 
 

Set mark shape of selected objects.

void IpePage::SetMarkSize IpeAttribute  size  ) 
 

Set mark size of selected objects.

void IpePage::SetTextSize IpeAttribute  size  ) 
 

Set text size of selected objects.

bool IpePage::ComposePaths int  layer  ) 
 

Create one path object with all the subpaths from the selection.

The new object takes the attributes from the primary selection, and is placed in layer. The function returns false if non-path objects are selected.

bool IpePage::DecomposePath int  layer  ) 
 

Decompose one path object into separate objects for the subpaths.

The new objects are placed in layer. The function returns false if the primary selection is not a path object.

bool IpePage::JoinPaths int  layer  ) 
 

Join paths into one long path.

Create one path object with the open subpaths from the selection joined into one long subpath. The new object takes the attributes from the primary selection, and is placed in layer. The function returns false if objects are selected that do not consist of open subpaths only.

int IpePage::GridSize  )  const [inline]
 

Return grid size for this page (0 if not set).

void IpePage::SetGridSize int  gs  )  [inline]
 

Set grid size.


The documentation for this class was generated from the following files: