Main Page   Namespace List   Class Hierarchy   Compound List   File List   Compound Members   File Members  

SelectTool Class Reference

A Tool subclass that allows users to select objects. More...

Inheritance diagram for SelectTool:

Tool Object List of all members.

Public Methods

 SelectTool ()
void start ()
 When the tool is selected, the drawing's selection is cleared.

int mouseClick (const Position &pos)
 When the user clicks on the canvas, the drawing is asked to find the object that was clicked, and then that object is added to the list of selected objects in the drawing.

void stop ()
 called when another tool is selected


Static Public Attributes

SelectTool::Factory factory

Detailed Description

A Tool subclass that allows users to select objects.


Constructor & Destructor Documentation

SelectTool::SelectTool   [inline]
 

00008 : Tool("select-button.bmp") {}


Member Function Documentation

int SelectTool::mouseClick const Position &    pos [inline, virtual]
 

When the user clicks on the canvas, the drawing is asked to find the object that was clicked, and then that object is added to the list of selected objects in the drawing.

Implements Tool.

00019                                       {
00020     if (DrawElement* e = drawing->get_contents()->find_hit(pos)) {
00021       drawing->add_selection(e);
00022       return 1;
00023     } else
00024       return 0;
00025   }

void SelectTool::start   [inline, virtual]
 

When the tool is selected, the drawing's selection is cleared.

Implements Tool.

00011                {
00012     drawing->clear_selection();
00013   }

void SelectTool::stop   [inline, virtual]
 

called when another tool is selected

Implements Tool.

00027 {}


Member Data Documentation

SelectTool::Factory SelectTool::factory [static]
 


The documentation for this class was generated from the following file:
Generated on Fri Nov 8 10:52:32 2002 for Draw by doxygen1.2.17