ftp.nice.ch/pub/next/tools/dock/Locus.1.0.NI.bs.tar.gz#/Locus/TechDocs/ItemCell_Drawing.rtf

This is ItemCell_Drawing.rtf in view mode; [Download] [Up]

Copyright 1993 Jeremy Slade.

You are free to use all or any parts of the Locus project
however you wish, just give credit where credit is due.
The author (Jeremy Slade) shall not be held responsible
for any damages that result out of use or misuse of any
part of this project.

JGS Wed Mar 10 23:05:30 GMT-0700 1993


ItemCell Drawing Attributes

	ItemCell has a class-owned structure containing called it's DrawInfo.  This structure encapsulizes information about how the current Item's are to be drawn, including the drawing mode, and data specific to each mode.  Each Group instance has its own copy of the DrawInfo structure.  When a Group becomes the current group, it install's is DrawInfo as the current flags used by the ItemCell class.  All Items within a Group will have the same drawing attributes, so it is therefore most efficient to have these attibutes kept be the Group, and used by the ItemCell class on a general basis, rather than for each instance of ItemCell.
	The DrawInfo structure contains both general data for all modes, and specific data to each individual mode.  There are currently plans to support 4 different drawing modes: Large Browse, Small Browse, Large Icon, and Small Icon.  See below for details on each mode.  The current mode for a group is in the mode member of the DrawInfo structure.
	For Items that represent picuture files such as TIFFs or EPSs, the ItemCell can either display the regular Icon for these Items, or the actual contents of the Item (scaled to fit if necessary).  This option is controlled by the actualImage member of the DrawInfo.
	

Large Browse Mode

	In this mode, the ItemCell is drawn with the most information of any mode -- It is the most verbose mode.  The data displayed include the Item's Icon, Filename (in one of 8 possible formats), and and optional info line.  The following is a rough depiction of the layout of this mode:
	
+-------------------------------------------------------------------+
|                                                                   |
|  +------------+                                                   |
|  |            |     PATH LINE: FullPath or formatted string       |
|  |            |                                                   |
|  |    ICON    |     INFO LINE 1: General Info about this Item     |
|  |  (48 x 48) |                                                   |
|  |            |     INFO LINE 2: Currently unsed                  |
|  +------------+                                                   |
| ...                                                               |
+-------------------------------------------------------------------+

	The relevant members of the DrawInfo for this mode are:
		· lb_tridots			Show tri-dots for non-running Apps
		· lb_nameMode		Format for PATH LINE
		· lb_info1			Display INFO LINE 1
		· lb_info2			Display INFO LINE 2
	
	The Name Mode defines the format used to display the Item's path. The formats supported (planned) are:
		· FullPath			/Users/joe/Apps/Checkers.app
		· FileAndPath		Checkers.app -- /Users/joe/Apps
		· FileOnly			Checkers.app
		· Relative *			Apps/Checkers.app
		· No Path			(nothing)
		
	* Relative mode means relative to the Group's default path (this example assumes the Group's default path is /Users/joe)
		
	The Info Line (1) can contain different info depeding on which type of file the Item represents.  For normal file types, it will show the name of the Application used to open it.  For subdirectory types, it will show the path to which a the Viewer will be rooted when open in the Workspace Manager.



Small Browse Mode

	This mode is similar to the Large Browse, but not quite as detailed.  It contains less info about each Item, allowing more Items to be seen at once -- it is also faster.  This mode show the Item's path, and (optionally) its icon, scaled to 1/4 size:
	
+----------------------------------------------------+
|  +------+                                          |
|  |      |     PATH LINE: FullPath of Formatted     |
|  |      |                                          |
|  +------+                                          |
+----------------------------------------------------+

	The relevent memebers of DrawInfo are:
		· sb_icon				show the icon
		· sb_nameMode		same as for Large Browse
		
		
		
Large Icon Mode

	In this mode, the Items can be arrayed in the viewer in free-form, much as in the Icon view mode on the Macintosh.  Each item keeps track of its own location within the viewer so that it knows where to draw.  This mode only shows the Item's Icon and filename (w/out path).
	The relevant members of DrawInfo are:
		· li_showName		Whether or not to show the Item's name
		
		
Small Icon Mode

	This mode is exactly the same as Large Icon, except that the Icons are scaled to 1/4 size.
	The relevant members of DrawInfo are:
		· si_showName		Whether or not to show the Item's name
		

These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.