Editor for FlatView::Annotation::AuxData. Allows the enduser to click-drag-release the points in data. Users of the class have the choice if the editor should do the changes for them, or if they want to do changes themself, driven by the callback.
| FlatView::AuxDataEditor::AuxDataEditor | ( | Viewer & | , | |
| MouseEventHandler & | ||||
| ) |
| virtual FlatView::AuxDataEditor::~AuxDataEditor | ( | ) | [virtual] |
| int FlatView::AuxDataEditor::addAuxData | ( | FlatView::Annotation::AuxData * | , | |
| bool | doedit | |||
| ) |
| doedit | says whether this object should change the auxdata, or if the user of the objects should do it. |
| int FlatView::AuxDataEditor::dataSetIdxAt | ( | const Geom::Point2D< int > & | ) | const [protected] |
| void FlatView::AuxDataEditor::enableEdit | ( | int | id, | |
| bool | allowadd, | |||
| bool | allowmove, | |||
| bool | allowdelete | |||
| ) |
| void FlatView::AuxDataEditor::enablePolySel | ( | int | id, | |
| bool | allowsel | |||
| ) |
| void FlatView::AuxDataEditor::findSelection | ( | const Geom::Point2D< int > & | , | |
| int & | seldatasetidx, | |||
| TypeSet< int > * | selptidxlist | |||
| ) | const [protected] |
| int FlatView::AuxDataEditor::getAddAuxData | ( | ) | const |
| const ObjectSet<Annotation::AuxData>& FlatView::AuxDataEditor::getAuxData | ( | ) | const |
| const TypeSet<int>& FlatView::AuxDataEditor::getIds | ( | ) | const |
| MenuHandler* FlatView::AuxDataEditor::getMenuHandler | ( | ) |
| const Geom::PixRectangle<int>& FlatView::AuxDataEditor::getMouseArea | ( | ) | const [inline] |
| void FlatView::AuxDataEditor::getPointSelections | ( | TypeSet< int > & | ids, | |
| TypeSet< int > & | idxs | |||
| ) | const |
Each point within the limits of the polygons will be put in the typesets.
| void FlatView::AuxDataEditor::getPointSelections | ( | const ObjectSet< Annotation::AuxData > & | polygon, | |
| TypeSet< int > & | ids, | |||
| TypeSet< int > & | idxs | |||
| ) | const [protected] |
Each point within the limits of the polygons will be put in the typesets.
| const LineStyle& FlatView::AuxDataEditor::getSelectionPolygonLineStyle | ( | ) | const |
| bool FlatView::AuxDataEditor::getSelectionPolygonRectangle | ( | ) | const |
If not rectangle, it's a polygon.
| int FlatView::AuxDataEditor::getSelPtDataID | ( | ) | const |
| const TypeSet<int>& FlatView::AuxDataEditor::getSelPtIdx | ( | ) | const |
| const Point& FlatView::AuxDataEditor::getSelPtPos | ( | ) | const |
| Rect FlatView::AuxDataEditor::getWorldRect | ( | int | dataid | ) | const |
| bool FlatView::AuxDataEditor::isDragging | ( | ) | const [inline] |
| bool FlatView::AuxDataEditor::isSelActive | ( | ) | const [inline] |
| void FlatView::AuxDataEditor::limitMovement | ( | const Rect * | ) |
When movement starts, the movement is unlimited. Movement can be limited once the movement started by calling limitMovement.
| MouseEventHandler& FlatView::AuxDataEditor::mouseEventHandler | ( | ) | [inline] |
| void FlatView::AuxDataEditor::mouseMoveCB | ( | CallBacker * | ) | [protected] |
| void FlatView::AuxDataEditor::mousePressCB | ( | CallBacker * | ) | [protected] |
| void FlatView::AuxDataEditor::mouseReleaseCB | ( | CallBacker * | ) | [protected] |
| void FlatView::AuxDataEditor::removeAuxData | ( | int | id | ) |
| void FlatView::AuxDataEditor::removePolygonSelected | ( | int | dataid | ) |
If dataid ==-1, all pts inside polygon is removed.
| bool FlatView::AuxDataEditor::removeSelectionPolygon | ( | ) | [protected] |
Returns true if viewer must be notified.
| void FlatView::AuxDataEditor::setAddAuxData | ( | int | id | ) |
Added points will be added to this set.
| void FlatView::AuxDataEditor::setMenuHandler | ( | MenuHandler * | ) |
| void FlatView::AuxDataEditor::setSelActive | ( | bool | yn | ) | [inline] |
| void FlatView::AuxDataEditor::setSelectionPolygonLineStyle | ( | const LineStyle & | ) |
| void FlatView::AuxDataEditor::setSelectionPolygonRectangle | ( | bool | ) |
If not rectangle, it's a polygon.
| void FlatView::AuxDataEditor::setView | ( | const Rect & | wv, | |
| const Geom::Rectangle< int > & | mouserect | |||
| ) |
User of the class must ensure that both the wv and the mouserect are up to date at all times.
| Sower& FlatView::AuxDataEditor::sower | ( | ) | [inline] |
| bool FlatView::AuxDataEditor::updateSelection | ( | const Geom::Point2D< int > & | ) | [protected] |
| const Viewer& FlatView::AuxDataEditor::viewer | ( | ) | const [inline] |
| Viewer& FlatView::AuxDataEditor::viewer | ( | ) | [inline] |
friend class Sower [friend] |
int FlatView::AuxDataEditor::addauxdataid_ [protected] |
BoolTypeSet FlatView::AuxDataEditor::allowadd_ [protected] |
BoolTypeSet FlatView::AuxDataEditor::allowmove_ [protected] |
BoolTypeSet FlatView::AuxDataEditor::allowpolysel_ [protected] |
BoolTypeSet FlatView::AuxDataEditor::allowremove_ [protected] |
Rect FlatView::AuxDataEditor::curview_ [protected] |
BoolTypeSet FlatView::AuxDataEditor::doedit_ [protected] |
Annotation::AuxData* FlatView::AuxDataEditor::feedback_ [protected] |
bool FlatView::AuxDataEditor::hasmoved_ [protected] |
TypeSet<int> FlatView::AuxDataEditor::ids_ [protected] |
bool FlatView::AuxDataEditor::isselactive_ [protected] |
MenuHandler* FlatView::AuxDataEditor::menuhandler_ [protected] |
Geom::PixRectangle<int> FlatView::AuxDataEditor::mousearea_ [protected] |
bool FlatView::AuxDataEditor::mousedown_ [protected] |
MouseEventHandler& FlatView::AuxDataEditor::mousehandler_ [protected] |
Rect* FlatView::AuxDataEditor::movementlimit_ [protected] |
LineStyle FlatView::AuxDataEditor::polygonsellst_ [protected] |
bool FlatView::AuxDataEditor::polygonselrect_ [protected] |
Geom::Point2D<int> FlatView::AuxDataEditor::prevpt_ [protected] |
if getSelPtDataID==-1 selection polygon changed else If selPtIdx()==-1, position should be added, else point moved. Boolean is true if this is the end of user interaction
int FlatView::AuxDataEditor::seldatasetidx_ [protected] |
Point FlatView::AuxDataEditor::selptcoord_ [protected] |
TypeSet<int> FlatView::AuxDataEditor::selptidx_ [protected] |
Sower* FlatView::AuxDataEditor::sower_ [protected] |
Viewer& FlatView::AuxDataEditor::viewer_ [protected] |
1.7.1