fixed: gcc8 compile issues
[opensg.git] / Source / Contrib / ComplexSceneManager / GLUT / OSGCSMGLUTWindow.h
blob5c7dc52be1fb9396e37327b2f44837f3d360bb86
1 /*---------------------------------------------------------------------------*\
2 * OpenSG *
3 * *
4 * *
5 * Copyright (C) 2000-2006 by the OpenSG Forum *
6 * *
7 * www.opensg.org *
8 * *
9 * contact: dirk@opensg.org, gerrit.voss@vossg.org, jbehr@zgdv.de *
10 * *
11 \*---------------------------------------------------------------------------*/
12 /*---------------------------------------------------------------------------*\
13 * License *
14 * *
15 * This library is free software; you can redistribute it and/or modify it *
16 * under the terms of the GNU Library General Public License as published *
17 * by the Free Software Foundation, version 2. *
18 * *
19 * This library is distributed in the hope that it will be useful, but *
20 * WITHOUT ANY WARRANTY; without even the implied warranty of *
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
22 * Library General Public License for more details. *
23 * *
24 * You should have received a copy of the GNU Library General Public *
25 * License along with this library; if not, write to the Free Software *
26 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *
27 * *
28 \*---------------------------------------------------------------------------*/
29 /*---------------------------------------------------------------------------*\
30 * Changes *
31 * *
32 * *
33 * *
34 * *
35 * *
36 * *
37 \*---------------------------------------------------------------------------*/
39 #ifndef _OSGCSMGLUTWINDOW_H_
40 #define _OSGCSMGLUTWINDOW_H_
41 #ifdef __sgi
42 #pragma once
43 #endif
45 #include "OSGCSMGLUTWindowBase.h"
46 #include "OSGCSMDrawer.h"
48 OSG_BEGIN_NAMESPACE
50 /*! \brief CSMGLUTWindow class. See \ref
51 PageContribCSMCSMGLUTWindow for a description.
54 class OSG_CONTRIBCSM_DLLMAPPING CSMGLUTWindow : public CSMGLUTWindowBase
56 protected:
58 /*========================== PUBLIC =================================*/
60 public:
62 typedef CSMGLUTWindowBase Inherited;
63 typedef CSMGLUTWindow Self;
65 /*---------------------------------------------------------------------*/
66 /*! \name Sync */
67 /*! \{ */
69 virtual void changed(ConstFieldMaskArg whichField,
70 UInt32 origin,
71 BitVector details );
73 /*! \} */
74 /*---------------------------------------------------------------------*/
75 /*! \name Output */
76 /*! \{ */
78 virtual bool init(void);
80 /*! \} */
81 /*---------------------------------------------------------------------*/
82 /*! \name Output */
83 /*! \{ */
85 virtual void dump( UInt32 uiIndent = 0,
86 const BitVector bvFlags = 0) const;
88 /*! \} */
89 /*========================= PROTECTED ===============================*/
91 protected:
93 // Variables should all be in CSMGLUTWindowBase.
95 static bool _bGLUTInitialized;
96 static CSMGLUTWindow *_pGLUTWindow;
98 Int32 _iGlutWinId;
100 /*---------------------------------------------------------------------*/
101 /*! \name Constructors */
102 /*! \{ */
104 CSMGLUTWindow(void);
105 CSMGLUTWindow(const CSMGLUTWindow &source);
107 /*! \} */
108 /*---------------------------------------------------------------------*/
109 /*! \name Destructors */
110 /*! \{ */
112 virtual ~CSMGLUTWindow(void);
114 /*! \} */
115 /*---------------------------------------------------------------------*/
116 /*! \name Init */
117 /*! \{ */
119 virtual void terminateGLContext(void);
121 /*! \} */
122 /*---------------------------------------------------------------------*/
123 /*! \name Init */
124 /*! \{ */
126 static void initMethod(InitPhase ePhase);
128 /*! \} */
129 /*---------------------------------------------------------------------*/
130 /*! \name Init */
131 /*! \{ */
133 static void csmGlutKeyHandler (UChar8 key,
134 Int32,
135 Int32 );
137 static void csmGlutReshapeHandler (Int32 w,
138 Int32 h );
140 static void csmGlutFrameHandler (void );
142 static void csmGlutMouseHandler (Int32 iButton,
143 Int32 iState,
144 Int32 x,
145 Int32 y );
147 static void csmGlutMouseMotionHandler(Int32 x,
148 Int32 y );
150 /*! \} */
151 /*========================== PRIVATE ================================*/
153 private:
155 friend class FieldContainer;
156 friend class CSMGLUTWindowBase;
158 // prohibit default functions (move to 'public' if you need one)
159 void operator =(const CSMGLUTWindow &source);
162 typedef CSMGLUTWindow *CSMGLUTWindowP;
164 OSG_END_NAMESPACE
166 #include "OSGCSMGLUTWindowBase.inl"
167 #include "OSGCSMGLUTWindow.inl"
169 #endif /* _OSGCSMGLUTWINDOW_H_ */