Ipelib

ipe::CanvasBase Class Reference

#include <ipecanvas.h>

Inherited by ipe::Canvas, ipe::Canvas, and ipe::Canvas.

List of all members.

Classes

Public Types

Public Member Functions

Protected Member Functions

Protected Attributes


Member Enumeration Documentation

Keyboard modifiers.

Enumerator:
EShift 
EControl 
EAlt 
EMeta 
Enumerator:
EStandardCursor 
EHandCursor 
ECrossCursor 
EDotCursor 

Constructor & Destructor Documentation

CanvasBase::~CanvasBase ( ) [virtual]

destructor.

CanvasBase::CanvasBase ( ) [protected]

Construct a new canvas.


Member Function Documentation

void CanvasBase::setPage ( const Page page,
int  pno,
int  view,
const Cascade sheet 
)

Set the page to be displayed.

Doesn't take ownership of any argument. The page number pno is only needed if page numbering is turned on.

void CanvasBase::setFontPool ( const FontPool *  fontPool)

set information about Latex fonts (from ipe::Document)

Vector ipe::CanvasBase::pan ( ) const [inline]

Return current pan.

double ipe::CanvasBase::zoom ( ) const [inline]

Return current zoom.

const Cascade* ipe::CanvasBase::cascade ( ) const [inline]

Return current style sheet cascade.

Vector ipe::CanvasBase::center ( ) const [inline]

Return center of canvas.

Vector ipe::CanvasBase::pos ( ) const [inline]

Return last mouse position (snapped!) in user coordinates.

Vector ipe::CanvasBase::unsnappedPos ( ) const [inline]

Return last unsnapped mouse position in user coordinates.

Vector ipe::CanvasBase::globalPos ( ) const [inline]

Return global mouse position of last mouse press/release.

Vector CanvasBase::simpleSnapPos ( ) const

Return snapped mouse position without angular snapping.

const Snap& ipe::CanvasBase::snap ( ) const [inline]

Return current snapping information.

int ipe::CanvasBase::additionalModifiers ( ) const [inline]

Return current additional modifiers.

void CanvasBase::setAdditionalModifiers ( int  mod)

Set additional modifiers.

These modifier bits are passed to the Tool when a key is pressed or a drawing action is performed in addition to the actual keyboard modifiers.

Vector CanvasBase::devToUser ( const Vector arg) const

Convert canvas (device) coordinates to user coordinates.

Vector CanvasBase::userToDev ( const Vector arg) const

Convert user coordinates to canvas (device) coordinates.

void CanvasBase::setCanvasStyle ( const Style style)

Set style of canvas drawing.

Includes paper color, pretty text, and grid.

Style ipe::CanvasBase::canvasStyle ( ) const [inline]

Return canvas style.

void CanvasBase::setPan ( const Vector v)

Set current pan position.

The pan position is the user coordinate that is displayed at the very center of the canvas.

void CanvasBase::setZoom ( double  zoom)

Set current zoom factor.

The zoom factor maps user coordinates to screen pixel coordinates.

void CanvasBase::setSnap ( const Snap s)

Set the snapping information.

void CanvasBase::setDimmed ( bool  dimmed)

Dim whole canvas, except for the Tool.

This mode will be reset when the Tool finishes.

void CanvasBase::setAutoOrigin ( const Vector v)

Enable automatic angular snapping with this origin.

Matrix CanvasBase::canvasTfm ( ) const

Matrix mapping user coordinates to canvas coordinates.

void CanvasBase::setObserver ( CanvasObserver observer)

Set an observer.

Use 0 to delete current observer.

void CanvasBase::setFifiVisible ( bool  visible)

Set whether Fifi should be shown.

Fifi will only be shown if a snapping mode is active.

void CanvasBase::setSelectionVisible ( bool  visible)

Set whether selection should be shown when there is no tool.

void CanvasBase::setTool ( Tool tool)

Set a new tool.

Calls canvasObserverToolChanged().

void CanvasBase::finishTool ( )
void CanvasBase::update ( )

Mark for update with redrawing of objects.

void CanvasBase::updateTool ( )

Mark for update with redrawing of tool only.

int ipe::CanvasBase::canvasWidth ( ) const [inline]
int ipe::CanvasBase::canvasHeight ( ) const [inline]
virtual void ipe::CanvasBase::setCursor ( TCursor  cursor,
double  w = 1.0,
Color color = 0 
) [pure virtual]

Implemented in ipe::Canvas.

void CanvasBase::drawPaper ( cairo_t *  cc) [protected]
void CanvasBase::drawFrame ( cairo_t *  cc) [protected]
void CanvasBase::drawAxes ( cairo_t *  cc) [protected]
void CanvasBase::drawGrid ( cairo_t *  cc) [protected]
void CanvasBase::drawObjects ( cairo_t *  cc) [protected]
void CanvasBase::drawTool ( Painter painter) [protected]

Draw the current canvas tool.

If no tool is set, it draws the selected objects.

bool CanvasBase::snapToPaperAndFrame ( ) [protected]
void CanvasBase::refreshSurface ( ) [protected]
void CanvasBase::computeFifi ( double  x,
double  y 
) [protected]

Stores the mouse position in iUnsnappedMousePos, computes Fifi if snapping is enabled, and stores snapped position in iMousePos.

virtual void ipe::CanvasBase::invalidate ( ) [protected, pure virtual]

Implemented in ipe::Canvas.

virtual void ipe::CanvasBase::invalidate ( int  x,
int  y,
int  w,
int  h 
) [protected, pure virtual]

Implemented in ipe::Canvas.


Member Data Documentation

const Page* ipe::CanvasBase::iPage [protected]
int ipe::CanvasBase::iView [protected]
const Cascade* ipe::CanvasBase::iCascade [protected]
double ipe::CanvasBase::iZoom [protected]
bool ipe::CanvasBase::iDimmed [protected]
bool ipe::CanvasBase::iAutoSnap [protected]
int ipe::CanvasBase::iWidth [protected]
int ipe::CanvasBase::iHeight [protected]
cairo_surface_t* ipe::CanvasBase::iSurface [protected]

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