ipe::PanTool Class Reference
Ipe canvas

`#include <ipetool.h>`

Inherits ipe::Tool.

## Public Member Functions

| PanTool (CanvasBase *canvas, const Page *page, int view)
virtual void | draw (Painter &painter) const
virtual void | mouseButton (int button, bool press)
virtual void | mouseMove ()
Public Member Functions inherited from ipe::Tool
virtual | ~Tool ()
virtual bool | key (String text, int modifiers)
virtual void | snapVtx (const Vector &mouse, Vector &pos, double &bound, bool cp) const

## Additional Inherited Members

Protected Member Functions inherited from ipe::Tool
| Tool (CanvasBase *canvas)
Protected Attributes inherited from ipe::Tool
CanvasBase * | iCanvas

## Detailed Description

A tool for panning the canvas.

## Constructor & Destructor Documentation

## PanTool()

PanTool::PanTool | ( | CanvasBase * | canvas,
|  | const Page * | page,
|  | int | view )

References ipe::CanvasBase::EHandCursor, ipe::Tool::iCanvas, ipe::CanvasBase::setCursor(), ipe::CanvasBase::unsnappedPos(), and ipe::Vector::ZERO.

## Member Function Documentation

## draw()

void PanTool::draw | ( | Painter & | painter | ) | const

virtual

Implements ipe::Tool.

References ipe::CanvasBase::cascade(), ipe::Page::count(), ipe::Painter::drawPath(), ipe::Object::drawSimple(), ipe::EStrokedOnly, ipe::Cascade::findLayout(), ipe::Tool::iCanvas, ipe::Layout::iOrigin, ipe::Layout::iPaperSize, ipe::Painter::newPath(), ipe::Page::object(), ipe::Page::objectVisible(), ipe::Painter::rect(), ipe::Painter::setStroke(), and ipe::Painter::translate().

## mouseButton()

void PanTool::mouseButton | ( | int | button,
|  | bool | press )

virtual

Called when a mouse button is pressed or released on the canvas.

button is 1, 2, or 3, with Shift/Ctrl/Alt/Meta modifiers added in (as defined in CanvasBase::TModifiers. press is true for button-down, and false for button-up.

Reimplemented from ipe::Tool.

References ipe::CanvasBase::finishTool(), ipe::Tool::iCanvas, ipe::CanvasBase::pan(), ipe::CanvasBase::setPan(), and ipe::CanvasBase::unsnappedPos().

## mouseMove()

void PanTool::mouseMove | ( |  | ) |

virtual

Called when the mouse is moved on the canvas.

Reimplemented from ipe::Tool.

References ipe::Tool::iCanvas, ipe::CanvasBase::unsnappedPos(), and ipe::CanvasBase::updateTool().

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

- ipetool.h
- ipetool.cpp