• entries
    16
  • comments
    36
  • views
    27990

Windows, menu, more undo, other stuff

Sign in to follow this  

539 views

Limited Undo Levels
This is an important feature to avoid the overflow of the command buffer, and because a very large number of undo limit can slow down the execution of undo/redo horribly due to the command pattern stuff (because a lot of commands can't be reversed).

Undo limiting means if the undo number limit (defined by the user) is reached or the command buffer is too small, the first command(s) from the queue has to be executed on the old data and has to be deleted from the queue.

The size of a command is computed before adding it to the queue, then the first commands in the queue are executed/deleted as many times as it's needed to free enough space in the queue. After that the command is added to the queue.

The queue uses memory mapped files, so it only uses the smallest necessary system memory (in 128 kb granularity).

Windows GUI
I was always afraid of it. But it's so easy to use! (if you don't give a shit about neat code, nice design, and just get it done).

So, I've added a menubar, with some options window, and my favourite, a sort of undo manager, I don't know how to name it. It's a listbox with all the command names in the command queue, so the user can undo/redo multiple commands at a time. The undoed commands are highlighted, so it's pretty easy and straightforward to use.

Adding menus was a necessary step, because I was running out of hotkeys....

The next step is a toolbar, but I don't really feel like drawing all the little icons.


Added some new features, like scaling, and some others too.

Screenshots:
02_02.JPG02_01.JPG
02_03.JPG
Sign in to follow this  


0 Comments


Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now