Thread: Request: Undo
View Single Post
  #5  
Old 09-14-2005, 05:27 AM
calani calani is offline
Scriptess
calani's Avatar
Join Date: Aug 2003
Location: asmgarden.gmap
Posts: 606
calani is on a distinguished road
Send a message via AIM to calani
and set cursor positon
possibly also setfocus? (as long as it doesn't set the main graal window focus -.-)

and as for the undo's.. it wouldn't be that hard.
just make a small log of everything that's changed
so to undo/redo, all you need to do is parse the next entry in the log.
the format would be simple enough
(action) (row) (col) [to (row) (col)] (data)
ex. "replace 5 0 to 6 4 hello\nworld\n"
or "delete 5 0 "hello\nworld\n"

the same would go for single line text edit boxes. the only difference is keeping track of the rows wouldn't be necessary
__________________