Files Classes Functions Hierarchy
#include <menusystemtest04.h>
Public Member Functions | |
| menusystemtest04 (int argc, char **argv) | |
| Main program. | |
| void | savefile (menusystemsave01 &ms) |
Static Public Member Functions | |
| static void | keyboard (unsigned char key, int x, int y) |
| Keyboard handler. | |
| static void | display () |
| Displays gobj::global . | |
Static Public Attributes | |
| static menusystem * | root = 0 |
| The menu is contained as a composite member. | |
| static string | doc [] |
| Brief description of each test. | |
Protected Member Functions | |
| void | readImmediate (charc ch) |
| Redefine to perform an action on receiving the character. | |
Definition at line 12 of file menusystemtest04.h.
| menusystemtest04::menusystemtest04 | ( | int | argc, | |
| char ** | argv | |||
| ) |
Main program.
Definition at line 22 of file menusystemtest04.cpp.
References menusystem::addfont10(), menusystem::addfont12(), menusystem::addsubmenu(), callback1createnew(), menusystem::columnchange, menusystem::currentset(), display(), textoverlay::drawpre, gobjpush, keyboard(), textoverlay::lightingdisable(), gobjContainerdeque::push_back(), root, savefile(), gobjContainer::set(), and zpr::update().
00023 : menusystem(point2<int>(60,50),10) 00024 { 00025 glutInit(&argc,argv); 00026 glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH); 00027 glutInitWindowSize(800,600); 00028 glutCreateWindow(""); 00029 glutDisplayFunc(display); 00030 glutKeyboardFunc(keyboard); 00031 00032 OpenGLinitialisation(); 00033 00034 glEnable(GL_DEPTH_TEST); 00035 glEnable(GL_CULL_FACE); 00036 glEnable(GL_NORMALIZE); 00037 00038 xGraphics.set(); 00039 00040 root = this; 00041 //root = new menusystemtest04Main(); 00042 //this->fontcolor = point4<float>(1.0,0.0,0.0,0.8); 00043 drawpre.push_back(new gobjglColor3f(1.0,0.0,0.0)); 00044 this->lightingdisable(); 00045 00046 root->currentset(); 00047 00048 menusystem * m = new menusystemsave01 00049 ( 00050 point2<int>(105,70), 00051 "file.csv", 00052 columnchange, 00053 callback1createnew(*this,&menusystemtest04::savefile) 00054 ); 00055 root->addsubmenu(m); 00056 00057 /* 00058 menusystem * m = new menusystemtest04Config(mypart); 00059 root->addsubmenu(m); 00060 root->currentset(); 00061 */ 00062 00063 addfont12("menusystem Example 04",2); 00064 00065 addfont10("[s] Save >",2); 00066 addfont10("[q] Quit",1); 00067 00068 gobjpush(this); 00069 00070 zpr zz; 00071 zz.update(); 00072 00073 glutMainLoop(); 00074 }
| void menusystemtest04::display | ( | ) | [static] |
Displays gobj::global .
Definition at line 76 of file menusystemtest04.cpp.
References gobjContainer::draw(), glerrordisplay(), and gobj::global.
Referenced by menusystemtest04().
00077 { 00078 glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); 00079 00080 gobj::global->draw(); 00081 00082 glerrordisplay(); 00083 00084 glutSwapBuffers(); 00085 }
| void menusystemtest04::keyboard | ( | unsigned char | key, | |
| int | x, | |||
| int | y | |||
| ) | [static] |
Keyboard handler.
Definition at line 88 of file menusystemtest04.cpp.
Referenced by menusystemtest04().
| void menusystemtest04::readImmediate | ( | charc | ch | ) | [protected, virtual] |
Redefine to perform an action on receiving the character.
Reimplemented from menusystem.
Definition at line 98 of file menusystemtest04.cpp.
References menusystem::transfercontroltosubmenu().
00099 { 00100 switch (ch) 00101 { 00102 case 'q': exit(0); break; 00103 case 's': transfercontroltosubmenu(0); break; 00104 } 00105 }
| void menusystemtest04::savefile | ( | menusystemsave01 & | ms | ) |
string menusystemtest04::doc [static] |
Initial value:
{
"",
"Save menu system test"
}
Definition at line 25 of file menusystemtest04.h.
Referenced by main().
menusystem * menusystemtest04::root = 0 [static] |
The menu is contained as a composite member.
Definition at line 22 of file menusystemtest04.h.
Referenced by menusystemtest04().
1.5.8