Main Page   Compound List   File List   Compound Members  

TransferFunctionEditorWindow.h

00001 #if !defined(AFX_TRANSFERFUNCTIONEDITORWINDOW_H__AF86700E_3536_4440_AB2D_79855D9FEA4A__INCLUDED_)
00002 #define AFX_TRANSFERFUNCTIONEDITORWINDOW_H__AF86700E_3536_4440_AB2D_79855D9FEA4A__INCLUDED_
00003 
00004 #if _MSC_VER > 1000
00005 #pragma once
00006 #endif // _MSC_VER > 1000
00007 // TransferFunctionEditorWindow.h : header file
00008 //
00009 
00010 #include "TransferFunction.h"
00011 
00012 #define TFEDITOR_GRADIENT_TRIANGLE_SIZE 5
00013 
00015 // TransferFunctionEditorWindow frame
00016 
00017 class TransferFunctionEditorWindow : public CFrameWnd
00018 {
00019 /*
00020         DECLARE_DYNCREATE(TransferFunctionEditorWindow)
00021 protected: 
00022         TransferFunctionEditorWindow();           // protected constructor used by dynamic creation
00023 */
00024 public:
00025         TransferFunctionEditorWindow();           // ordinary constructor
00026 
00027 // Attributes
00028 public:
00029         HDC m_hgldc;              // GDI Device Context
00030         HGLRC m_hglRC;          // Rendering Context
00031 
00032 // Operations
00033 public:
00034         void SetHistogramDataIndex(int index);
00035 
00036         virtual BOOL PreCreateWindow( CREATESTRUCT& cs );
00037         BOOL SetPixelformat(HDC hdc); 
00038         int InitGL(void);
00039         void ReSizeGLScene(int width, int height);
00040         int DrawGLScene(void);
00041 
00042     TransferFunction *tf;
00043 // Overrides
00044         // ClassWizard generated virtual function overrides
00045         //{{AFX_VIRTUAL(TransferFunctionEditorWindow)
00046         //}}AFX_VIRTUAL
00047 
00048 // Implementation
00049 protected:
00050         virtual ~TransferFunctionEditorWindow();
00051 
00052   // Generated message map functions
00053         //{{AFX_MSG(TransferFunctionEditorWindow)
00054           afx_msg void OnPaint();
00055           afx_msg int  OnCreate(LPCREATESTRUCT lpCreateStruct);
00056           afx_msg void OnSize(UINT nType, int cx, int cy );
00057           afx_msg BOOL OnEraseBkgnd( CDC* pDC );
00058           afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
00059           afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
00060           afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
00061           afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
00062           afx_msg void OnRButtonUp(UINT nFlags, CPoint point);
00063           afx_msg void OnMouseMove( UINT nFlags, CPoint point );
00064         afx_msg void OnTransferfunctionLoad();
00065         afx_msg void OnTransferfunctionSave();
00066         //}}AFX_MSG
00067         DECLARE_MESSAGE_MAP()
00068 private:
00069     CMenu menu;
00070         CPoint dragStart;
00071         TransferPoint* dragPoint;
00072         TransferPoint* findNearestTFPoint(CPoint point);
00073 
00074         int drawTransferFunction();
00075         int drawHistogram();
00076 
00077     CFlowVisApp* m_App;
00078         int m_windowWidth;
00079         int m_windowHeight;
00080     bool m_draggingPosition;
00081         double histogramColor[3];
00082         double histogramBGColor[3];
00083     int m_HistogramDataIndex;
00084 };
00085 
00087 
00088 //{{AFX_INSERT_LOCATION}}
00089 // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
00090 
00091 #endif // !defined(AFX_TRANSFERFUNCTIONEDITORWINDOW_H__AF86700E_3536_4440_AB2D_79855D9FEA4A__INCLUDED_)

Generated on Wed Jan 21 13:19:24 2004 for FlowVis by doxygen1.2.18