GUI Fest Post Challenge: Multiple Counters
The "Multiple Counter" program shows a counter which can be
incremented manually or periodically. The counter can at any time be
copied, giving a new counter with its own independent state,
which is copied from the old counter in the very moment of creation. A
counter can also be linked, giving a new view to the same
counter. One can think of the copying and linking as being analogous
to ln
and cp
applied to files under Unix.
A counter view looks something like this:
+------------+
| |
| +--------+ |
| | 0 | |
| +--------+ |
| |
| |
| +--------+ |
| | Manual | |
| +--------+ |
| |
| +--------+ |
| | Auto | |
| +--------+ |
| |
| +--------+ |
| | Copy | |
| +--------+ |
| |
| +--------+ |
| | Link | |
| +--------+ |
+------------+
It contains the following elements:
- an integer display of the current count.
- Manual, a button which increments this counter and all
those linked with it.
- Auto, a button which sets this counter (and all its
associated links) to auto-increment mode in which the count
increases periodically until Manual is pressed. The button may
visually reflect if the counter is in auto-increment mode or not.
- Copy, a button which makes a copy of this counter. The
new counter starts
with the same value as the counter that created it,
but is not linked to it (ie. pressing Manual in it
does not increase the count in the one that created it,
and vice-versa).
- Link, a button which makes a link to this
counter. The link is a new view of
the same count, ie. it increases when other counters
linked to it increase, and vice-versa.
If possible, it should be possible to distinguish counters that are
linked - eg. links have the same background colour or window title,
copies have a different colour or title, or perhaps by layout - links
placed across the screen, copies placed down the screen.