Definition at line 137 of file TextEdit.h. References EmptyChangeInfoDeque(), GetSelectionLeftRight(), mCaret, mMark, mText, redoDeque, and undoDeque. Referenced by DeleteSelection(), and InsertKey(). 00138 { 00139 string str = ""; 00140 string redoStr = ""; 00141 char buf[2]; 00142 int left, right; 00143 00144 if (!redoDeque.empty()) 00145 EmptyChangeInfoDeque(redoDeque); 00146 00147 buf[0] = c; buf[1] = '\0'; 00148 redoStr += buf; 00149 00150 GetSelectionLeftRight(left, right); 00151 00152 ChangeInfo* redo = new ChangeInfo(left, right, &redoStr, 00153 left+(c?1:0), left+(c?1:0)); 00154 if (left != right) 00155 str = mText.substr(left, right-left); 00156 ChangeInfo* undo = new ChangeInfo(left, left+(c?1:0), &str, 00157 mCaret, mMark); 00158 00159 undoDeque.push_back(redo); 00160 undoDeque.push_back(undo); 00161 }
Here is the call graph for this function:
|