Shrinking That To Do List #

The first thing I did today was to clean up the menus (since I had been adding commands for a while, but didn't add the proper enabling/disabling). Since I'm using the Appearance Manager, it is rather easy to add additional modifiers (such as option and shift) to the command. So the command for inverting the current selection is shift-command-I, for counter-clockwise rotation its shift-command-T, and so on. The Clear menu item serves the same function as the delete key, so I gave it that shortcut (there's a special icon for the delete key), and removed the command key symbol from the menu (that's one of the other things that the appearance manager provides that earlier systems didn't). The new status system that I had previously added also helped in determining which items should or shouldn't be enabled.

Then I made it so that a drag would not be accepted (and thus a hilite rectangle note drawn) if the mouse was over the starting rectangle. This was one of the items on my todo list.

Then I added drawing of selections in the previews. The previes combine both the icon and the mask, and the can selection belong to one of those, so it's not simply a matter of drawing the selection on top. In the end I had to have two temporary GWorlds, where I drew the icon and mask respectively, then the selection on top if necessary, and finally merged them using CopyDeepMask to get the final result.

Then I started to finish up the drawing in selections that I had added previously. After I did that the line tool I noticed that there was a problem. The drawing in the selection seemed to be clipped to the rectangle of the original position of the selection. I commented out all calls to SetClip, and yet it was still happening. Then I thought that in my move command I was only doing an OffsetRect for the bounds of the selection PixMap, and not the selection GWorld. But that wasn't it either. So now I'm stuck, and I have no idea where to look next for the solution...

Well, apparently I needed to offset the visRgn of the selection GWorld too. I actually tried that earlier, but at the same time I offseted the clipRgn too. For some reason if I do both, then it doesn't work.

I just realized that I wasn't disposing of all the saved states when closing an editor, and this would have resulted in a huge memory leak. However, a simple traversal of the state linked lists, and deletetion of each element solved this.

I'm not too sure what to work on next. I have the Icon Browser, which is one of the last major things I need to do, and litlle things like adding a "do you want to save?" alert when closing.

I've decided to work on the browser, since I'm not going to be able to dedicated entire days to this project much longer, but I can work on the smaller things after school starts too. I've started to look at how movable modal dialogs are handled (I want to use one for the browser window), and it doesn't look that hard.

(later on)

I've implemented a simple (and empty, except for OK/Cancel buttons) movable modal that shows up when you open a scheme. Everything seems to work (the dialog is movable) except that if there already was an editor open, it's not disabled.

Post a Comment