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

ToBackTool Class Reference

A Tool subclass that allows the user to send selected objects to the back of the drawing. More...

Inheritance diagram for ToBackTool:

Tool Object List of all members.

Public Methods

 ToBackTool ()
void start ()
 When the tool is selected, it moves all objects to the back by using Drawing's Selection class and the provided iteration functions, and calling the to_back method on each object.

int mouseClick (const Position &pos)
 When the mouse is clicked on the canvas, the canvas is asked to find the object that was clicked, and to_back is called on that object.

void stop ()
 called when another tool is selected


Static Public Attributes

ToBackTool::Factory factory

Detailed Description

A Tool subclass that allows the user to send selected objects to the back of the drawing.


Constructor & Destructor Documentation

ToBackTool::ToBackTool   [inline]
 

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


Member Function Documentation

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

When the mouse is clicked on the canvas, the canvas is asked to find the object that was clicked, and to_back is called on that object.

Implements Tool.

00026                                       {
00027     if (DrawElement* e = drawing->get_contents()->find_hit(pos)) {
00028       drawing->get_contents()->to_back(e);
00029       return 1;
00030     }
00031     return 0;    
00032   }

void ToBackTool::start   [inline, virtual]
 

When the tool is selected, it moves all objects to the back by using Drawing's Selection class and the provided iteration functions, and calling the to_back method on each object.

Implements Tool.

00014                {
00015     Drawing::Selection begin = drawing->begin_selection(),
00016       end = drawing->end_selection();
00017     for (Drawing::Selection i = begin; i != end; ++i) {
00018       drawing->get_contents()->to_back(*i);
00019     }
00020   }

void ToBackTool::stop   [inline, virtual]
 

called when another tool is selected

Implements Tool.

00034 {}


Member Data Documentation

ToBackTool::Factory ToBackTool::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