CLIM mail archive

[Prev][Next][Index][Thread]

Selection.



  The selection is a big complex data structure.  Let me mention some of the design issues.  

The user has selected N heterogenous things.  The application must enable/disable menus as
approprate.    When the user actually selects the menu it is mapped over the selection.
The selection abstraction must provide tools to do that mapping.

 A fun example is found in Aston Tate's FullWrite, a word processor for the Mac. They
highlight the Helvetica menu one way of three ways depending on if
 - the entire selection is in Helvetica
 - none of the selection is in Helvetica, or
 - all the selection is in Helvetica.

 When multiple users are working on the same data, i.e. the Macintosh finder working on a 
file server.  The selection is clearly user specific.

 When a user is working on multiple documents, the selection is clearly document specific.

 Selections are what you move to and from the clipboard.  If you want to defer the cost
of moving/copying data, or any associated costs of normalizing representation then the
selection becomes entangled in those issues.

 It is sometimes the case that undo is related to selection.  At least you should restore
the selection when you undo.

 View scrolling has lots of little interations with selection.  Most applications allow 
the view to move away from the selection, and then move back to show some portion of the
selection if the user starts changing the selection.  The way that find dialogs move the
document view to show the selection without putting it behind the find dialog is a
particular fun example.  The selection is usually drawn as an overlay after everything
else is drawn.  That helps to assure that the selection gives precedence to the selection's
handles.

 The more powerful your find dialog is the more complex the resulting selection can become.
For example "find all text in italic."  The cancel button should revert the selection to
what it was, that makes storing the selection in the document problematic.

 The selection can be extremely expensive in space costs.  For example how do you represent
a selection which started out as an entire illustration and then had all the objects in two
arbitrary rectangles subtracted from it.

 These issues go on and on.  It is my impression that CLIM has defered these issues to the
application builder.
   - ben hyde, cambridge


References:

Main Index | Thread Index