Files Classes Functions Hierarchy
#include <menusystem.h>
Public Member Functions | |
| namefont (point2< GLint > const &X_, stringc &name_, void *font_=GLUT_BITMAP_HELVETICA_10) | |
| The choices of font are GLUT_BITMAP_{HELVETICA_10, HELVETICA_12, HELVETICA_18, 8_BY_13, 9_BY_15, TIMES_ROMAN_10, TIMES_ROMAN_24 }. | |
| void | draw () |
| Draw the text at position X. | |
Public Attributes | |
| point2< GLint > | X |
| Current position. | |
| string | name |
| The string being displayed. | |
| void * | font |
| The glut font being pointed to. | |
Holds the string being printed, the font being used, the position to print and has the drawing function.
Definition at line 26 of file menusystem.h.
| namefont::namefont | ( | point2< GLint > const & | X_, | |
| stringc & | name_, | |||
| void * | font_ = GLUT_BITMAP_HELVETICA_10 | |||
| ) |
The choices of font are GLUT_BITMAP_{HELVETICA_10, HELVETICA_12, HELVETICA_18, 8_BY_13, 9_BY_15, TIMES_ROMAN_10, TIMES_ROMAN_24 }.
Definition at line 9 of file menusystem.cpp.
| void namefont::draw | ( | ) | [virtual] |
Draw the text at position X.
Implements gobj.
Definition at line 19 of file menusystem.cpp.
References font, GOBJDEBUGCODE, name, point2< T >::x, X, and point2< T >::y.
00020 { 00021 GOBJDEBUGCODE 00022 assert(font!=0); 00023 00024 glRasterPos2i(X.x,X.y); 00025 uintc kmax = name.size(); 00026 for (uint k=0; k<kmax; ++k) 00027 glutBitmapCharacter(font, name[k]); 00028 }
| void* namefont::font |
| string namefont::name |
| point2<GLint> namefont::X |
1.5.8