casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Protected Member Functions
casa::MultiEllipseTool Class Reference

Base class for MultiWorldCanvas event-based rectangle tools. More...

#include <MultiEllipseTool.h>

Inheritance diagram for casa::MultiEllipseTool:
casa::MultiRectTool casa::RegionTool casa::DTVisible casa::viewer::RegionCreator casa::MultiWCTool casa::DisplayTool casa::WCPositionEH casa::WCMotionEH casa::WCRefreshEH casa::DisplayEH casa::MultiEllipseToolImpl casa::QtELRegion casa::QtEllipseTool

List of all members.

Public Member Functions

 MultiEllipseTool (viewer::RegionSourceFactory *rsf, PanelDisplay *pd, Display::KeySym keysym=Display::K_Pointer_Button1, const Bool persistent=False)
 Constructor.
virtual ~MultiEllipseTool ()
 Destructor.
const std::set
< viewer::region::RegionTypes > & 
regionsCreated () const
 returns a set which indicates regions this creator creates...
RegionToolTypes type () const

Protected Member Functions

bool checkType (viewer::region::RegionTypes t)
virtual std::tr1::shared_ptr
< viewer::Rectangle
allocate_region (WorldCanvas *wc, double x1, double y1, double x2, double y2, VOID *region_specific_state) const

Detailed Description

Base class for MultiWorldCanvas event-based rectangle tools.

Intended use:

Public interface

Review Status

Date Reviewed:
yyyy/mm/dd

<prerequisites> WCTool </prerequisites>

Etymology

MultiEllipseTool stands for MultiWorldCanvas Rectangle Tool

Synopsis

This class adds to its base WCTool to provide a tool for drawing, resizing and moving rectangles on a WorldCanvas. While MultiEllipseTool is not abstract, it performs no useful function. The programmer should derive from this class, and implement the functions doubleInside and doubleOutside, which are called when the user double-clicks the key or mouse button inside or outside an existing rectangle respectively. It is up to the programmer to decide what double clicks inside and outside the rectangle correspond to, although it is recommended that a double click inside correspond to the main action of the tool, and a double click outside correspond to a secondary action of the tool, if indeed a secondary action exists.

The rectangle is drawn by dragging the mouse from one corner to the diagonally opposite corner. Once constructed, the rectangle can be resized by dragging its corners, or relocated by dragging inside the rectangle. The rectangle is removed from the display when the Esc key is pressed.

Example

Motivation

Many activities on the WorldCanvas will be based on the user drawing a rectangle, and then proceeding to some action with that rectangle. A nice example is zooming.

Definition at line 84 of file MultiEllipseTool.h.


Constructor & Destructor Documentation

Constructor.

Definition at line 89 of file MultiEllipseTool.h.

virtual casa::MultiEllipseTool::~MultiEllipseTool ( ) [inline, virtual]

Destructor.

Definition at line 94 of file MultiEllipseTool.h.


Member Function Documentation

virtual std::tr1::shared_ptr<viewer::Rectangle> casa::MultiEllipseTool::allocate_region ( WorldCanvas wc,
double  x1,
double  y1,
double  x2,
double  y2,
VOID region_specific_state 
) const [protected, virtual]

Reimplemented from casa::MultiRectTool.

bool casa::MultiEllipseTool::checkType ( viewer::region::RegionTypes  t) [inline, protected, virtual]

Reimplemented from casa::MultiRectTool.

Definition at line 103 of file MultiEllipseTool.h.

References casa::viewer::region::EllipseRegion.

returns a set which indicates regions this creator creates...

Reimplemented from casa::MultiRectTool.

RegionToolTypes casa::MultiEllipseTool::type ( ) const [inline, virtual]

Reimplemented from casa::MultiRectTool.

Definition at line 99 of file MultiEllipseTool.h.

References casa::RegionTool::ELLIPSETOOL.


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