00001 #ifndef _vuTransferDialog_h_
00002 #define _vuTransferDialog_h_
00003
00004 #include "vuTransferCanvas.h"
00005 #include <wx/dialog.h>
00006 #include <wx/textctrl.h>
00007 #include <wx/wx.h>
00008
00009 #define TFDLG_NLIGHTS 10 // maximum number of lights
00010 #define TFDLG_MAX_INTENSITY 5 // maximal intensity
00011 #define TFDLG_INTENSITY0 2
00012
00014
00036 class vuTransferDialog : public wxDialog
00037 {
00038 public:
00039
00040 enum
00041 {
00042 idCANVAS = 100,
00043 idUPDATE,
00044 idLOADTF,
00045 idSAVETF,
00046 idLAST
00047 };
00048
00050
00056 vuTransferDialog(wxWindow *parent, vuTFDesign &tf);
00057
00059
00063 const vuTFDesign& getTransferFunc() const;
00064
00066 bool isUpdated() {return m_IsUpdated;};
00068 void unsetUpdated() {m_IsUpdated=false;};
00069
00070 protected:
00072 void OnSelect(wxCommandEvent &ev);
00074 void OnOpen(wxCommandEvent &ev);
00076 void OnUpdate(wxCommandEvent &ev);
00078 void OnOK(wxCommandEvent &ev);
00080 void OnLoadTF(wxCommandEvent &ev);
00082 void OnSaveTF(wxCommandEvent &ev);
00085 void OnSlideLight( wxScrollEvent& event);
00087 bool TransferDataToWindow() {return true;};
00089 bool TransferDataFromWindow() {return true;};
00090
00091
00092 virtual void buildCustomSizer() {};
00093
00094 void rebuildCustomSizer();
00095
00096 virtual void editSpecColour(dword id) {};
00097
00098 protected:
00100 void repaintParent() const;
00101
00103 vuTransferCanvas *m_Canvas;
00107 wxBoxSizer *m_CustomSizer, *m_MainSizer;
00108
00110 wxTextCtrl *tInte, *tOpac, *tr, *tg, *tb, *tOpacSmooth, *tColSmooth;
00111
00113 bool m_DoSpectral;
00114
00116 bool m_IsUpdated;
00117
00118 DECLARE_EVENT_TABLE()
00119 };
00120
00121 #endif
00122
00123
00124
00125