Reimplemented from OglGui::Window. Definition at line 1085 of file TextEdit.h. References BackSpace(), ComputeDocHeight(), Copy(), Cut(), DeleteKey(), HandleMoveKey(), InsertKey(), OglGui::Window::KeyboardFunc(), OglGui::DocDimensions::mDocH, OglGui::DocDimensions::mDocY, mEditable, MoveToCaret(), mSingleLine, Paste(), RedoAction(), and UndoAction(). 01086 { 01087 bool shift = (state & oglShift) ? true : false; 01088 int oldDocH = mDocH; 01089 01090 Window::KeyboardFunc(c, state); 01091 01092 if (c == oglUP || c == oglDOWN || 01093 c == oglLEFT || c == oglRIGHT || 01094 c == oglPAGEUP || c == oglPAGEDOWN || 01095 c == oglHOME || c == oglEND) 01096 { 01097 HandleMoveKey(c, state); 01098 } 01099 if (c == oglCTRL('c')) 01100 Copy(); 01101 01102 if (mEditable) 01103 { 01104 if (c == oglCTRL('z')) 01105 UndoAction(); 01106 if (c == oglCTRL('y')) 01107 RedoAction(); 01108 01109 if (c == oglCTRL('x')) 01110 Cut(); 01111 if (c == oglCTRL('v')) 01112 Paste(); 01113 01114 if( c == '\r' ) 01115 c = '\n'; 01116 01117 if( c == 8 ) 01118 BackSpace(); 01119 if (c == oglDELETE) 01120 DeleteKey(); 01121 if (c == '\n' || c == '\t' || c == ' ' || isalnum(c) || ispunct(c)) 01122 if (!(mSingleLine && c == '\n')) 01123 InsertKey(c); 01124 01125 mDocY -= ComputeDocHeight() - oldDocH; 01126 } 01127 01128 MoveToCaret(); 01129 }
Here is the call graph for this function:
|