Page 1 of 1
Missing weapon from the PB Arsenal: Undo-Redo
Posted: Mon Nov 18, 2013 3:38 pm
by IdeasVacuum
It would be fantastic if we could have an easy-to-implement Undo-Redo library for PB.
Since the PB IDE has Undo-Redo, perhaps the job is already done?
Re: Missing weapon from the PB Arsenal: Undo-Redo
Posted: Mon Nov 18, 2013 3:51 pm
by luis
IdeasVacuum wrote:It would be fantastic if we could have an easy-to-implement Undo-Redo library for PB.
I never tried it, but I remember this ->
http://www.purebasic.fr/english/viewtop ... 52#p328352 by srod
IdeasVacuum wrote:Since the PB IDE has Undo-Redo, perhaps the job is already done?
I suppose the editor use what provided by Scintilla ->
http://www.scintilla.org/ScintillaDoc.html#UndoAndRedo
Re: Missing weapon from the PB Arsenal: Undo-Redo
Posted: Mon Nov 18, 2013 4:12 pm
by STARGÅTE
Here is a german tutorial, how to manage undo/redo functions:
Verwaltung für Undo-/Redo-Funktionen
A library for PB isn't "easy",
because you have to create anyway callbacks for any Do, Undo and Redo,
depending on the topic: text editor, graphics editor, file management, games
and what should be redo or undo (full versions, only changes)
Re: Missing weapon from the PB Arsenal: Undo-Redo
Posted: Tue Nov 19, 2013 2:35 am
by IdeasVacuum
easy-to-implement
Not saying it is easy for Fred/Freak to make the library, but that we would want it to be easy to use.
I did take a look at sRod's effort. At the time it was a Beta and I didn't really understand it well enough to trust my implementation of it -so I wrote my own, specifically for the app I was working on, but not really suitable for different types of apps.
I think you are probably right Luis, current PB IDE is likely to be using the Scintilla Undo Redo.
For C++ there is a lib I only recently heard of: GeMS++. This is used by Kubotek for their CAD file viewer KeyView - an application that has a lot of possible User actions to track for Undo-Redo, so I assume that GeMS++ is the business.
http://sourceforge.net/projects/gems-pp/
Edit
Owch! Google Chrome completely messes-up the code sections of a post if translation is used!
I understand the theory StarGate - nice intro to that in your post, but it seems like the wheel has to be re-invented for each specific app. I don't know, perhaps I wish for too much. It's one of those things where I don't enjoy writing the code - when that is the case I sometimes lack patience.
Re: Missing weapon from the PB Arsenal: Undo-Redo
Posted: Tue Nov 19, 2013 2:49 am
by netmaestro