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