ftp.nice.ch/Attic/openStep/developer/resources/IconKit.s.tgz#/IconKit-4.2/Good_Old_Stuff/Documentation/Functions/IconKitFunctions.rtf

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

Release 1.2  Copyright ©1994 by H. Scott Roy  All Rights Reserved.

















IKCopyID(), IKReadID(), IKIDPasteTypes(), IKInitIDpboardType()


	SUMMARY	Copy and paste objects within an application.


	DECLARED IN	iconkit/IKfunctions.h


	SYNOPSIS

void IKCopyID(Pasteboard * pboard, id object)
id IKReadID(Pasteboard * pboard)
NXAtom * IKIDPasteTypes(void)
void IKInitIDpboardType(void)


	DESCRIPTION
	
These functions support copy and paste within an application.  IKCopyID() writes a pointer to object onto the indicated pasteboard, from which it can be read using IKReadID().  Since a pointer is only valid within a single application's address space, these functions cannot be used for transferring data between applications.  A future version of IconKit might support interapplication dragging using NXProxy and distributed objects.

These functions use the IKidPboardType to store pointers on the pasteboard.

IKIDPasteTypes() returns a NULL terminated list of NXAtoms with one element, IKidPboardType.  This list is suitable for passing to declareTypes:num:owner and related methods.

IKInitIDpboardType() initializes IKidPboardType to a unique string to avoid collisions with other applications.  Call this function in the unlikely case that you access IKidPboardType directly before loading any of the IconKit classes.


	RETURN	IKReadID() returns the object on pboard, or nil if the pasteboard contains no object of type IKidPboardType.


	SEE ALSO	IKInitIDpboardType()






IKCheckConformance()


	SUMMARY	Verify that an object is suitable for use with a browser and shelf.


	DECLARED IN	iconkit/IKfunctions.h


	SYNOPSIS

BOOL IKCheckConformance(id object)


	DESCRIPTION
	
This function checks to make sure object conforms to the protocols it needs to be used in a shelf or icon path.  All such objects should conform to IKDependency and one of the IKIconObject protocols.  This method prints warnings to stderr if object does not properly conform.


	RETURN	Returns YES if the object conforms, and NO otherwise.






IKdprintf(), IKSetDebug()


	SUMMARY	IconKit debugging aids.


	DECLARED IN	iconkit/IKfunctions.h


	SYNOPSIS

void IKdprintf(const char * format, ¼)
void IKSetDebug(BOOL flag)


	DESCRIPTION
	
Various IconKit classes print diagnostic information to stderr using the IKdprintf() function.  These messages can be an invaluable aid to tracking down problems with garbage collection and stale data.  When debugging messages are enabled, the IconKit objects will print out when they add and delete users, and also when they free themselves.

Debugging output can be enabled by including -IKDebug as a command line argument when running your program.  You can also use IKSetDebug() to turn debugging messages on and off from within a running program.






IKShortenTitle()


	SUMMARY	Use ellipses to indicate titles that are too big for a cell.


	DECLARED IN	iconkit/IKfunctions.h


	SYNOPSIS

void IKShortenTitle(Cell * text, float maxWidth)


	DESCRIPTION
	
IKCell and IKBrowserCell both use this function to truncate titles that would overflow the cell boundaries.  On input, text is a text cell that contains the desired title, and maxWidth is the maximum width that the title is allowed to occupy.  The function shortens the title in place so that the complete title, including an ellipses used to indicate an overlong title, is narrower than maxWidth.  The title is left unchanged if it is already short enough.

This function overwrites the previous contents of cell, so be sure to save it if necessary.



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