1 #ifndef SOWIN_GLWIDGET_H 2 #define SOWIN_GLWIDGET_H 38 #include <Inventor/SbBasic.h> 39 #include <Inventor/Win/SoWinBasic.h> 40 #include <Inventor/Win/SoWinComponent.h> 44 #endif // __COIN_SOQT__ 57 #define COIN_DEFINED_BOOL 60 #define INT32 tempint32 61 #define COIN_DEFINED_INT32 68 #ifdef COIN_DEFINED_BOOL 70 #undef COIN_DEFINED_BOOL 72 #ifdef COIN_DEFINED_INT32 74 #undef COIN_DEFINED_INT32 76 #endif // __COIN_SOXT__ 79 #endif // __COIN_SOGTK__ 84 SO_GL_RGB = 0x01, SO_GLX_RGB = SO_GL_RGB,
85 SO_GL_DOUBLE = 0x02, SO_GLX_DOUBLE = SO_GL_DOUBLE,
86 SO_GL_ZBUFFER = 0x04, SO_GLX_ZBUFFER = SO_GL_ZBUFFER,
87 SO_GL_OVERLAY = 0x08, SO_GLX_OVERLAY = SO_GL_OVERLAY,
88 SO_GL_STEREO = 0x10, SO_GLX_STEREO = SO_GL_STEREO
98 void setBorder(
const SbBool enable);
99 SbBool isBorder(
void)
const;
101 virtual void setDoubleBuffer(
const SbBool enable);
102 SbBool isDoubleBuffer(
void)
const;
104 void setDrawToFrontBufferEnable(
const SbBool enable);
105 SbBool isDrawToFrontBufferEnable(
void)
const;
107 void setQuadBufferStereo(
const SbBool enable);
108 SbBool isQuadBufferStereo(
void)
const;
110 void setAccumulationBuffer(
const SbBool enable);
111 SbBool getAccumulationBuffer(
void)
const;
113 void setStencilBuffer(
const SbBool enable);
114 SbBool getStencilBuffer(
void)
const;
116 void setAlphaChannel(
const SbBool enable);
117 SbBool getAlphaChannel(
void)
const;
119 void setOverlayRender(
const SbBool onoff);
120 SbBool isOverlayRender(
void)
const;
122 void setSampleBuffers(
const int numsamples);
123 int getSampleBuffers(
void)
const;
125 void setStealFocus(SbBool enable);
126 SbBool isStealFocus(
void)
const;
128 HWND getGLWidget(
void)
const;
129 HWND getNormalWidget(
void)
const;
130 HWND getOverlayWidget(
void)
const;
132 SbBool hasOverlayGLArea(
void)
const;
133 SbBool hasNormalGLArea(
void)
const;
135 unsigned long getOverlayTransparentPixel(
void);
138 void getPointSizeLimits(
SbVec2f & range,
float & granularity);
139 void getLineWidthLimits(
SbVec2f & range,
float & granularity);
143 const char *
const name = NULL,
144 const SbBool embed = TRUE,
145 const int glmodes = SO_GL_RGB,
146 const SbBool build = TRUE);
149 virtual void processEvent(MSG* event);
151 HWND buildWidget(HWND parent);
153 virtual void redraw(
void) = 0;
154 virtual void redrawOverlay(
void);
156 virtual void initGraphic(
void);
157 virtual void initOverlayGraphic(
void);
160 virtual void widgetChanged(HWND w);
162 void setGLSize(
const SbVec2s size);
164 float getGLAspectRatio(
void)
const;
171 void setStereoBuffer(SbBool flag);
172 SbBool isStereoBuffer(
void)
const;
174 SbBool isRGBMode(
void);
179 void glLockNormal(
void);
180 void glUnlockNormal(
void);
182 void glLockOverlay(
void);
183 void glUnlockOverlay(
void);
185 void glSwapBuffers(
void);
186 void glFlushBuffer(
void);
188 virtual SbBool glScheduleRedraw(
void);
191 class SoWinGLWidgetP * pimpl;
192 friend class SoGuiGLWidgetP;
193 friend class SoWinGLWidgetP;
199 GLXContext getNormalContext(
void);
200 GLXContext getOverlayContext(
void);
202 Window getNormalWindow(
void);
203 Window getOverlayWindow(
void);
205 int getOverlayColorMapSize(
void);
206 int getColorMapSize(
void);
208 virtual void setNormalVisual(XVisualInfo * visual);
209 XVisualInfo * getNormalVisual(
void);
210 virtual void setOverlayVisual(XVisualInfo * visual);
211 XVisualInfo * getOverlayVisual(
void);
214 static void eventHandler(Widget, SoXtGLWidget *, XAnyEvent *, Boolean *);
216 int getDisplayListShareGroup(GLXContext context);
217 Widget getGlxMgrWidget(
void);
218 #endif // __COIN_SOXT__ 220 #ifdef __COIN_SOGTK__ 222 virtual SbBool eventFilter(GtkWidget *
object, GdkEvent * event);
223 #endif // __COIN_SOGTK__ 229 #endif // ! SOWIN_GLWIDGET_H
virtual void sizeChanged(const SbVec2s &size)
Definition: SoWinComponent.cpp:597
The SoWinComponent class is the base class for all GUI components.
Definition: SoWinComponent.h:63