MeVisLabToolboxReference
|
00001 #ifndef __SoView2DCallback_H 00002 #define __SoView2DCallback_H 00003 //---------------------------------------------------------------------------------- 00004 // **InsertLicense** code 00005 //---------------------------------------------------------------------------------- 00007 00013 //---------------------------------------------------------------------------------- 00014 00015 #ifndef __SoView2DExtension_H 00016 #include "SoView2DExtension.h" 00017 #endif 00018 00020 typedef bool SoView2DEvalEventCB(void* usrData, SoView2D *dsl, View2DSliceList* slicelist, View2DEvent* ec, View2DEventPhase phase);; 00022 typedef void SoView2DDrawCB(void* usrData, View2DSliceList *dsl, View2DSlice* dslice,int slice); 00023 00024 // deprecated names 00025 #define evalEventCB SoView2DEvalEventCB 00026 #define drawCB SoView2DDrawCB 00027 00030 00038 class SOVIEW2D_API SoView2DCallback : public SoView2DExtension { 00039 00040 SO_NODE_HEADER(SoView2DCallback); 00041 00042 public: 00043 00044 static void initClass(); 00045 00046 SoView2DCallback(); 00047 00049 void setEvalEventCB(SoView2DEvalEventCB* eval, void* usrData); 00051 void setDrawCB(SoView2DDrawCB* draw, void* usrData); 00052 00054 virtual void draw(View2DSliceList *dsl, View2DSlice* dslice,int slice); 00055 00057 virtual bool evalEvent(SoView2D* view2d, View2DSliceList* slicelist, 00058 View2DEvent* ec, View2DEventPhase phase); 00059 00060 private: 00062 SoView2DEvalEventCB* _eval; 00064 void* _evalData; 00065 00067 SoView2DDrawCB* _draw; 00069 void* _drawData; 00070 00071 }; 00072 00073 00074 #endif