
On Wed, 13 Jun 2007 06:44:01 -0700
David Roundy
Hi all,
This is a change that's more pervasive than I'd originally intended. The idea is to move away from the dependence on workspace tags being integers from 0 to size s, so that we can easily have more friendly tags, such as String.
This also could move us in directions of putting extra information in the tag. e.g. if we stored the (Layout, [Layout]) in the tag itself, then we'd be able to eliminate one additional data structure, and we'd have the benefit that the pure StackSet code could track our layouts for us. I'm not sure this is worthwhile, but the idea came to me, as I was trying to figure out how you'd recognize which Layout went with which Stack, and realized that they're tracked totally separately, which seems more than a little silly.
I've wanted to get layouts into StackSet for some time now. However, we need to figure out how to serialize layouts before we can make that change.
This seems particularly relevant as dons is talking about creating a Stack for the float layer (which makes lots of sense to me), and I'll be voting for allowing custom layouts to the float layer: part of my grand scheme to make the float layer an equal citizen with other layout systems, but also useful for people who want tabs on their windows so they can see titles and drag them around with the use of only one hand.
Yes, this is a good idea. After all, a floating layout is just a layout that happens to listen to windows requested sizes.
Anyhow, it's a sort of pervasive change--mostly in terms of the number of quickcheck tests that required modification because they call new--but I believe it's basically a simple and safe change also, and amenable to code review--which is why I didn't change any functionality, except that the tests no longer assume that workspaces are numbered 0..n-1.
David
Wed Jun 13 06:31:35 PDT 2007 David Roundy
* make workspace tag not need to be a Num. This change also removes the barely used 'size' field, and replaces it with a tagMember predicate. The idea is to move towards the ability to make the workspace tag be a String, which by default might be "1".."9", but could also be customized to be something meaningful to the user.