I am doing a project in which i am designing a Text Editor application in Turbo C (Dos). I want to add different menus in my application like File , edit , view etc. I have already designed file and security menu but i want to implement Edit menu which includes functions like Undo , Redo , Cut , Copy , Paste etc. which require me to implement a clipboard. I know there is a way to do this in windows by using the windows clipboard but i dont want to use clipboard provided by windows. I want to implement my own clipboard.
Remember my application is DOS based and windows clipboard will not be available. Even if there is someway of using windows clipboard it is not required. I want to implement my own clipboard.
Ok, so lets assume your data structure is something like this:
So, when we add the cut function:
And a copy function:
And then the paste function.
For undo-redo, you need a stack of the changes that were made.