1 // OGLVIEW_WCL.H : write a short description here...
2 
3 // Copyright (C) 2005 Tommi Hassinen.
4 
5 // This package is free software; you can redistribute it and/or modify
6 // it under the terms of the GNU General Public License as published by
7 // the Free Software Foundation; either version 2 of the License, or
8 // (at your option) any later version.
9 
10 // This package is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
14 
15 // You should have received a copy of the GNU General Public License
16 // along with this package; if not, write to the Free Software
17 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18 
19 /*################################################################################################*/
20 
21 #include "ghemicalconfig2.h"
22 
23 #ifndef OGLVIEW_WCL_H
24 #define OGLVIEW_WCL_H
25 
26 class oglview_wcl;
27 
28 #include <ghemical/typedef.h>
29 
30 #include "pangofont_wcl.h"
31 #include "custom_camera.h"
32 #include "project.h"
33 
34 /*################################################################################################*/
35 
36 class oglview_wcl :
37 	public pangofont_wcl
38 {
39 	protected:
40 
41 	custom_camera * ccam;
42 	i32s my_wnd_number;
43 
44 	i32s render; i32s label;
45 	color_mode * colormode;
46 
47 	iGLu * select_buffer;
48 
49 	bool enable_fog;
50 	bool accumulate;
51 
52 	static bool quick_update;	// some static flags...
53 	static bool draw_info;		// some static flags...
54 
55 	float animX;
56 	float animY;
57 
58 	friend class custom_camera;
59 	friend class project;
60 
61 	friend class gtk_app;
62 	friend class gtk_project;
63 	friend class gtk_oglview_wnd;	// timer + ???
64 
65 	friend class w32_app;
66 	friend class w32_project;
67 	friend class w32_oglview_wnd;	// ???
68 	friend class w32_wnd;		// timer
69 
70 	public:
71 
72 	enum pmode { DoNotPick = 0, pDraw = 1, pErase = 2, pSelect = 3, pMeasure = 4 };
73 
74 	oglview_wcl(custom_camera *);
75 	virtual ~oglview_wcl(void);
76 
77 	custom_camera * GetCCam(void);
78 
79 	void GetCRD(i32s *, fGL *);
80 
81 	void ButtonEvent(int, int);		// virtual
82 	void MotionEvent(int, int);		// virtual
83 
84 	void UpdateWnd(void);			// virtual
85 
86 // here we sometimes need to pass extra parameters to UpdateWnd().
87 // but UpdateWnd() is defined at liboglappth and so it should be as
88 // universal as possible -> make a separate method with extra params.
89 
90 	void MyUpdateWnd(pmode = DoNotPick, int = 0, int = 0);
91 
92 	void InitGL(void);			// virtual
93 	void RenderGL(rmode);			// virtual
94 };
95 
96 /*################################################################################################*/
97 
98 #endif	// OGLVIEW_WCL_H
99 
100 // eof
101