00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027 #ifndef PLOTCANVAS_H_
00028 #define PLOTCANVAS_H_
00029
00030 #include <graphics/GenericPlotter/Plot.h>
00031 #include <graphics/GenericPlotter/PlotAnnotation.h>
00032 #include <graphics/GenericPlotter/PlotEventHandler.h>
00033 #include <graphics/GenericPlotter/PlotItem.h>
00034 #include <graphics/GenericPlotter/PlotLogger.h>
00035 #include <graphics/GenericPlotter/PlotOperation.h>
00036 #include <graphics/GenericPlotter/PlotOptions.h>
00037 #include <graphics/GenericPlotter/PlotShape.h>
00038 #include <graphics/GenericPlotter/PlotTool.h>
00039
00040 #include <casa/BasicSL/String.h>
00041
00042 namespace casa {
00043
00044
00045 class PlotFactory;
00046
00047
00048
00049
00050
00051
00052
00053 class PlotDrawWatcher {
00054 public:
00055
00056 PlotDrawWatcher() { }
00057
00058
00059 virtual ~PlotDrawWatcher() { }
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074 virtual bool canvasDrawBeginning(PlotOperationPtr drawOperation,
00075 bool drawingIsThreaded, int drawnLayersFlag) = 0;
00076 };
00077 typedef CountedPtr<PlotDrawWatcher> PlotDrawWatcherPtr;
00078
00079
00080
00081
00082
00083 class PlotCanvas {
00084 public:
00085
00086
00087
00088 enum LegendPosition {
00089 INT_URIGHT,
00090 INT_LRIGHT,
00091 INT_ULEFT,
00092 INT_LLEFT,
00093 EXT_RIGHT,
00094 EXT_TOP,
00095 EXT_LEFT,
00096 EXT_BOTTOM
00097 };
00098
00099
00100
00101 static std::vector<LegendPosition> allLegendPositions();
00102 static std::vector<String> allLegendPositionStrings();
00103
00104
00105
00106
00107 static String legendPosition(LegendPosition p);
00108 static LegendPosition legendPosition(String p, bool* ok = NULL);
00109
00110
00111
00112
00113 static bool legendPositionIsInternal(LegendPosition p);
00114
00115
00116
00117 static std::vector<PlotAxis> allAxes();
00118
00119
00120 static int allAxesFlag();
00121
00122
00123
00124 static std::vector<PlotCanvasLayer> allLayers();
00125
00126
00127 static int allLayersFlag();
00128
00129
00130
00131 static const String OPERATION_DRAW;
00132 static const String OPERATION_EXPORT;
00133
00134
00135
00136
00137
00138
00139 PlotCanvas();
00140
00141
00142 virtual ~PlotCanvas();
00143
00144
00145
00146
00147
00148
00149 virtual bool hasThreadedDrawing() const;
00150
00151
00152
00153 virtual bool hasCachedLayerDrawing() const;
00154
00155
00156
00157 virtual bool hasCachedAxesStack() const;
00158
00159
00160
00161
00162
00163 virtual std::pair<int, int> size() const = 0;
00164 virtual void setMinimumSize( int width, int height ) = 0;
00165 virtual void setMinimumSizeHint( int width, int height ) = 0;
00166 virtual void show() = 0;
00167 virtual void hide() = 0;
00168 virtual bool isDrawing( )= 0;
00169
00170
00171 virtual String title() const = 0;
00172
00173
00174
00175 virtual void setTitle(const String& title) = 0;
00176
00177
00178
00179 virtual PlotFontPtr titleFont() const = 0;
00180
00181
00182 virtual void setTitleFont(const PlotFont& font) = 0;
00183
00184
00185
00186 virtual void setTitleFont(const PlotFontPtr font);
00187
00188
00189 virtual PlotAreaFillPtr background() const = 0;
00190
00191
00192 virtual void setBackground(const PlotAreaFill& areaFill) = 0;
00193
00194
00195
00196
00197 virtual void setBackground(const PlotAreaFillPtr areaFill);
00198 virtual void setBackground(const String& color,
00199 PlotAreaFill::Pattern pattern = PlotAreaFill::FILL);
00200
00201
00202
00203
00204 virtual PlotCursor cursor() const = 0;
00205 virtual void setCursor(PlotCursor cursor) = 0;
00206
00207
00208
00209
00210 virtual void refresh() = 0;
00211
00212
00213
00214 virtual void refresh(int drawLayersFlag) = 0;
00215
00216
00217 virtual bool isQWidget() const = 0;
00218
00219
00220
00221
00222
00223 virtual PlotAxisBitset shownAxes() const = 0;
00224
00225
00226
00227 virtual void showAxes(PlotAxisBitset axes) = 0;
00228
00229
00230 #if (0) // checking hypothesis: this is not used anywhere
00231
00232
00233 virtual bool isAxisShown(PlotAxis axis) const;
00234 #endif
00235
00236
00237
00238
00239 virtual void showAxis(PlotAxis axis, bool show = true);
00240 virtual void setCommonAxes( bool commonX, bool commonY ) = 0;
00241
00242
00243
00244 virtual void showAxes(PlotAxis xAxis, PlotAxis yAxis, bool show = true);
00245
00246
00247
00248 virtual void showAllAxes(bool show);
00249
00250
00251 virtual PlotAxisScale axisScale(PlotAxis axis) const = 0;
00252
00253
00254
00255 virtual void setAxisScale(PlotAxis axis, PlotAxisScale scale) = 0;
00256
00257
00258
00259
00260 virtual void setAxesScales(PlotAxis xAxis, PlotAxisScale xScale,
00261 PlotAxis yAxis, PlotAxisScale yScale);
00262
00263
00264
00265
00266
00267
00268 virtual bool axisReferenceValueSet(PlotAxis axis) const = 0;
00269 virtual double axisReferenceValue(PlotAxis axis) const = 0;
00270 virtual void setAxisReferenceValue(PlotAxis axis, bool on,
00271 double value = 0) = 0;
00272
00273
00274
00275
00276 virtual bool cartesianAxisShown(PlotAxis axis) const = 0;
00277
00278
00279
00280
00281
00282
00283
00284
00285
00286 virtual void showCartesianAxis(PlotAxis mirrorAxis, PlotAxis secondaryAxis,
00287 bool show = true, bool hideNormalAxis = true) = 0;
00288
00289
00290
00291
00292 virtual void showCartesianAxis(PlotAxis mirrorAxis, bool show = true,
00293 bool hideNormalAxis = true);
00294 virtual void showCartesianAxes(bool show = true, bool hideNormal = true);
00295
00296
00297
00298
00299 virtual String axisLabel(PlotAxis axis) const = 0;
00300
00301
00302
00303 virtual void setAxisLabel(PlotAxis axis, const String& title) = 0;
00304
00305
00306
00307 virtual void clearAxesLabels();
00308
00309
00310
00311 virtual PlotFontPtr axisFont(PlotAxis axis) const = 0;
00312
00313
00314 virtual void setAxisFont(PlotAxis axis, const PlotFont& font) = 0;
00315
00316
00317
00318 virtual void setAxisFont(PlotAxis axis, const PlotFontPtr font);
00319
00320
00321
00322
00323
00324 virtual bool colorBarShown(PlotAxis axis = Y_RIGHT) const = 0;
00325
00326
00327
00328 virtual void showColorBar(bool show = true, PlotAxis axis = Y_RIGHT) = 0;
00329
00330
00331
00332
00333
00334 virtual prange_t axisRange(PlotAxis axis) const = 0;
00335
00336
00337
00338 virtual PlotRegion axesRanges(PlotAxis xAxis, PlotAxis yAxis) const;
00339
00340
00341
00342
00343 virtual void setAxisRange(PlotAxis axis, double from, double to) = 0;
00344
00345
00346
00347 virtual void setAxisRange(PlotAxis axis, const prange_t& range);
00348
00349
00350
00351
00352
00353
00354
00355 virtual void setAxesRanges(PlotAxis xAxis, double xFrom, double xTo,
00356 PlotAxis yAxis, double yFrom, double yTo);
00357 virtual void setAxesRanges(PlotAxis xAxis, const prange_t& xRange,
00358 PlotAxis yAxis, const prange_t& yRange);
00359
00360
00361
00362
00363
00364
00365 virtual void setAxesRegion(PlotAxis xAxis, PlotAxis yAxis,
00366 const PlotRegion& region);
00367
00368
00369
00370
00371
00372
00373 virtual void moveAxisRange(PlotAxis axis, double delta);
00374 virtual void moveAxesRanges(PlotAxis xAxis, double xDelta,
00375 PlotAxis yAxis, double yDelta);
00376
00377
00378
00379
00380 virtual bool axesAutoRescale() const = 0;
00381
00382
00383
00384 virtual void setAxesAutoRescale(bool autoRescale = true) = 0;
00385
00386
00387
00388 virtual void rescaleAxes() = 0;
00389
00390
00391
00392
00393 virtual bool axesRatioLocked() const = 0;
00394
00395
00396 virtual void setAxesRatioLocked(bool locked = true) = 0;
00397
00398
00399
00400
00401
00402
00403
00404
00405
00406 virtual PlotAxesStack& axesStack();
00407 virtual const PlotAxesStack& axesStack() const;
00408
00409
00410
00411
00412
00413
00414
00415
00416
00417
00418 virtual bool axesStackMove(int delta);
00419
00420
00421
00422
00423
00424
00425 virtual int axesStackLengthLimit() const;
00426 virtual void setAxesStackLengthLimit(int lengthLimit);
00427
00428
00429
00430
00431
00432
00433
00434
00435 virtual int cachedAxesStackSizeLimit() const = 0;
00436 virtual void setCachedAxesStackSizeLimit(int sizeInKilobytes) = 0;
00437
00438
00439
00440
00441
00442
00443
00444
00445
00446
00447 virtual std::pair<int, int> cachedAxesStackImageSize() const;
00448 virtual void setCachedAxesStackImageSize(int width, int height);
00449
00450
00451
00452
00453
00454
00455
00456
00457 virtual bool plotItem(PlotItemPtr item, PlotCanvasLayer layer = MAIN) = 0;
00458
00459
00460
00461
00462 virtual bool plot(PlotPtr plot, bool overplot = true);
00463 virtual bool plotPoint(PlotPointPtr point);
00464 virtual bool drawShape(PlotShapePtr shape);
00465 virtual bool drawAnnotation(PlotAnnotationPtr annotation);
00466
00467
00468
00469 virtual std::vector<PlotItemPtr> allPlotItems() const = 0;
00470
00471
00472
00473
00474 virtual std::vector<PlotPtr> allPlots() const;
00475 virtual std::vector<PlotPointPtr> allPoints() const;
00476 virtual std::vector<PlotShapePtr> allShapes() const;
00477 virtual std::vector<PlotAnnotationPtr> allAnnotations() const;
00478
00479
00480
00481
00482 virtual unsigned int numPlotItems() const;
00483
00484
00485
00486
00487 virtual unsigned int numPlots() const;
00488 virtual unsigned int numPoints() const;
00489 virtual unsigned int numShapes() const;
00490 virtual unsigned int numAnnotations() const;
00491
00492
00493
00494 virtual std::vector<PlotItemPtr> layerPlotItems(PlotCanvasLayer layer) const= 0;
00495
00496
00497
00498
00499 virtual std::vector<PlotPtr> layerPlots(PlotCanvasLayer layer) const;
00500 virtual std::vector<PlotPointPtr> layerPoints(PlotCanvasLayer layer) const;
00501 virtual std::vector<PlotShapePtr> layerShapes(PlotCanvasLayer layer) const;
00502 virtual std::vector<PlotAnnotationPtr> layerAnnotations(PlotCanvasLayer l)const;
00503
00504
00505
00506
00507
00508 virtual unsigned int numLayerPlotItems(PlotCanvasLayer layer) const;
00509
00510
00511
00512
00513 virtual unsigned int numLayerPlots(PlotCanvasLayer layer) const;
00514 virtual unsigned int numLayerPoints(PlotCanvasLayer layer) const;
00515 virtual unsigned int numLayerShapes(PlotCanvasLayer layer) const;
00516 virtual unsigned int numLayerAnnotations(PlotCanvasLayer layer) const;
00517
00518
00519
00520
00521
00522 virtual void removePlotItem(PlotItemPtr item);
00523
00524
00525
00526
00527 virtual void removePlot(PlotPtr plot);
00528 virtual void removePoint(PlotPointPtr point);
00529 virtual void removeShape(PlotShapePtr shape);
00530 virtual void removeAnnotation(PlotAnnotationPtr annotation);
00531
00532
00533
00534
00535 virtual void removePlotItems(const std::vector<PlotItemPtr>& items) = 0;
00536
00537
00538
00539
00540 virtual void removeLastPlotItem();
00541
00542
00543
00544
00545 virtual void removeLastPlot();
00546 virtual void removeLastPoint();
00547 virtual void removeLastShape();
00548 virtual void removeLastAnnotation();
00549
00550
00551
00552
00553
00554 virtual void clearItems();
00555
00556
00557
00558
00559 virtual void clearPlots();
00560 virtual void clearPoints();
00561 virtual void clearShapes();
00562 virtual void clearAnnotations();
00563
00564
00565
00566
00567
00568 virtual void clearLayer(PlotCanvasLayer layer);
00569
00570
00571
00572
00573
00574
00575
00576
00577 virtual void holdDrawing() = 0;
00578 virtual void releaseDrawing() = 0;
00579 virtual bool drawingIsHeld() const = 0;
00580
00581
00582
00583
00584
00585
00586 virtual void registerDrawWatcher(PlotDrawWatcherPtr watcher);
00587 virtual void unregisterDrawWatcher(PlotDrawWatcherPtr watcher);
00588
00589
00590
00591
00592
00593
00594
00595 virtual PlotOperationPtr operationDraw();
00596 virtual PlotOperationPtr operationDraw(PlotMutexPtr mutex);
00597
00598
00599
00600
00601
00602
00603
00604 virtual bool selectLineShown() const;
00605
00606
00607 virtual void setSelectLineShown(bool shown = true) = 0;
00608
00609
00610 virtual PlotLinePtr selectLine() const = 0;
00611
00612
00613 virtual void setSelectLine(const PlotLine& line) = 0;
00614
00615
00616
00617
00618 virtual void setSelectLine(const PlotLinePtr line);
00619 virtual void setSelectLine(const String& color,
00620 PlotLine::Style style = PlotLine::SOLID,
00621 double width = 1.0);
00622
00623
00624
00625
00626
00627
00628
00629
00630 virtual bool gridShown(bool* xMajor = NULL, bool* xMinor = NULL,
00631 bool* yMajor = NULL, bool* yMinor = NULL) const = 0;
00632
00633
00634 virtual void showGrid(bool xMajor, bool xMinor, bool yMajor,bool yMinor)=0;
00635
00636
00637
00638
00639 virtual void showGrid(bool showAll = true);
00640 virtual void showGridMajor(bool show = true);
00641 virtual void showGridMinor(bool show = true);
00642
00643
00644
00645
00646
00647 virtual bool gridXMajorShown() const;
00648 virtual void showGridXMajor(bool s = true);
00649
00650
00651
00652
00653
00654 virtual bool gridXMinorShown() const;
00655 virtual void showGridXMinor(bool s = true);
00656
00657
00658
00659
00660
00661 virtual bool gridYMajorShown() const;
00662 virtual void showGridYMajor(bool s = true);
00663
00664
00665
00666
00667
00668 virtual bool gridYMinorShown() const;
00669 virtual void showGridYMinor(bool s = true);
00670
00671
00672
00673 virtual PlotLinePtr gridMajorLine() const = 0;
00674
00675
00676 virtual void setGridMajorLine(const PlotLine& line) = 0;
00677
00678
00679 virtual PlotLinePtr gridMinorLine() const = 0;
00680
00681
00682 virtual void setGridMinorLine(const PlotLine& line) = 0;
00683
00684
00685
00686
00687 virtual void setGridMajorLine(const PlotLinePtr line);
00688 virtual void setGridMajorLine(const String& color,
00689 PlotLine::Style style = PlotLine::SOLID, double width = 1.0);
00690 virtual void setGridMinorLine(const PlotLinePtr line);
00691 virtual void setGridMinorLine(const String& color,
00692 PlotLine::Style style = PlotLine::SOLID, double width = 1.0);
00693
00694
00695
00696
00697
00698
00699 virtual bool legendShown() const = 0;
00700
00701
00702
00703 virtual void showLegend(bool on = true,
00704 LegendPosition position = EXT_BOTTOM) = 0;
00705
00706
00707
00708 virtual LegendPosition legendPosition() const = 0;
00709
00710
00711 virtual void setLegendPosition(LegendPosition position) = 0;
00712
00713
00714 virtual PlotLinePtr legendLine() const = 0;
00715
00716
00717 virtual void setLegendLine(const PlotLine& line) = 0;
00718
00719
00720
00721
00722 virtual void setLegendLine(const PlotLinePtr line);
00723 virtual void setLegendLine(const String& color,
00724 PlotLine::Style style = PlotLine::SOLID, double width = 1.0);
00725
00726
00727
00728 virtual PlotAreaFillPtr legendFill() const = 0;
00729
00730
00731 virtual void setLegendFill(const PlotAreaFill& area) = 0;
00732
00733
00734
00735
00736 virtual void setLegendFill(const PlotAreaFillPtr area);
00737 virtual void setLegendFill(const String& color,
00738 PlotAreaFill::Pattern pattern = PlotAreaFill::FILL);
00739
00740
00741
00742 virtual PlotFontPtr legendFont() const = 0;
00743
00744
00745 virtual void setLegendFont(const PlotFont& font) = 0;
00746
00747
00748
00749 virtual void setLegendFont(const PlotFontPtr font);
00750
00751
00752
00753
00754
00755
00756 virtual bool autoIncrementColors() const = 0;
00757
00758
00759
00760
00761
00762 virtual void setAutoIncrementColors(bool autoInc = true) = 0;
00763
00764
00765 virtual bool exportToFile(const PlotExportFormat& format) = 0;
00766
00767
00768
00769
00770
00771
00772 virtual PlotOperationPtr operationExport();
00773 virtual PlotOperationPtr operationExport(PlotMutexPtr mutex);
00774
00775
00776
00777
00778
00779 virtual String fileChooserDialog(const String& title = "File Chooser",
00780 const String& directory = "") = 0;
00781
00782
00783
00784 virtual const String& dateFormat() const = 0;
00785 virtual void setDateFormat(const String& dateFormat) = 0;
00786
00787
00788
00789
00790
00791 virtual const String& relativeDateFormat() const = 0;
00792 virtual void setRelativeDateFormat(const String& dateFormat) = 0;
00793
00794
00795
00796 virtual PlotCoordinate convertCoordinate(const PlotCoordinate& coord,
00797 PlotCoordinate::System newSystem = PlotCoordinate::WORLD) const = 0;
00798
00799 bool hasSelectedRectangles();
00800 std::vector<PlotRegion> getSelectedRects();
00801 void clearSelectedRects();
00802
00803
00804
00805 virtual PlotRegion convertRegion(const PlotRegion& region,
00806 PlotCoordinate::System newSystem) const;
00807
00808
00809
00810
00811 virtual std::vector<double> textWidthHeightDescent(const String& text,
00812 PlotFontPtr font) const = 0;
00813
00814
00815
00816
00817
00818 virtual std::vector<double> annotationWidthHeightDescent(
00819 const PlotAnnotationPtr annot) const;
00820
00821
00822
00823 virtual int implementation() const = 0;
00824
00825
00826
00827
00828 virtual PlotFactory* implementationFactory() const = 0;
00829
00830
00831
00832 virtual PlotMutexPtr mutex() const;
00833
00834
00835
00836
00837
00838
00839
00840
00841
00842
00843
00844
00845
00846
00847
00848
00849 virtual std::vector<std::vector<std::pair<unsigned int, unsigned int> > >* locate(
00850 const PlotRegion& region) const;
00851
00852
00853
00854 virtual void locateAndLog(const PlotRegion& region,
00855 PlotLoggerPtr logger) const;
00856
00857
00858
00859
00860
00861
00862
00863 virtual void registerMouseTool(PlotMouseToolPtr tool, bool activate = true,
00864 bool blocking = false);
00865 virtual std::vector<PlotMouseToolPtr> allMouseTools() const;
00866 virtual std::vector<PlotMouseToolPtr> activeMouseTools() const;
00867 virtual void unregisterMouseTool(PlotMouseToolPtr tool);
00868
00869
00870
00871
00872
00873 virtual PlotStandardMouseToolGroupPtr standardMouseTools();
00874
00875
00876
00877
00878
00879
00880
00881 virtual void registerSelectHandler(PlotSelectEventHandlerPtr handler,
00882 PlotCoordinate::System system = PlotCoordinate::WORLD);
00883 virtual std::vector<PlotSelectEventHandlerPtr> allSelectHandlers() const;
00884 virtual void unregisterSelectHandler(PlotSelectEventHandlerPtr handler);
00885
00886
00887
00888
00889
00890 virtual void registerClickHandler(PlotClickEventHandlerPtr handler,
00891 PlotCoordinate::System system = PlotCoordinate::WORLD);
00892 virtual std::vector<PlotClickEventHandlerPtr> allClickHandlers() const;
00893 virtual void unregisterClickHandler(PlotClickEventHandlerPtr handler);
00894
00895
00896
00897
00898
00899 virtual void registerMousePressHandler(PlotMousePressEventHandlerPtr hndlr,
00900 PlotCoordinate::System system = PlotCoordinate::WORLD);
00901 virtual std::vector<PlotMousePressEventHandlerPtr>
00902 allMousePressHandlers() const;
00903 virtual void unregisterMousePressHandler(
00904 PlotMousePressEventHandlerPtr handler);
00905
00906
00907
00908
00909
00910 virtual void registerMouseReleaseHandler(
00911 PlotMouseReleaseEventHandlerPtr handler,
00912 PlotCoordinate::System system = PlotCoordinate::WORLD);
00913 virtual std::vector<PlotMouseReleaseEventHandlerPtr>
00914 allMouseReleaseHandlers() const;
00915 virtual void unregisterMouseReleaseHandler(
00916 PlotMouseReleaseEventHandlerPtr handler);
00917
00918
00919
00920
00921
00922 virtual void registerMouseDragHandler(PlotMouseDragEventHandlerPtr h,
00923 PlotCoordinate::System system = PlotCoordinate::WORLD);
00924 virtual std::vector<PlotMouseDragEventHandlerPtr> allMouseDragHandlers() const;
00925 virtual void unregisterMouseDragHandler(PlotMouseDragEventHandlerPtr h);
00926
00927
00928
00929
00930
00931
00932
00933 virtual void registerMouseMoveHandler(PlotMouseMoveEventHandlerPtr h,
00934 PlotCoordinate::System system = PlotCoordinate::WORLD);
00935 virtual std::vector<PlotMouseMoveEventHandlerPtr> allMouseMoveHandlers() const;
00936 virtual void unregisterMouseMoveHandler(PlotMouseMoveEventHandlerPtr h);
00937
00938
00939
00940
00941
00942 virtual void registerWheelHandler(PlotWheelEventHandlerPtr handler,
00943 PlotCoordinate::System system = PlotCoordinate::WORLD);
00944 virtual std::vector<PlotWheelEventHandlerPtr> allWheelHandlers() const;
00945 virtual void unregisterWheelHandler(PlotWheelEventHandlerPtr handler);
00946
00947
00948
00949
00950
00951 virtual void registerKeyHandler(PlotKeyEventHandlerPtr handler);
00952 virtual std::vector<PlotKeyEventHandlerPtr> allKeyHandlers() const;
00953 virtual void unregisterKeyHandler(PlotKeyEventHandlerPtr handler);
00954
00955
00956
00957
00958
00959 virtual void registerResizeHandler(PlotResizeEventHandlerPtr handler);
00960 virtual std::vector<PlotResizeEventHandlerPtr> allResizeHandlers() const;
00961 virtual void unregisterResizeHandler(PlotResizeEventHandlerPtr handler);
00962
00963
00964 protected:
00965
00966 PlotAxesStack m_stack;
00967
00968
00969
00970 PlotOperationPtr m_drawOperation;
00971 PlotOperationPtr m_exportOperation;
00972
00973
00974
00975 std::vector<PlotDrawWatcherPtr> m_drawWatchers;
00976
00977
00978 PlotStandardMouseToolGroupPtr m_standardTools;
00979
00980
00981 std::vector<PlotMouseToolPtr> m_mouseTools;
00982
00983
00984
00985 std::vector<std::pair<PlotSelectEventHandlerPtr, PlotCoordinate::System> >
00986 m_selectHandlers;
00987 std::vector<std::pair<PlotClickEventHandlerPtr, PlotCoordinate::System> >
00988 m_clickHandlers;
00989 std::vector<std::pair<PlotMousePressEventHandlerPtr, PlotCoordinate::System> >
00990 m_pressHandlers;
00991 std::vector<std::pair<PlotMouseReleaseEventHandlerPtr, PlotCoordinate::System> >
00992 m_releaseHandlers;
00993 std::vector<std::pair<PlotMouseDragEventHandlerPtr, PlotCoordinate::System> >
00994 m_dragHandlers;
00995 std::vector<std::pair<PlotMouseMoveEventHandlerPtr, PlotCoordinate::System> >
00996 m_moveHandlers;
00997 std::vector<std::pair<PlotWheelEventHandlerPtr, PlotCoordinate::System> >
00998 m_wheelHandlers;
00999 std::vector<PlotKeyEventHandlerPtr> m_keyHandlers;
01000 std::vector<PlotResizeEventHandlerPtr> m_resizeHandlers;
01001
01002
01003
01004
01005 void resetMouseTools();
01006
01007
01008
01009
01010 bool notifyDrawWatchers(PlotOperationPtr drawOperation,
01011 bool drawingIsThreaded, int drawnLayersFlag);
01012
01013
01014
01015
01016 bool notifySelectHandlers(const PlotRegion& selectedRegion);
01017 bool notifyMouseHandlers(PlotMouseEvent::Type type,
01018 PlotMouseEvent::Button button, const PlotCoordinate& coord);
01019 bool notifyClickHandlers(PlotMouseEvent::Button button,
01020 const PlotCoordinate& coord);
01021 bool notifyPressHandlers(PlotMouseEvent::Button button,
01022 const PlotCoordinate& coord);
01023 bool notifyReleaseHandlers(PlotMouseEvent::Button button,
01024 const PlotCoordinate& coord);
01025 bool notifyDragHandlers(PlotMouseEvent::Button button,
01026 const PlotCoordinate& coord);
01027 bool notifyMoveHandlers(PlotMouseEvent::Button button,
01028 const PlotCoordinate& coord);
01029 bool notifyWheelHandlers(int delta, const PlotCoordinate& coord);
01030 bool notifyKeyHandlers(char key,
01031 const std::vector<PlotKeyEvent::Modifier>& modifiers);
01032 bool notifyResizeHandlers(int oldWidth, int oldHeight,
01033 int newWidth, int newHeight);
01034
01035 };
01036 typedef CountedPtr<PlotCanvas> PlotCanvasPtr;
01037
01038 }
01039
01040 #endif