[GOODIE] MultiSelectionInLists

alain.plantec at univ-brest.fr alain.plantec at univ-brest.fr
Wed Mar 30 08:11:40 UTC 2005


from preamble:

"Change Set:		MultiSelectionInLists
Date:			30 March 2005
Author:			Alain Plantec

Implements multi-selection for ScrollPanes (PluggableListMorph in
Browser and SimpleHierarchicalMorph in Tamaris for example).

It allow handling of (a priori) an unlimited number of sublists.
Each sublist is marked with an 'emphasis' (a ListItemMorphEmphasisModel)
which is a textColor, a font and an emphasis code.
A sublist emphasis is given with an emphasis rule (a
ListItemEmphasisRule).
A particular emphasis rule gives events condition and triggered action
on list (list view update).

Two instance variable have been added to ScrollPane : eventRulesHandler
emphasisIndex.
	- eventRulesHandler is a ListEventRulesHandler. 
	All ListItemEmphasisRule are stored and triggered from it.
	emphasisIndex is a ListItemMorphEmphasisIndex.
	All list item emphasing are kept and get from it.

This cs implements two useful sublist kinds: a bold blue and a bold red
one.
bold blue is for drag and drop, bold red is for item removal.

How to test it:
First, close all your browsers.
install the cs from a file list.
now you have to close your file list which is no more useable.

Bold blue list test : for drag and drop
Open a browser. In the selector list, you can collect a blue sublist
with shift+left button (red button?).
Now you can drag blue selection (all selectors in one drag) and drop it
into another category for example.
Drag and drop is also working on class list : you can drag and drop a
list of classes from one system category to another for example.

Bold red list test : for item removing
In order to insert an item in a red sublist : capslock and cmd-x (it's
cmd-X).
Item under mouse pointer is inserted in a red sublist.
Then with cmd-x, all red sublist items will be removed (after a
confirmation).
It works with selectors and classes list.

Dependency :
'Hierarchy List Morph - Navigation' should be installed before"!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: MultiSelectionInLists.cs.gz
Type: application/octet-stream
Size: 8918 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20050330/424d5016/MultiSelectionInLists.cs.obj


More information about the Squeak-dev mailing list