00001 #ifndef TRAFUCTRLEVENT_H 00002 #define TRAFUCTRLEVENT_H 00003 00004 #include "trafupoint.h" 00005 00006 #include <wx/event.h> 00007 00009 class wxTransferFunctionEvent: public wxCommandEvent { 00010 DECLARE_DYNAMIC_CLASS(wxTransferFunctionEvent) 00011 public: 00013 wxTransferFunctionEvent(wxEventType commandType = wxEVT_NULL, int id = 0) : 00014 wxCommandEvent(commandType, id) 00015 { 00016 } 00017 00019 wxTransferFunctionEvent(const wxTransferFunctionEvent &event) 00020 : wxCommandEvent(event) 00021 { 00022 } 00023 00025 virtual wxEvent *Clone() const 00026 { 00027 return new wxTransferFunctionEvent(*this); 00028 } 00029 }; 00030 00031 00032 typedef void (wxEvtHandler::*wxTransferFunctionEventFunction)(wxTransferFunctionEvent&); 00033 00034 BEGIN_DECLARE_EVENT_TYPES() 00035 DECLARE_EVENT_TYPE(wxEVT_COMMAND_TRANSFERFUNCTION_CHANGED, 801) 00036 END_DECLARE_EVENT_TYPES() 00037 00038 #define EVT_TRANSFERFUNCTION_CHANGED(id, fn) \ 00039 DECLARE_EVENT_TABLE_ENTRY(wxEVT_COMMAND_TRANSFERFUNCTION_CHANGED, id, -1,\ 00040 (wxObjectEventFunction) (wxEventFunction) (wxTransferFunctionEventFunction) & fn, (wxObject *) NULL), 00041 00042 #endif // TRAFUCTRLEVENT_H