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.