Files Classes Functions Hierarchy
#include <menusystemsave01.h>
Public Member Functions | |
| menusystemsave01 (point2< int > const &position_, stringc &filenamedefault_, GLint const columnchange_, fnobj1< void, menusystemsave01 & > *savefile_) | |
| ~menusystemsave01 () | |
| Cleanup. | |
| void | readImmediate (charc ch) |
| Redefine to perform an action on receiving the character. | |
| void | readBufferedTerminationAction () |
| Uses state to know which event was triggered. | |
| void | draw () |
| Draw self and parents. | |
| void | update () |
Public Attributes | |
| string | filename |
| Filename chosen. | |
| string | filenamedefault |
| Filename displayed. | |
| uint | filenameindex |
| uint | state |
| bool | sticky |
| Remember the last filename entered. | |
| fnobj1< void, menusystemsave01 & > * | savefile |
| Callback when client selects 's' save in menu option. | |
Definition at line 14 of file menusystemsave01.h.
| menusystemsave01::menusystemsave01 | ( | point2< int > const & | position_, | |
| stringc & | filenamedefault_, | |||
| GLint const | columnchange_, | |||
| fnobj1< void, menusystemsave01 & > * | savefile_ | |||
| ) |
Definition at line 4 of file menusystemsave01.cpp.
00010 : menusystem(position_,columnchange_), 00011 filenamedefault(filenamedefault_), filenameindex(0), 00012 state(0), sticky(true), savefile(savefile_) 00013 { 00014 addfont10("[f] ",0); 00015 X.x += 14; 00016 filename=filenamedefault; 00017 addfont10(filenameindex,filename,1); 00018 addfont10("[s] Save",1); 00019 addfont10("[c] Cancel",0); 00020 00021 update(); 00022 }
| menusystemsave01::~menusystemsave01 | ( | ) | [inline] |
| void menusystemsave01::draw | ( | ) | [inline, virtual] |
Draw self and parents.
Reimplemented from menusystem.
Definition at line 53 of file menusystemsave01.h.
References menusystem::drawparentsnested().
00053 { drawparentsnested(); };
| void menusystemsave01::readBufferedTerminationAction | ( | ) | [virtual] |
Uses state to know which event was triggered.
Reimplemented from menusystem.
Definition at line 29 of file menusystemsave01.cpp.
References filename, menusystem::readBufferedResult, state, and update().
00030 { 00031 if (state==1) 00032 { 00033 filename = readBufferedResult; 00034 update(); 00035 } 00036 /* 00037 if (state==2) 00038 { 00039 filename=filenamedefault; 00040 } 00041 if (state==3) 00042 { 00043 } 00044 */ 00045 }
| void menusystemsave01::readImmediate | ( | charc | ch | ) | [virtual] |
Redefine to perform an action on receiving the character.
Reimplemented from menusystem.
Definition at line 47 of file menusystemsave01.cpp.
References filename, filenamedefault, filenameindex, menusystem::readBufferedString(), savefile, state, sticky, menusystem::transfercontroltoparent(), and update().
00048 { 00049 switch (ch) 00050 { 00051 case 'f': 00052 readBufferedString(filenameindex); 00053 state=1; 00054 break; 00055 case 'c': 00056 state=2; 00057 if (sticky==false) 00058 { 00059 filename=filenamedefault; 00060 update(); 00061 } 00062 transfercontroltoparent(); 00063 break; 00064 case 's': 00065 state=3; 00066 assert(savefile); 00067 (*savefile)(*this); 00068 transfercontroltoparent(); 00069 break; 00070 } 00071 }
| void menusystemsave01::update | ( | ) |
Definition at line 24 of file menusystemsave01.cpp.
References filename, filenameindex, and menusystem::vItems.
Referenced by readBufferedTerminationAction(), and readImmediate().
00025 { 00026 vItems[filenameindex]->name = filename; 00027 }
| string menusystemsave01::filename |
Filename chosen.
Definition at line 19 of file menusystemsave01.h.
Referenced by readBufferedTerminationAction(), readImmediate(), and update().
Filename displayed.
Definition at line 21 of file menusystemsave01.h.
Referenced by readImmediate().
Callback when client selects 's' save in menu option.
Definition at line 31 of file menusystemsave01.h.
Referenced by readImmediate(), and ~menusystemsave01().
Definition at line 25 of file menusystemsave01.h.
Referenced by readBufferedTerminationAction(), and readImmediate().
Remember the last filename entered.
Definition at line 28 of file menusystemsave01.h.
Referenced by readImmediate().
1.5.8