Definition at line 163 of file TextEdit.h. References EmptyChangeInfoDeque(), GetSelectionLeftRight(), mCaret, mMark, mText, redoDeque, and undoDeque. Referenced by InsertString(). 00164 { 00165 string undoStr = ""; 00166 int left, right; 00167 00168 if (!redoDeque.empty()) 00169 EmptyChangeInfoDeque(redoDeque); 00170 00171 GetSelectionLeftRight(left, right); 00172 00173 if (left != right) 00174 undoStr = mText.substr(left, right-left); 00175 00176 ChangeInfo* redo = new ChangeInfo(left, left+undoStr.length(), &str, 00177 left+str.length(), left+str.length()); 00178 00179 ChangeInfo* undo = new ChangeInfo(left, left + str.length(), &undoStr, 00180 mCaret, mMark); 00181 00182 undoDeque.push_back(redo); 00183 undoDeque.push_back(undo); 00184 }
Here is the call graph for this function:
|