Source
xxxxxxxxxx
608
608
INHERITANCE_POINTER(PlotTrackerTool, PlotTrackerToolPtr, PlotMouseTool,
609
609
PlotMouseToolPtr, PlotTool, PlotToolPtr)
610
610
611
611
612
612
// A PlotFlagAllTool is a concrete subclass of PlotMouseTool that handles
613
613
// one-click data flag functionality.
614
614
// PlotFlagAllTool is responsible for:
615
615
// 1) the behavior described above
616
616
class PlotFlagAllTool : public virtual PlotMouseTool {
617
617
public:
618
+
// enum for canvas state
619
+
enum PPFlagType {
620
+
PPFLAG_FLAG,
621
+
PPFLAG_UNFLAG,
622
+
PPFLAG_NONE
623
+
};
624
+
618
625
// Constructor which takes the tool's coordinate system.
619
626
PlotFlagAllTool(PlotCoordinate::System system = PlotCoordinate::WORLD);
620
627
621
628
// Constructor which takes the tool's axes and coordinate system.
622
629
PlotFlagAllTool(PlotAxis xAxis, PlotAxis yAxis,
623
630
PlotCoordinate::System system = PlotCoordinate::WORLD);
624
631
625
632
// Destructor.
626
633
virtual ~PlotFlagAllTool();
627
634
628
635
// Implements PlotMouseTool::handleMouseEvent().
629
636
virtual void handleMouseEvent(const PlotEvent& event);
630
637
638
+
// Sets the attributes for updating background
639
+
virtual void setUpdateBackground(bool on = true);
640
+
641
+
// Inquiry if update of background is active
642
+
virtual bool isUpdateBackgroundActive();
643
+
644
+
// Inquiry if it is marked
645
+
bool isMarkedForFlag();
646
+
bool isMarkedForUnflag();
647
+
648
+
protected:
649
+
// boolean flag for whether update of background is active
650
+
bool m_draw;
651
+
652
+
// boolean flag for whether canvas is marked for flag
653
+
PlotFlagAllTool::PPFlagType m_marked;
654
+
655
+
// keep default background setting
656
+
PlotAreaFillPtr m_defaultBackground;
657
+
631
658
};
632
659
INHERITANCE_POINTER(PlotFlagAllTool, PlotFlagAllToolPtr, PlotMouseTool,
633
660
PlotMouseToolPtr, PlotTool, PlotToolPtr)
634
661
635
662
636
663
// A PlotUnflagAllTool is a concrete subclass of PlotMouseTool that handles
637
664
// one-click data unflag functionality.
638
665
// PlotUnflagAllTool is responsible for:
639
666
// 1) the behavior described above
640
667
class PlotUnflagAllTool : public virtual PlotMouseTool {
882
909
void turnTracker(bool on);
883
910
bool trackerIsOn() const;
884
911
void turnTrackerDrawText(bool on);
885
912
bool trackerDrawsText() const;
886
913
// </group>
887
914
888
915
int getSelectedRectCount();
889
916
vector<PlotRegion> getSelectedRects();
890
917
void clearSelectedRects();
891
918
919
+
bool isMarkedForFlag();
920
+
bool isMarkedForUnflag();
921
+
892
922
// Provides access to the individual tools. Note: this should be avoided
893
923
// if possible.
894
924
// <group>
895
925
PlotSelectToolPtr selectTool();
896
926
PlotZoomToolPtr zoomTool();
897
927
PlotPanToolPtr panTool();
898
928
PlotFlagAllToolPtr flagAllTool();
899
929
PlotUnflagAllToolPtr unflagAllTool();
900
930
PlotTrackerToolPtr trackerTool();
901
931
// </group>