FLTK 1.3.3: glut.H Source File

FLTK 1.3.3

- Main Page
- Related Pages
- Modules
- Classes
- Files

- File List
- File Members

glut.H
1 //
2 // "$Id: glut.H 9373 2012-04-22 02:45:09Z fabien $"
3 //
4 // GLUT emulation header file for the Fast Light Tool Kit (FLTK).
5 //
6 // Copyright 1998-2011 by Bill Spitzak and others.
7 //
8 // This library is free software. Distribution and use rights are outlined in
9 // the file "COPYING" which should have been included with this file. If this
10 // file is missing or damaged, see the license at:
11 //
12 // http://www.fltk.org/COPYING.php
13 //
14 // Please report all bugs and problems on the following page:
15 //
16 // http://www.fltk.org/str.php
17 //
18
19 // Emulation of GLUT using fltk.
20
21 // GLUT is Copyright (c) Mark J. Kilgard, 1994, 1995, 1996:
22 // "This program is freely distributable without licensing fees and is
23 // provided without guarantee or warrantee expressed or implied. This
24 // program is -not- in the public domain."
25
26 // Although I have copied the GLUT API, none of my code is based on
27 // any GLUT implementation details and is therefore covered by the LGPL.
28
29 // Commented out lines indicate parts of GLUT that are not emulated.
30
31 #ifndef Fl_glut_H
32 # define Fl_glut_H
33
34 # include "gl.h"
35
36
37 # include "Fl.H"
38 # include "Fl_Gl_Window.H"
39
44 class FL_EXPORT Fl_Glut_Window : public Fl_Gl_Window {
45 void _init();
46 int mouse_down;
47 protected:
48 void draw();
49 void draw_overlay();
50 int handle(int);
51 public: // so the inline functions work
52 int number;
53 int menu[3];
54 void make_current();
55 void (*display)();
56 void (*overlaydisplay)();
57 void (*reshape)(int w, int h);
58 void (*keyboard)(uchar, int x, int y);
59 void (*mouse)(int b, int state, int x, int y);
60 void (*motion)(int x, int y);
61 void (*passivemotion)(int x, int y);
62 void (*entry)(int);
63 void (*visibility)(int);
64 void (*special)(int, int x, int y);
65 Fl_Glut_Window(int w, int h, const char *);
66 Fl_Glut_Window(int x, int y, int w, int h, const char *);
67 ~Fl_Glut_Window();
68 };
69
70 extern FL_EXPORT Fl_Glut_Window *glut_window; // the current window
71 extern FL_EXPORT int glut_menu; // the current menu
72
73 // function pointers that are not per-window:
74 extern FL_EXPORT void (*glut_idle_function)();
75 extern FL_EXPORT void (*glut_menustate_function)(int);
76 extern FL_EXPORT void (*glut_menustatus_function)(int,int,int);
77
79
80 //# define GLUT_API_VERSION This does not match any version of GLUT exactly...
81
82 FL_EXPORT void glutInit(int *argcp, char **argv); // creates first window
83
84 FL_EXPORT void glutInitDisplayMode(unsigned int mode);
85 // the FL_ symbols have the same value as the GLUT ones:
86 # define GLUT_RGB FL_RGB
87 # define GLUT_RGBA FL_RGB
88 # define GLUT_INDEX FL_INDEX
89 # define GLUT_SINGLE FL_SINGLE
90 # define GLUT_DOUBLE FL_DOUBLE
91 # define GLUT_ACCUM FL_ACCUM
92 # define GLUT_ALPHA FL_ALPHA
93 # define GLUT_DEPTH FL_DEPTH
94 # define GLUT_STENCIL FL_STENCIL
95 # define GLUT_MULTISAMPLE FL_MULTISAMPLE
96 # define GLUT_STEREO FL_STEREO
97 // # define GLUT_LUMINANCE 512
98
99 FL_EXPORT void glutInitWindowPosition(int x, int y);
100
101 FL_EXPORT void glutInitWindowSize(int w, int h);
102
103 FL_EXPORT void glutMainLoop();
104
105 FL_EXPORT int glutCreateWindow(char *title);
106 FL_EXPORT int glutCreateWindow(const char *title);
107
108 FL_EXPORT int glutCreateSubWindow(int win, int x, int y, int width, int height);
109
110 FL_EXPORT void glutDestroyWindow(int win);
111
112 inline void glutPostRedisplay() {glut_window->redraw();}
113
114 FL_EXPORT void glutPostWindowRedisplay(int win);
115
116 FL_EXPORT void glutSwapBuffers();
117
118 inline int glutGetWindow() {return glut_window->number;}
119
120 FL_EXPORT void glutSetWindow(int win);
121
122 inline void glutSetWindowTitle(char *t) {glut_window->label(t);}
123
124 inline void glutSetIconTitle(char *t) {glut_window->iconlabel(t);}
125
126 inline void glutPositionWindow(int x, int y) {glut_window->position(x,y);}
127
128 inline void glutReshapeWindow(int w, int h) {glut_window->size(w,h);}
129
130 inline void glutPopWindow() {glut_window->show();}
131
132 inline void glutPushWindow() { /* do nothing */ }
133
134 inline void glutIconifyWindow() {glut_window->iconize();}
135
136 inline void glutShowWindow() {glut_window->show();}
137
138 inline void glutHideWindow() {glut_window->hide();}
139
140 inline void glutFullScreen() {glut_window->fullscreen();}
141
142 inline void glutSetCursor(Fl_Cursor cursor) {glut_window->cursor(cursor);}
143 // notice that the numeric values are different than glut:
144 # define GLUT_CURSOR_RIGHT_ARROW ((Fl_Cursor)2)
145 # define GLUT_CURSOR_LEFT_ARROW ((Fl_Cursor)67)
146 # define GLUT_CURSOR_INFO FL_CURSOR_HAND
147 # define GLUT_CURSOR_DESTROY ((Fl_Cursor)45)
148 # define GLUT_CURSOR_HELP FL_CURSOR_HELP
149 # define GLUT_CURSOR_CYCLE ((Fl_Cursor)26)
150 # define GLUT_CURSOR_SPRAY ((Fl_Cursor)63)
151 # define GLUT_CURSOR_WAIT FL_CURSOR_WAIT
152 # define GLUT_CURSOR_TEXT FL_CURSOR_INSERT
153 # define GLUT_CURSOR_CROSSHAIR FL_CURSOR_CROSS
154 # define GLUT_CURSOR_UP_DOWN FL_CURSOR_NS
155 # define GLUT_CURSOR_LEFT_RIGHT FL_CURSOR_WE
156 # define GLUT_CURSOR_TOP_SIDE FL_CURSOR_N
157 # define GLUT_CURSOR_BOTTOM_SIDE FL_CURSOR_S
158 # define GLUT_CURSOR_LEFT_SIDE FL_CURSOR_W
159 # define GLUT_CURSOR_RIGHT_SIDE FL_CURSOR_E
160 # define GLUT_CURSOR_TOP_LEFT_CORNER FL_CURSOR_NW
161 # define GLUT_CURSOR_TOP_RIGHT_CORNER FL_CURSOR_NE
162 # define GLUT_CURSOR_BOTTOM_RIGHT_CORNER FL_CURSOR_SE
163 # define GLUT_CURSOR_BOTTOM_LEFT_CORNER FL_CURSOR_SW
164 # define GLUT_CURSOR_INHERIT FL_CURSOR_DEFAULT
165 # define GLUT_CURSOR_NONE FL_CURSOR_NONE
166 # define GLUT_CURSOR_FULL_CROSSHAIR FL_CURSOR_CROSS
167
168 inline void glutWarpPointer(int, int) { /* do nothing */ }
169
170 inline void glutEstablishOverlay() {glut_window->make_overlay_current();}
171
172 inline void glutRemoveOverlay() {glut_window->hide_overlay();}
173
174 inline void glutUseLayer(GLenum layer) {
175 layer ? glut_window->make_overlay_current() : glut_window->make_current();}
176 enum {GLUT_NORMAL, GLUT_OVERLAY};
177
178 inline void glutPostOverlayRedisplay() {glut_window->redraw_overlay();}
179
180 inline void glutShowOverlay() {glut_window->redraw_overlay();}
181
182 inline void glutHideOverlay() {glut_window->hide_overlay();}
183
184 FL_EXPORT int glutCreateMenu(void (*)(int));
185
186 FL_EXPORT void glutDestroyMenu(int menu);
187
188 inline int glutGetMenu() {return glut_menu;}
189
190 inline void glutSetMenu(int m) {glut_menu = m;}
191
192 FL_EXPORT void glutAddMenuEntry(char *label, int value);
193
194 FL_EXPORT void glutAddSubMenu(char *label, int submenu);
195
196 FL_EXPORT void glutChangeToMenuEntry(int item, char *labela, int value);
197
198 FL_EXPORT void glutChangeToSubMenu(int item, char *label, int submenu);
199
200 FL_EXPORT void glutRemoveMenuItem(int item);
201
202 inline void glutAttachMenu(int b) {glut_window->menu[b] = glut_menu;}
203
204 inline void glutDetachMenu(int b) {glut_window->menu[b] = 0;}
205
206 inline void glutDisplayFunc(void (*f)()) {glut_window->display = f;}
207
208 inline void glutReshapeFunc(void (*f)(int w, int h)) {glut_window->reshape=f;}
209
210 inline void glutKeyboardFunc(void (*f)(uchar key, int x, int y)) {
211 glut_window->keyboard = f;}
212
213 inline void glutMouseFunc(void (*f)(int b, int state, int x, int y)) {
214 glut_window->mouse = f;}
215 # define GLUT_LEFT_BUTTON 0
216 # define GLUT_MIDDLE_BUTTON 1
217 # define GLUT_RIGHT_BUTTON 2
218 # define GLUT_DOWN 0
219 # define GLUT_UP 1
220
221 inline void glutMotionFunc(void (*f)(int x, int y)) {glut_window->motion= f;}
222
223 inline void glutPassiveMotionFunc(void (*f)(int x, int y)) {
224 glut_window->passivemotion= f;}
225
226 inline void glutEntryFunc(void (*f)(int s)) {glut_window->entry = f;}
227 enum {GLUT_LEFT, GLUT_ENTERED};
228
229 inline void glutVisibilityFunc(void (*f)(int s)) {glut_window->visibility=f;}
230 enum {GLUT_NOT_VISIBLE, GLUT_VISIBLE};
231
232 FL_EXPORT void glutIdleFunc(void (*f)());
233
234 // Warning: this cast may not work on all machines:
235 inline void glutTimerFunc(unsigned int msec, void (*f)(int), int value) {
236 #if defined(__LP64__)
237 Fl::add_timeout(msec*.001, (void (*)(void *))f, (void *) (long long) value);
238 #else
239 Fl::add_timeout(msec*.001, (void (*)(void *))f, (void *)value);
240 #endif
241 }
242
243 inline void glutMenuStateFunc(void (*f)(int state)) {
244 glut_menustate_function = f;}
245
246 inline void glutMenuStatusFunc(void (*f)(int status, int x, int y)) {
247 glut_menustatus_function = f;}
248 enum {GLUT_MENU_NOT_IN_USE, GLUT_MENU_IN_USE};
249
250 inline void glutSpecialFunc(void (*f)(int key, int x, int y)) {
251 glut_window->special = f;}
252 # define GLUT_KEY_F1 1
253 # define GLUT_KEY_F2 2
254 # define GLUT_KEY_F3 3
255 # define GLUT_KEY_F4 4
256 # define GLUT_KEY_F5 5
257 # define GLUT_KEY_F6 6
258 # define GLUT_KEY_F7 7
259 # define GLUT_KEY_F8 8
260 # define GLUT_KEY_F9 9
261 # define GLUT_KEY_F10 10
262 # define GLUT_KEY_F11 11
263 # define GLUT_KEY_F12 12
264 // WARNING: Different values than GLUT uses:
265 # define GLUT_KEY_LEFT FL_Left
266 # define GLUT_KEY_UP FL_Up
267 # define GLUT_KEY_RIGHT FL_Right
268 # define GLUT_KEY_DOWN FL_Down
269 # define GLUT_KEY_PAGE_UP FL_Page_Up
270 # define GLUT_KEY_PAGE_DOWN FL_Page_Down
271 # define GLUT_KEY_HOME FL_Home
272 # define GLUT_KEY_END FL_End
273 # define GLUT_KEY_INSERT FL_Insert
274
275 //inline void glutSpaceballMotionFunc(void (*)(int x, int y, int z));
276
277 //inline void glutSpaceballRotateFunc(void (*)(int x, int y, int z));
278
279 //inline void glutSpaceballButtonFunc(void (*)(int button, int state));
280
281 //inline void glutButtonBoxFunc(void (*)(int button, int state));
282
283 //inline void glutDialsFunc(void (*)(int dial, int value));
284
285 //inline void glutTabletMotionFunc(void (*)(int x, int y));
286
287 //inline void glutTabletButtonFunc(void (*)(int button, int state, int x, int y));
288
289 inline void glutOverlayDisplayFunc(void (*f)()) {
290 glut_window->overlaydisplay = f;}
291
292 //inline void glutWindowStatusFunc(void (*)(int state));
293 //enum {GLUT_HIDDEN, GLUT_FULLY_RETAINED, GLUT_PARTIALLY_RETAINED,
294 // GLUT_FULLY_COVERED};
295
296 //inline void glutSetColor(int, GLfloat red, GLfloat green, GLfloat blue);
297
298 //inline GLfloat glutGetColor(int ndx, int component);
299 //#define GLUT_RED 0
300 //#define GLUT_GREEN 1
301 //#define GLUT_BLUE 2
302
303 //inline void glutCopyColormap(int win);
304
305 // Warning: values are changed from GLUT!
306 // Also relies on the GL_ symbols having values greater than 100
307 FL_EXPORT int glutGet(GLenum type);
308 enum {
309 GLUT_RETURN_ZERO = 0,
310 GLUT_WINDOW_X,
311 GLUT_WINDOW_Y,
312 GLUT_WINDOW_WIDTH,
313 GLUT_WINDOW_HEIGHT,
314 GLUT_WINDOW_PARENT,
315 GLUT_SCREEN_WIDTH,
316 GLUT_SCREEN_HEIGHT,
317 GLUT_MENU_NUM_ITEMS,
318 GLUT_DISPLAY_MODE_POSSIBLE,
319 GLUT_INIT_WINDOW_X,
320 GLUT_INIT_WINDOW_Y,
321 GLUT_INIT_WINDOW_WIDTH,
322 GLUT_INIT_WINDOW_HEIGHT,
323 GLUT_INIT_DISPLAY_MODE,
324 GLUT_WINDOW_BUFFER_SIZE,
325 GLUT_VERSION
326 //GLUT_WINDOW_NUM_CHILDREN,
327 //GLUT_WINDOW_CURSOR,
328 //GLUT_SCREEN_WIDTH_MM,
329 //GLUT_SCREEN_HEIGHT_MM,
330 //GLUT_ELAPSED_TIME,
331 };
332
333 # define GLUT_WINDOW_STENCIL_SIZE GL_STENCIL_BITS
334 # define GLUT_WINDOW_DEPTH_SIZE GL_DEPTH_BITS
335 # define GLUT_WINDOW_RED_SIZE GL_RED_BITS
336 # define GLUT_WINDOW_GREEN_SIZE GL_GREEN_BITS
337 # define GLUT_WINDOW_BLUE_SIZE GL_BLUE_BITS
338 # define GLUT_WINDOW_ALPHA_SIZE GL_ALPHA_BITS
339 # define GLUT_WINDOW_ACCUM_RED_SIZE GL_ACCUM_RED_BITS
340 # define GLUT_WINDOW_ACCUM_GREEN_SIZE GL_ACCUM_GREEN_BITS
341 # define GLUT_WINDOW_ACCUM_BLUE_SIZE GL_ACCUM_BLUE_BITS
342 # define GLUT_WINDOW_ACCUM_ALPHA_SIZE GL_ACCUM_ALPHA_BITS
343 # define GLUT_WINDOW_DOUBLEBUFFER GL_DOUBLEBUFFER
344 # define GLUT_WINDOW_RGBA GL_RGBA
345 # define GLUT_WINDOW_COLORMAP_SIZE GL_INDEX_BITS
346 # ifdef GL_SAMPLES_SGIS
347 # define GLUT_WINDOW_NUM_SAMPLES GL_SAMPLES_SGIS
348 # else
349 # define GLUT_WINDOW_NUM_SAMPLES GLUT_RETURN_ZERO
350 # endif
351 # define GLUT_WINDOW_STEREO GL_STEREO
352
353 # define GLUT_HAS_KEYBOARD 600
354 # define GLUT_HAS_MOUSE 601
355 # define GLUT_HAS_SPACEBALL 602
356 # define GLUT_HAS_DIAL_AND_BUTTON_BOX 603
357 # define GLUT_HAS_TABLET 604
358 # define GLUT_NUM_MOUSE_BUTTONS 605
359 # define GLUT_NUM_SPACEBALL_BUTTONS 606
360 # define GLUT_NUM_BUTTON_BOX_BUTTONS 607
361 # define GLUT_NUM_DIALS 608
362 # define GLUT_NUM_TABLET_BUTTONS 609
363 FL_EXPORT int glutDeviceGet(GLenum type);
364
365 // WARNING: these values are different than GLUT uses:
366 # define GLUT_ACTIVE_SHIFT FL_SHIFT
367 # define GLUT_ACTIVE_CTRL FL_CTRL
368 # define GLUT_ACTIVE_ALT FL_ALT
369 inline int glutGetModifiers() {return Fl::event_state() & (GLUT_ACTIVE_SHIFT | GLUT_ACTIVE_CTRL | GLUT_ACTIVE_ALT);}
370
371 FL_EXPORT int glutLayerGet(GLenum);
372 # define GLUT_OVERLAY_POSSIBLE 800
373 //#define GLUT_LAYER_IN_USE 801
374 //#define GLUT_HAS_OVERLAY 802
375 # define GLUT_TRANSPARENT_INDEX 803
376 # define GLUT_NORMAL_DAMAGED 804
377 # define GLUT_OVERLAY_DAMAGED 805
378
379 extern "C" {
380 typedef void (*GLUTproc)();
381 }
382
383 FL_EXPORT GLUTproc glutGetProcAddress(const char *procName);
384
385 //inline int glutVideoResizeGet(GLenum param);
386 //#define GLUT_VIDEO_RESIZE_POSSIBLE 900
387 //#define GLUT_VIDEO_RESIZE_IN_USE 901
388 //#define GLUT_VIDEO_RESIZE_X_DELTA 902
389 //#define GLUT_VIDEO_RESIZE_Y_DELTA 903
390 //#define GLUT_VIDEO_RESIZE_WIDTH_DELTA 904
391 //#define GLUT_VIDEO_RESIZE_HEIGHT_DELTA 905
392 //#define GLUT_VIDEO_RESIZE_X 906
393 //#define GLUT_VIDEO_RESIZE_Y 907
394 //#define GLUT_VIDEO_RESIZE_WIDTH 908
395 //#define GLUT_VIDEO_RESIZE_HEIGHT 909
396
397 //inline void glutSetupVideoResizing();
398
399 //inline void glutStopVideoResizing();
400
401 //inline void glutVideoResize(int x, int y, int width, int height);
402
403 //inline void glutVideoPan(int x, int y, int width, int height);
404
405 // Font argument must be a void* for compatibility, so...
407 struct Fl_Glut_Bitmap_Font {Fl_Font font; Fl_Fontsize size;};
408
409 extern FL_EXPORT struct Fl_Glut_Bitmap_Font
410 glutBitmap9By15, glutBitmap8By13, glutBitmapTimesRoman10,
411 glutBitmapTimesRoman24, glutBitmapHelvetica10, glutBitmapHelvetica12,
412 glutBitmapHelvetica18;
413 # define GLUT_BITMAP_9_BY_15 (&glutBitmap9By15)
414 # define GLUT_BITMAP_8_BY_13 (&glutBitmap8By13)
415 # define GLUT_BITMAP_TIMES_ROMAN_10 (&glutBitmapTimesRoman10)
416 # define GLUT_BITMAP_TIMES_ROMAN_24 (&glutBitmapTimesRoman24)
417 # define GLUT_BITMAP_HELVETICA_10 (&glutBitmapHelvetica10)
418 # define GLUT_BITMAP_HELVETICA_12 (&glutBitmapHelvetica12)
419 # define GLUT_BITMAP_HELVETICA_18 (&glutBitmapHelvetica18)
420
421 FL_EXPORT void glutBitmapCharacter(void *font, int character);
422 FL_EXPORT int glutBitmapHeight(void *font);
423 FL_EXPORT int glutBitmapLength(void *font, const unsigned char *string);
424 FL_EXPORT void glutBitmapString(void *font, const unsigned char *string);
425 FL_EXPORT int glutBitmapWidth(void *font, int character);
426
427 FL_EXPORT int glutExtensionSupported(char *name);
428
429 /* GLUT stroked font sub-API */
430 struct Fl_Glut_StrokeVertex {
431 GLfloat X, Y;
432 };
433
434 struct Fl_Glut_StrokeStrip {
435 int Number;
436 const Fl_Glut_StrokeVertex* Vertices;
437 };
438
439 struct Fl_Glut_StrokeChar {
440 GLfloat Right;
441 int Number;
442 const Fl_Glut_StrokeStrip* Strips;
443 };
444
445 struct Fl_Glut_StrokeFont {
446 char* Name; // The source font name
447 int Quantity; // Number of chars in font
448 GLfloat Height; // Height of the characters
449 const Fl_Glut_StrokeChar** Characters;// The characters mapping
450 };
451 extern FL_EXPORT Fl_Glut_StrokeFont glutStrokeRoman;
452 extern FL_EXPORT Fl_Glut_StrokeFont glutStrokeMonoRoman;
453 # define GLUT_STROKE_ROMAN (&glutStrokeRoman)
454 # define GLUT_STROKE_MONO_ROMAN (&glutStrokeMonoRoman)
455
456 FL_EXPORT void glutStrokeCharacter(void *font, int character);
457 FL_EXPORT GLfloat glutStrokeHeight(void *font);
458 FL_EXPORT int glutStrokeLength(void *font, const unsigned char *string);
459 FL_EXPORT void glutStrokeString(void *font, const unsigned char *string);
460 FL_EXPORT int glutStrokeWidth(void *font, int character);
461
462 /* GLUT pre-built models sub-API */
463 FL_EXPORT void glutWireSphere(GLdouble radius, GLint slices, GLint stacks);
464 FL_EXPORT void glutSolidSphere(GLdouble radius, GLint slices, GLint stacks);
465 FL_EXPORT void glutWireCone(GLdouble base, GLdouble height, GLint slices, GLint stacks);
466 FL_EXPORT void glutSolidCone(GLdouble base, GLdouble height, GLint slices, GLint stacks);
467 FL_EXPORT void glutWireCube(GLdouble size);
468 FL_EXPORT void glutSolidCube(GLdouble size);
469 FL_EXPORT void glutWireTorus(GLdouble innerRadius, GLdouble outerRadius, GLint sides, GLint rings);
470 FL_EXPORT void glutSolidTorus(GLdouble innerRadius, GLdouble outerRadius, GLint sides, GLint rings);
471 FL_EXPORT void glutWireDodecahedron();
472 FL_EXPORT void glutSolidDodecahedron();
473 FL_EXPORT void glutWireTeapot(GLdouble size);
474 FL_EXPORT void glutSolidTeapot(GLdouble size);
475 FL_EXPORT void glutWireOctahedron();
476 FL_EXPORT void glutSolidOctahedron();
477 FL_EXPORT void glutWireTetrahedron();
478 FL_EXPORT void glutSolidTetrahedron();
479 FL_EXPORT void glutWireIcosahedron();
480 FL_EXPORT void glutSolidIcosahedron();
481
482 #endif // !Fl_glut_H
483
484 //
485 // End of "$Id: glut.H 9373 2012-04-22 02:45:09Z fabien $".
486 //
Fl_Cursor
Fl_Cursor
The following constants define the mouse cursors that are available in FLTK.
Definition: Enumerations.H:910
Fl_Window::label
const char * label() const
See void Fl_Window::label(const char*)
Definition: Fl_Window.H:450
Fl_Widget::x
int x() const
Gets the widget position in its window.
Definition: Fl_Widget.H:274
Fl_Glut_StrokeStrip
Definition: glut.H:434
Fl_Widget::redraw
void redraw()
Schedules the drawing of the widget.
Definition: Fl.cxx:1710
Fl.H
Fl static class.
Fl_Widget::h
int h() const
Gets the widget height.
Definition: Fl_Widget.H:289
Fl_Gl_Window::handle
int handle(int)
Handle some FLTK events as needed.
Definition: Fl_Gl_Window.cxx:549
Fl_Widget::size
void size(int W, int H)
Changes the size of the widget.
Definition: Fl_Widget.H:331
Fl_Widget::w
int w() const
Gets the widget width.
Definition: Fl_Widget.H:284
Fl_Gl_Window::show
void show()
Puts the window on the screen.
Definition: Fl_Gl_Window.cxx:67
Fl_Window::cursor
void cursor(Fl_Cursor)
Changes the cursor for this window.
Definition: fl_cursor.cxx:111
Fl::add_timeout
static void add_timeout(double t, Fl_Timeout_Handler, void *=0)
Adds a one-shot timeout callback.
Definition: Fl.cxx:282
Fl_Window::iconize
void iconize()
Iconifies the window.
Definition: Fl_Window_iconize.cxx:23
Fl_Gl_Window::redraw_overlay
void redraw_overlay()
This method causes draw_overlay() to be called at a later time.
Definition: Fl_Gl_Overlay.cxx:187
Fl_Widget::y
int y() const
Gets the widget position in its window.
Definition: Fl_Widget.H:279
Fl_Gl_Window::hide
void hide()
Hides the window and destroys the OpenGL context.
Definition: Fl_Gl_Window.cxx:468
Fl_Glut_Bitmap_Font
fltk glut font/size attributes used in the glutXXX functions
Definition: glut.H:407
Fl_Glut_StrokeVertex
Definition: glut.H:430
Fl_Gl_Window::make_current
void make_current()
The make_current() method selects the OpenGL context for the widget.
Definition: Fl_Gl_Window.cxx:163
Fl::event_state
static int event_state()
This is a bitfield of what shift states were on and what mouse buttons were held down during the most...
Definition: Fl.H:652
Fl_Fontsize
int Fl_Fontsize
Size of a font in pixels.
Definition: Enumerations.H:768
Fl_Gl_Window::make_overlay_current
void make_overlay_current()
The make_overlay_current() method selects the OpenGL context for the widget's overlay.
Definition: Fl_Gl_Overlay.cxx:202
Fl_Gl_Window
The Fl_Gl_Window widget sets things up so OpenGL works.
Definition: Fl_Gl_Window.H:56
Fl_Glut_Window
GLUT is emulated using this window class and these static variables (plus several more static variabl...
Definition: glut.H:44
Fl_Font
int Fl_Font
A font number is an index into the internal font table.
Definition: Enumerations.H:739
Fl_Gl_Window::hide_overlay
void hide_overlay()
Hides the window if it is not this window, does nothing in WIN32.
Definition: Fl_Gl_Overlay.cxx:225
Fl_Glut_StrokeChar
Definition: glut.H:439
Fl_Window::fullscreen
void fullscreen()
Makes the window completely fill one or more screens, without any window manager border visible...
Definition: Fl_Window_fullscreen.cxx:72
Fl_Glut_StrokeFont
Definition: glut.H:445
Fl_Widget::position
void position(int X, int Y)
Repositions the window or widget.
Definition: Fl_Widget.H:322
Fl_Gl_Window::draw
virtual void draw()
Draws the Fl_Gl_Window.
Definition: Fl_Gl_Window.cxx:541
Fl_Window::iconlabel
const char * iconlabel() const
See void Fl_Window::iconlabel(const char*)
Definition: Fl_Window.H:452
gl.h
This file defines wrapper functions for OpenGL in FLTK.
uchar
unsigned char uchar
unsigned char
Definition: fl_types.h:30
- © 1998-2014 by Bill Spitzak and others.