00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef __WXCANGLOB_H__
00023 #define __WXCANGLOB_H__
00024
00025 #ifndef WX_PRECOMP
00026 #include "wx/wx.h"
00027 #endif
00028
00029 #include <map>
00030
00031 using namespace std;
00032
00033 #include "wx/geometry.h"
00034
00035 #include <wx/module.h>
00036
00037 #include <wx/general/gen.h>
00038 #include <wx/docview/doccom.h>
00039 #include <wx/artbase/drawer2d.h>
00040
00041 #include "wx/canvas/candefs.h"
00042
00043 #include "wx/canvas/restrict.h"
00044 #include "wx/canvas/canprim.h"
00045 #include "wx/canvas/layerinf.h"
00046 #include "wx/canvas/cantext.h"
00047 #include "wx/canvas/objlist.h"
00048
00049
00050
00051 inline a2dDocumentRenderStyle operator | ( a2dDocumentRenderStyle a, a2dDocumentRenderStyle b )
00052 {
00053 return (a2dDocumentRenderStyle) ( (int) a | (int) b );
00054 }
00055
00056
00057
00058
00059
00060
00061 class a2dLayerGroup: public a2dlist< wxUint16 >
00062 {
00063 public:
00064
00065
00066 a2dLayerGroup() {}
00067
00068
00069
00070 bool InGroup( wxUint16 layer );
00071 };
00072
00073 class A2DARTBASEDLLEXP a2dAffineMatrix;
00074 class A2DCANVASDLLEXP a2dCentralCanvasCommandProcessor;
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086
00087
00088 class A2DCANVASDLLEXP a2dCanvasModule : public wxModule
00089 {
00090 public:
00091
00092 a2dCanvasModule();
00093
00094 virtual bool OnInit();
00095 virtual void OnExit();
00096
00097 private:
00098 DECLARE_DYNAMIC_CLASS(a2dCanvasModule)
00099
00100 a2dSmrtPtr<a2dDocumentCommandProcessor> m_prevCmdProc;
00101 a2dSmrtPtr<a2dCentralCanvasCommandProcessor> m_currentCmdProc;
00102 };
00103
00104 class A2DCANVASDLLEXP a2dIterC;
00105 class A2DCANVASDLLEXP a2dCanvasObject;
00106 class A2DCANVASDLLEXP a2dCanvasObjectList;
00107
00108 class A2DARTBASEDLLEXP a2dAffineMatrix;
00109 class A2DDOCVIEWDLLEXP a2dWalkerIOHandler;
00110 class A2DCANVASDLLEXP a2dText;
00111
00112
00113 BEGIN_DECLARE_EVENT_TYPES()
00114
00115 DECLARE_EXPORTED_EVENT_TYPE( A2DCANVASDLLEXP, wxEVT_CANVASOBJECT_MOUSE_EVENT, 1 )
00116
00117 DECLARE_EXPORTED_EVENT_TYPE( A2DCANVASDLLEXP, wxEVT_CANVASOBJECT_ENTER_EVENT, 1 )
00118
00119 DECLARE_EXPORTED_EVENT_TYPE( A2DCANVASDLLEXP, wxEVT_CANVASOBJECT_LEAVE_EVENT, 1 )
00120
00121 DECLARE_EXPORTED_EVENT_TYPE( A2DCANVASDLLEXP, wxEVT_CANVASHANDLE_MOUSE_EVENT, 1)
00122
00123 DECLARE_EXPORTED_EVENT_TYPE( A2DCANVASDLLEXP, wxEVT_CANVASOBJECT_RESIZE_EVENT, 1 )
00124
00125 DECLARE_EXPORTED_EVENT_TYPE( A2DCANVASDLLEXP, wxEVT_CANVASOBJECT_POPUPMENU_EVENT, 1 )
00126 END_DECLARE_EVENT_TYPES()
00127
00128
00129
00130
00131
00132
00133
00134
00135
00136 class A2DCANVASDLLEXP a2dCanvasObjectEvent : public wxEvent
00137 {
00138 public:
00139
00140
00141 a2dCanvasObjectEvent( a2dIterC* ic, wxEventType type, a2dCanvasObject* object, double x, double y, int id = 0 );
00142
00143 a2dCanvasObjectEvent( a2dCanvasObject* object, const a2dBoundingBox& box, int id = 0 );
00144
00145 a2dCanvasObjectEvent( const a2dCanvasObjectEvent& other );
00146
00147
00148 virtual wxEvent *Clone() const { return new a2dCanvasObjectEvent(*this); }
00149
00150 a2dCanvasObject* GetCanvasObject() { return (a2dCanvasObject*) GetEventObject(); }
00151
00152 double GetX() { return m_x; }
00153 double GetY() { return m_y; }
00154
00155
00156 a2dBoundingBox& GetBbox() { return m_box; }
00157
00158 a2dIterC* GetIterC() { return m_ic; }
00159
00160 void SetIterC( a2dIterC* ic) { wxASSERT( !m_ic ); m_ic=ic; }
00161
00162 private:
00163
00164 DECLARE_CLASS(a2dCanvasObjectEvent)
00165
00166
00167 double m_x;
00168
00169
00170 double m_y;
00171
00172
00173 a2dIterC* m_ic;
00174
00175
00176 a2dBoundingBox m_box;
00177 };
00178
00179
00180
00181
00182
00183
00184
00185
00186
00187
00188
00189
00190
00191
00192
00193
00194
00195
00196
00197
00198 class A2DCANVASDLLEXP a2dCanvasObjectMouseEvent : public a2dCanvasObjectEvent
00199 {
00200 public:
00201
00202
00203 a2dCanvasObjectMouseEvent( a2dIterC* ic, a2dCanvasObject* object, a2dHit& how, double x, double y, const wxMouseEvent& event );
00204
00205
00206 a2dCanvasObjectMouseEvent( a2dIterC* ic, a2dCanvasObject* object, wxEventType type, double x, double y, const wxMouseEvent& event );
00207
00208
00209 a2dCanvasObjectMouseEvent( const a2dCanvasObjectMouseEvent& other );
00210
00211
00212 virtual wxEvent *Clone( bool WXUNUSED(deep) = true ) const { return new a2dCanvasObjectMouseEvent(*this); }
00213
00214
00215 a2dCanvasObject* GetCanvasObject() { return (a2dCanvasObject*) GetEventObject(); }
00216
00217
00218 wxMouseEvent& GetMouseEvent() { return m_mouseevent; }
00219
00220
00221 a2dHit& GetHow() { return m_how; }
00222
00223 private:
00224
00225 DECLARE_CLASS(a2dCanvasObjectMouseEvent)
00226
00227
00228 wxMouseEvent m_mouseevent;
00229
00230
00231 a2dHit m_how;
00232 };
00233
00234
00235
00236
00237
00238
00239
00240
00241
00242
00243
00244
00245
00246 class A2DCANVASDLLEXP a2dHandleMouseEvent : public a2dCanvasObjectEvent
00247 {
00248 public:
00249
00250
00251 a2dHandleMouseEvent( a2dIterC* ic, a2dHandle* handle, double x, double y, const wxMouseEvent& event );
00252
00253
00254 a2dHandleMouseEvent( const a2dHandleMouseEvent& other );
00255
00256
00257 virtual wxEvent *Clone( bool WXUNUSED(deep) = true ) const { return new a2dHandleMouseEvent(*this); }
00258
00259
00260 a2dHandle* GetCanvasHandle() { return (a2dHandle*) GetEventObject(); }
00261
00262
00263 wxMouseEvent& GetMouseEvent() { return m_mouseevent; }
00264
00265 private:
00266
00267 DECLARE_CLASS(a2dHandleMouseEvent)
00268
00269
00270 wxMouseEvent m_mouseevent;
00271 };
00272
00273
00274 typedef void ( a2dEvtHandler::*a2dCanvasObjectEventFunction ) ( a2dCanvasObjectEvent& );
00275
00276 typedef void ( a2dEvtHandler::*a2dCanvasHandleMouseEventFunction ) ( a2dHandleMouseEvent& );
00277
00278 typedef void ( a2dEvtHandler::*a2dCanvasObjectMouseEventFunction ) ( a2dCanvasObjectMouseEvent& );
00279
00280
00281
00282
00283
00284
00285 #define A2D_EVT_CANVASOBJECT_MOUSE_EVENT(func) A2D_DECLARE_EVENT_TABLE_ENTRY( wxEVT_CANVASOBJECT_MOUSE_EVENT, wxID_ANY, wxID_ANY, (a2dObjectEventFunction) static_cast < a2dCanvasObjectMouseEventFunction > ( & func ), (wxObject *) NULL ),
00286
00287 #define A2D_EVT_CANVASOBJECT_ENTER_EVENT(func) A2D_DECLARE_EVENT_TABLE_ENTRY( wxEVT_CANVASOBJECT_ENTER_EVENT, wxID_ANY, wxID_ANY, (a2dObjectEventFunction) static_cast < a2dCanvasObjectMouseEventFunction > ( & func ), (wxObject *) NULL ),
00288
00289 #define A2D_EVT_CANVASOBJECT_LEAVE_EVENT(func) A2D_DECLARE_EVENT_TABLE_ENTRY( wxEVT_CANVASOBJECT_LEAVE_EVENT, wxID_ANY, wxID_ANY, (a2dObjectEventFunction) static_cast < a2dCanvasObjectMouseEventFunction > ( & func ), (wxObject *) NULL ),
00290
00291 #define A2D_EVT_CANVASHANDLE_MOUSE_EVENT(func) A2D_DECLARE_EVENT_TABLE_ENTRY( wxEVT_CANVASHANDLE_MOUSE_EVENT, wxID_ANY, wxID_ANY, (a2dObjectEventFunction) static_cast < a2dCanvasHandleMouseEventFunction > ( & func ), (wxObject *) NULL ),
00292
00293 #define A2D_EVT_CANVASOBJECT_POPUPMENU_EVENT(func) A2D_DECLARE_EVENT_TABLE_ENTRY( wxEVT_CANVASOBJECT_POPUPMENU_EVENT, wxID_ANY, wxID_ANY, (a2dObjectEventFunction) static_cast < a2dCanvasObjectMouseEventFunction > ( & func ), (wxObject *) NULL ),
00294
00295
00296 #define A2D_EVT_CANVASOBJECT_RESIZE_EVENT(func) A2D_DECLARE_EVENT_TABLE_ENTRY( wxEVT_CANVASOBJECT_RESIZE_EVENT, wxID_ANY, wxID_ANY, (a2dObjectEventFunction) static_cast < a2dCanvasObjectEventFunction > ( & func ), (wxObject *) NULL ),
00297
00298
00299
00300 typedef unsigned int a2dCursorId;
00301 typedef unsigned int a2dImageId;
00302
00303 A2DCANVASDLLEXP extern const a2dCursorId a2dCURSOR_NONE;
00304 A2DCANVASDLLEXP extern const a2dCursorId a2dCURSOR_ARROW;
00305 A2DCANVASDLLEXP extern const a2dCursorId a2dCURSOR_RIGHT_ARROW;
00306 A2DCANVASDLLEXP extern const a2dCursorId a2dCURSOR_BULLSEYE;
00307 A2DCANVASDLLEXP extern const a2dCursorId a2dCURSOR_CHAR;
00308 A2DCANVASDLLEXP extern const a2dCursorId a2dCURSOR_CROSS;
00309 A2DCANVASDLLEXP extern const a2dCursorId a2dCURSOR_HAND;
00310 A2DCANVASDLLEXP extern const a2dCursorId a2dCURSOR_IBEAM;
00311 A2DCANVASDLLEXP extern const a2dCursorId a2dCURSOR_LEFT_BUTTON;
00312 A2DCANVASDLLEXP extern const a2dCursorId a2dCURSOR_MAGNIFIER;
00313 A2DCANVASDLLEXP extern const a2dCursorId a2dCURSOR_MIDDLE_BUTTON;
00314 A2DCANVASDLLEXP extern const a2dCursorId a2dCURSOR_NO_ENTRY;
00315 A2DCANVASDLLEXP extern const a2dCursorId a2dCURSOR_PAINT_BRUSH;
00316 A2DCANVASDLLEXP extern const a2dCursorId a2dCURSOR_PENCIL;
00317 A2DCANVASDLLEXP extern const a2dCursorId a2dCURSOR_POINT_LEFT;
00318 A2DCANVASDLLEXP extern const a2dCursorId a2dCURSOR_POINT_RIGHT;
00319 A2DCANVASDLLEXP extern const a2dCursorId a2dCURSOR_QUESTION_ARROW;
00320 A2DCANVASDLLEXP extern const a2dCursorId a2dCURSOR_RIGHT_BUTTON;
00321 A2DCANVASDLLEXP extern const a2dCursorId a2dCURSOR_SIZENESW;
00322 A2DCANVASDLLEXP extern const a2dCursorId a2dCURSOR_SIZENS;
00323 A2DCANVASDLLEXP extern const a2dCursorId a2dCURSOR_SIZENWSE;
00324 A2DCANVASDLLEXP extern const a2dCursorId a2dCURSOR_SIZEWE;
00325 A2DCANVASDLLEXP extern const a2dCursorId a2dCURSOR_SIZING;
00326 A2DCANVASDLLEXP extern const a2dCursorId a2dCURSOR_SPRAYCAN;
00327 A2DCANVASDLLEXP extern const a2dCursorId a2dCURSOR_WAIT;
00328 A2DCANVASDLLEXP extern const a2dCursorId a2dCURSOR_WATCH;
00329 A2DCANVASDLLEXP extern const a2dCursorId a2dCURSOR_BLANK;
00330 A2DCANVASDLLEXP extern const a2dCursorId a2dCURSOR_ARROWWAIT;
00331
00332 A2DCANVASDLLEXP extern const a2dCursorId a2dCURSOR_Select;
00333 A2DCANVASDLLEXP extern const a2dCursorId a2dCURSOR_Zoom;
00334 A2DCANVASDLLEXP extern const a2dCursorId a2dCURSOR_Drag;
00335 A2DCANVASDLLEXP extern const a2dCursorId a2dCURSOR_Move;
00336 A2DCANVASDLLEXP extern const a2dCursorId a2dCURSOR_Copy;
00337 A2DCANVASDLLEXP extern const a2dCursorId a2dCURSOR_DrawWire;
00338 A2DCANVASDLLEXP extern const a2dCursorId a2dCURSOR_EditWire;
00339 A2DCANVASDLLEXP extern const a2dCursorId a2dCURSOR_EditWireVertex;
00340 A2DCANVASDLLEXP extern const a2dCursorId a2dCURSOR_EditWireSegment;
00341 A2DCANVASDLLEXP extern const a2dCursorId a2dCURSOR_EditWireSegmentHorizontal;
00342 A2DCANVASDLLEXP extern const a2dCursorId a2dCURSOR_EditWireSegmentVertical;
00343 A2DCANVASDLLEXP extern const a2dCursorId a2dCURSOR_WireSegmentInsert;
00344 A2DCANVASDLLEXP extern const a2dCursorId a2dCURSOR_Edit;
00345 A2DCANVASDLLEXP extern const a2dCursorId a2dCURSOR_EditVertex;
00346 A2DCANVASDLLEXP extern const a2dCursorId a2dCURSOR_EditSegment;
00347 A2DCANVASDLLEXP extern const a2dCursorId a2dCURSOR_EditSegmentHorizontal;
00348 A2DCANVASDLLEXP extern const a2dCursorId a2dCURSOR_EditSegmentVertical;
00349 A2DCANVASDLLEXP extern const a2dCursorId a2dCURSOR_SegmentInsert;
00350
00351 A2DCANVASDLLEXP extern const a2dImageId a2dBitmap_EditRectangleFill;
00352
00353
00354 class A2DCANVASDLLEXP a2dArtProvider : public wxObject
00355 {
00356 public:
00357
00358 a2dArtProvider();
00359
00360 ~a2dArtProvider();
00361
00362 virtual wxCursor& GetCursor( a2dCursorId id );
00363
00364 virtual wxBitmap& GetImage( a2dImageId id );
00365
00366
00367 map<a2dCursorId,wxCursor> m_cursorsLoaded;
00368
00369
00370 map<a2dImageId,wxBitmap> m_imageLoaded;
00371
00372 };
00373
00374
00375
00376
00377
00378
00379
00380
00381
00382 class A2DCANVASDLLEXP a2dCanvasGlobal: public a2dGeneralGlobal
00383 {
00384
00385 DECLARE_CLASS(a2dCanvasGlobal)
00386
00387 public:
00388 a2dCanvasGlobal();
00389 virtual ~a2dCanvasGlobal();
00390
00391
00392
00393
00394
00395
00396 virtual void SetupReservedLayers();
00397
00398 wxPoint m_initialDocChildFramePos;
00399 wxSize m_initialDocChildFrameSize;
00400 long m_initialDocChildFrameStyle;
00401 long m_initialWorldCanvasStyle;
00402
00403 bool WINDINGRULE;
00404
00405
00406 double USERUNITS();
00407
00408 double PHYSUNITS();
00409
00410
00411 void USERUNITS(double userunit);
00412
00413 void PHYSUNITS(double physicalunit);
00414
00415
00416 double ENTRYUNITS();
00417
00418 double POLYTOARCRMIN();
00419 double POLYTOARCRMAX();
00420 double POLYTOARCABER();
00421
00422 double ARCTOPOLYABER();
00423
00424 double ACCUR();
00425
00426
00427
00428
00429
00430
00431
00432 a2dLayers* GetLayerSetup() { return m_layersetup; }
00433
00434
00435
00436
00437 void SetLayerSetup( a2dLayers* layersetup );
00438
00439
00440
00441 bool LoadLayers( const wxString& filename );
00442
00443
00444 void SetPin( a2dPin* newpin );
00445
00446
00447 a2dPin* GetPin();
00448
00449
00450 void SetPinCanConnect( a2dPin* newpin );
00451
00452
00453
00454 a2dPin* GetPinCanConnect();
00455
00456
00457 void SetPinCannotConnect( a2dPin* newpin );
00458
00459
00460
00461 a2dPin* GetPinCannotConnect();
00462
00463
00464 void SetHandle( a2dHandle* newhandle );
00465
00466
00467 a2dHandle* GetHandle();
00468
00469
00470 a2dText* GetPropertyText();
00471
00472
00473 a2dStroke& GetHighLightStroke();
00474
00475
00476 a2dFill& GetHighLightFill();
00477
00478
00479 void SetHighLightStroke( const a2dStroke& stroke );
00480
00481
00482 void SetHighLightFill( const a2dFill& fill );
00483
00484
00485 a2dStroke& GetSelectStroke();
00486
00487
00488 a2dFill& GetSelectFill();
00489
00490
00491 void SetSelectStroke( const a2dStroke& stroke );
00492
00493
00494 void SetSelectFill( const a2dFill& fill );
00495
00496
00497 void SetSelectDrawStyle( a2dDocumentRenderStyle drawstyle ) { m_SelectDrawStyle = drawstyle; }
00498
00499
00500 a2dDocumentRenderStyle GetSelectDrawStyle() const { return m_SelectDrawStyle; }
00501
00502
00503 void SetRestrictionEngine( a2dRestrictionEngine *restrict ) { m_restrictionEngine = restrict; }
00504
00505
00506 a2dRestrictionEngine *GetRestrictionEngine();
00507
00508
00509 void SetConnectionGenerator( a2dConnectionGenerator *connectionGenerator ) { m_connectionGenerator = connectionGenerator; };
00510
00511
00512 a2dConnectionGenerator* GetConnectionGenerator() const { return m_connectionGenerator; }
00513
00514
00515
00516
00517
00518
00519
00520 wxUint16 GetHitMarginDevice() const { return m_hitmargin_device; }
00521
00522
00523
00524 void SetHitMarginDevice( wxUint16 val ) { m_hitmargin_device = val; }
00525
00526
00527
00528
00529 double GetHitMarginWorld() const { return m_hitmargin_world; }
00530
00531
00532
00533 void SetHitMarginWorld( double val ) { m_hitmargin_world = val; }
00534
00535
00536 double GetCopyMinDistance() const { return m_copymindistance; }
00537
00538
00539 void SetCopyMinDistance( double val ) { m_copymindistance = val; }
00540
00541
00542
00543
00544
00545 double GetCoordinateEpsilon() const { return m_coordinateepsilon; }
00546
00547
00548 void SetCoordinateEpsilon( double val ) { m_coordinateepsilon = val; }
00549
00550
00551 void SetReverseOrder(bool reverse_order) { m_reverse_order = reverse_order; }
00552
00553
00554 bool GetReverseOrder() const { return m_reverse_order; }
00555
00556
00557 void SetRouteOneLine( bool oneLine ) { m_oneLine = oneLine; }
00558
00559
00560 bool GetRouteOneLine() const { return m_oneLine; }
00561
00562
00563 a2dPathList& GetLayersPathList() const { return m_layersPath; }
00564
00565 a2dArtProvider& GetArtProvider() { return m_artProvider; }
00566
00567 void SetArtProvider( a2dArtProvider& artProvider ) { m_artProvider = artProvider; }
00568
00569 wxCursor& GetCursor( a2dCursorId id ) { return m_artProvider.GetCursor( id ); }
00570
00571 private:
00572
00573 a2dArtProvider m_artProvider;
00574
00575 static a2dPathList m_layersPath;
00576
00577
00578 a2dSmrtPtr<a2dLayers> m_layersetup;
00579
00580 a2dPinPtr m_defPin;
00581 a2dPinPtr m_defCanConnectPin;
00582 a2dPinPtr m_defCannotConnectPin;
00583
00584 a2dHandlePtr m_defHandle;
00585
00586 a2dSmrtPtr<a2dText> m_propertytext;
00587
00588 double m_userunits;
00589 double m_physicalunits;
00590 double m_default_acc;
00591 double m_displayaberration;
00592 double m_arc2polyaber;
00593 double m_poly2arcMin;
00594 double m_poly2arcMax;
00595 double m_poly2arcAber;
00596
00597
00598 a2dStroke m_HighLightStroke;
00599
00600
00601 a2dFill m_HighLightFill;
00602
00603
00604 a2dStroke m_SelectStroke;
00605
00606
00607 a2dFill m_SelectFill;
00608
00609
00610 a2dDocumentRenderStyle m_SelectDrawStyle;
00611
00612
00613 a2dRestrictionEnginePtr m_restrictionEngine;
00614
00615
00616 a2dConnectionGeneratorPtr m_connectionGenerator;
00617
00618
00619
00620
00621
00622
00623
00624 wxUint16 m_hitmargin_device;
00625
00626
00627
00628
00629 double m_hitmargin_world;
00630
00631
00632 double m_copymindistance;
00633
00634
00635 double m_coordinateepsilon;
00636
00637
00638 bool m_reverse_order;
00639
00640
00641 bool m_oneLine;
00642
00643 public:
00644
00645 static const a2dPropertyIdPathList PROPID_layerPathList;
00646
00647 public:
00648
00649
00650 a2dDocumentCommandProcessor* GetDocviewCommandProcessor() const
00651 { return m_a2dDocviewGlobal->GetDocviewCommandProcessor(); }
00652
00653
00654 void SetDocviewCommandProcessor( a2dDocumentCommandProcessor* docviewCommandProcessor )
00655 { m_a2dDocviewGlobal->SetDocviewCommandProcessor( docviewCommandProcessor ); }
00656
00657 private:
00658
00659 a2dDocviewGlobal* m_a2dDocviewGlobal;
00660
00661 };
00662
00663
00664 A2DCANVASDLLEXP_DATA( extern a2dCanvasGlobal* ) a2dCanvasGlobals;
00665
00666
00667
00668
00669
00670
00671
00672 typedef void (a2dEvtHandler::*a2dCanvasObjectTimerEventFunction)(wxTimerEvent&);
00673
00674
00675
00676
00677
00678
00679 #define A2D_EVT_CANVASOBJECT_TIMER(timerid, func) \
00680 A2D_DECLARE_EVENT_TABLE_ENTRY( wxEVT_TIMER, timerid, -1, (a2dObjectEventFunction) wxStaticCastEvent( a2dCanvasObjectTimerEventFunction, & func ), NULL),
00681
00682
00683
00684
00685
00686
00687
00688 class a2dTimer : public wxTimer
00689 {
00690 public:
00691
00692 a2dTimer()
00693 {
00694 Init();
00695 m_canvasObjectOwner = NULL; m_id = 0;
00696 }
00697
00698
00699
00700
00701
00702
00703 a2dTimer( a2dEvtHandler *owner, int id = -1 )
00704 {
00705 m_canvasObjectOwner = owner;
00706 m_id = id;
00707 }
00708
00709
00710
00711
00712
00713
00714 void SetOwner(a2dEvtHandler *owner, int id = -1)
00715 {
00716 m_canvasObjectOwner = owner;
00717 m_id = id;
00718 }
00719
00720
00721
00722 virtual void Notify()
00723 {
00724 wxCHECK_RET( m_canvasObjectOwner, _T("a2dTimer::Notify() should be overridden.") );
00725
00726 #if !wxCHECK_VERSION(2,9,0)
00727 wxTimerEvent event( m_id, m_milli );
00728 #else
00729 wxTimerEvent event( *this );
00730 #endif
00731 m_canvasObjectOwner->ProcessEvent(event);
00732 }
00733
00734 protected:
00735
00736 unsigned long m_id;
00737 a2dEvtHandler *m_canvasObjectOwner;
00738 };
00739
00740
00741 #endif