# IntelliPhoto: IntelliTool Class Reference

IntelliTool Class Referenceabstract

An abstract class that manages the basic events, like mouse clicks or scrolls events. More...

`#include <IntelliTool.h>`

Inheritance diagram for IntelliTool:
[legend]
Collaboration diagram for IntelliTool:
[legend]

## Public Member Functions

| IntelliTool (PaintingArea *Area, IntelliColorPicker *colorPicker)
| A constructor setting the general Painting Area and colorPicker. More...
virtual | ~IntelliTool ()=0
| An abstract Destructor. More...
virtual void | onMouseRightPressed (int x, int y)
| A function managing the right click Pressed of a Mouse. Constructing the Canvas to draw on. Call this in child classes! More...
virtual void | onMouseRightReleased (int x, int y)
| A function managing the right click Released of a Mouse. Merging the Canvas to Active. Call this in child classes! More...
virtual void | onMouseLeftPressed (int x, int y)
| A function managing the left click Pressed of a Mouse. Resetting the current draw. Call this in child classes! More...
virtual void | onMouseLeftReleased (int x, int y)
| A function managing the left click Released of a Mouse. Call this in child classes! More...
virtual void | onWheelScrolled (int value)
| A function managing the scroll event. A positive value means scrolling outwards. Call this in child classes! More...
virtual void | onMouseMoved (int x, int y)
| A function managing the mouse moved event. Call this in child classes! More...

## Protected Attributes

PaintingArea * | Area
| A pointer to the general PaintingArea to interact with. More...
IntelliColorPicker * | colorPicker
| A pointer to the IntelliColorPicker of the PaintingArea to interact with, and get the colors. More...
LayerObject * | Active
| A pointer to the underlying active Layer, do not work on this. This is used for data grabbing or previews. More...
LayerObject * | Canvas
| A pointer to the drawing canvas of the tool, work on this. More...
bool | drawing = false
| A flag checking if the user is currently drawing or not. More...

## Detailed Description

An abstract class that manages the basic events, like mouse clicks or scrolls events.

Definition at line 13 of file IntelliTool.h.

## Constructor & Destructor Documentation

## IntelliTool()

IntelliTool::IntelliTool | ( | PaintingArea * | Area,
|  | IntelliColorPicker * | colorPicker
| ) |  |

A constructor setting the general Painting Area and colorPicker.

Parameters

  Area | - The general PaintingArea used by the project.
  colorPicker | - The general colorPicker used by the project.

Definition at line 4 of file IntelliTool.cpp.

## ~IntelliTool()

IntelliTool::~IntelliTool | ( |  | ) |

pure virtual

An abstract Destructor.

Definition at line 10 of file IntelliTool.cpp.

## Member Function Documentation

## onMouseLeftPressed()

void IntelliTool::onMouseLeftPressed | ( | int | x,
|  | int | y
| ) |  |

virtual

A function managing the left click Pressed of a Mouse. Resetting the current draw. Call this in child classes!

Parameters

  x | - The x coordinate relative to the active/canvas layer.
  y | - The y coordinate relative to the active/canvas layer.

Reimplemented in IntelliToolLine, IntelliToolCircle, IntelliToolPolygon, IntelliToolRectangle, IntelliToolPen, IntelliToolFloodFill, and IntelliToolPlainTool.

Definition at line 25 of file IntelliTool.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

## onMouseLeftReleased()

void IntelliTool::onMouseLeftReleased | ( | int | x,
|  | int | y
| ) |  |

virtual

A function managing the left click Released of a Mouse. Call this in child classes!

Parameters

  x | - The x coordinate relative to the active/canvas layer.
  y | - The y coordinate relative to the active/canvas layer.

Reimplemented in IntelliToolLine, IntelliToolCircle, IntelliToolPolygon, IntelliToolRectangle, IntelliToolPen, IntelliToolFloodFill, and IntelliToolPlainTool.

Definition at line 32 of file IntelliTool.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

## onMouseMoved()

void IntelliTool::onMouseMoved | ( | int | x,
|  | int | y
| ) |  |

virtual

A function managing the mouse moved event. Call this in child classes!

Parameters

  x | - The x coordinate of the new mouse position.
  y | - The y coordinate of the new mouse position.

Reimplemented in IntelliToolPolygon, IntelliToolLine, IntelliToolCircle, IntelliToolRectangle, IntelliToolPen, IntelliToolFloodFill, and IntelliToolPlainTool.

Definition at line 41 of file IntelliTool.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

## onMouseRightPressed()

void IntelliTool::onMouseRightPressed | ( | int | x,
|  | int | y
| ) |  |

virtual

A function managing the right click Pressed of a Mouse. Constructing the Canvas to draw on. Call this in child classes!

Parameters

  x | - The x coordinate relative to the active/canvas layer.
  y | - The y coordinate relative to the active/canvas layer.

Reimplemented in IntelliToolPolygon, IntelliToolLine, IntelliToolCircle, IntelliToolRectangle, IntelliToolPen, IntelliToolFloodFill, and IntelliToolPlainTool.

Definition at line 14 of file IntelliTool.cpp.

Here is the caller graph for this function:

## onMouseRightReleased()

void IntelliTool::onMouseRightReleased | ( | int | x,
|  | int | y
| ) |  |

virtual

A function managing the right click Released of a Mouse. Merging the Canvas to Active. Call this in child classes!

Parameters

  x | - The x coordinate relative to the active/canvas layer.
  y | - The y coordinate relative to the active/canvas layer.

Reimplemented in IntelliToolPolygon, IntelliToolLine, IntelliToolCircle, IntelliToolRectangle, IntelliToolPen, IntelliToolFloodFill, and IntelliToolPlainTool.

Definition at line 21 of file IntelliTool.cpp.

Here is the caller graph for this function:

## onWheelScrolled()

void IntelliTool::onWheelScrolled | ( | int | value | ) |

virtual

A function managing the scroll event. A positive value means scrolling outwards. Call this in child classes!

Parameters

  value | - The absolute the scroll has changed.

Reimplemented in IntelliToolPolygon, IntelliToolLine, IntelliToolCircle, IntelliToolRectangle, IntelliToolPen, IntelliToolFloodFill, and IntelliToolPlainTool.

Definition at line 46 of file IntelliTool.cpp.

Here is the caller graph for this function:

## Member Data Documentation

## Active

LayerObject* IntelliTool::Active

protected

A pointer to the underlying active Layer, do not work on this. This is used for data grabbing or previews.

Definition at line 43 of file IntelliTool.h.

## Area

PaintingArea* IntelliTool::Area

protected

A pointer to the general PaintingArea to interact with.

Definition at line 33 of file IntelliTool.h.

## Canvas

LayerObject* IntelliTool::Canvas

protected

A pointer to the drawing canvas of the tool, work on this.

Definition at line 48 of file IntelliTool.h.

## colorPicker

IntelliColorPicker* IntelliTool::colorPicker

protected

A pointer to the IntelliColorPicker of the PaintingArea to interact with, and get the colors.

Definition at line 38 of file IntelliTool.h.

## drawing

bool IntelliTool::drawing = false

protected

A flag checking if the user is currently drawing or not.

Definition at line 53 of file IntelliTool.h.

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

- intelliphoto/src/Tool/IntelliTool.h
- intelliphoto/src/Tool/IntelliTool.cpp