Ipelib
|
Abstract base class for various canvas tools. More...
#include <ipetool.h>
Inherited by ipe::PanTool, ipe::SelectTool, and ipe::TransformTool.
Abstract base class for various canvas tools.
The Canvas doesn't know about the various modes for object creation, editing, and moving, but delegates the handling to a subclass of Tool.
Tool::~Tool | ( | ) | [virtual] |
Virtual destructor.
Tool::Tool | ( | CanvasBase * | canvas | ) | [protected] |
Constructor.
virtual void ipe::Tool::draw | ( | Painter & | painter | ) | const [pure virtual] |
Implemented in ipe::PanTool, ipe::SelectTool, and ipe::TransformTool.
void Tool::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 in ipe::PanTool, ipe::SelectTool, and ipe::TransformTool.
void Tool::mouseMove | ( | ) | [virtual] |
Called when the mouse is moved on the canvas.
Reimplemented in ipe::PanTool, ipe::SelectTool, and ipe::TransformTool.
bool Tool::key | ( | int | code, |
int | modifiers, | ||
String | text | ||
) | [virtual] |
Called when a key is pressed.
modifiers are as defined in CanvasBase::TModifiers.
Reimplemented in ipe::SelectTool.
CanvasBase* ipe::Tool::iCanvas [protected] |