ftp.nice.ch/pub/next/text/tex/apps/Bibliography.1.2a.s.tar.gz#/Bibliography.1.2a/Shelf.h

This is Shelf.h in view mode; [Download] [Up]

#import <appkit/appkit.h>
@class	DragView;
@class	BibliographicFile;
@class	Preferences;

typedef struct {
	Box					*theBox;
	BibliographicFile	*theFile;
	int					state;
}shelfType;


#define MAXCOUNT	40

@interface Shelf:View
{
	int			count;			//	number of boxes on the shelf
	int			iconsPerRow;	// number of icons per row
	Preferences	*preferences;
	ScrollView	*scrollView;
	NXImage		*theImage;
	NXRect		boxRect;		// size of a box on shelf
	NXAtom		MyListPboardType;
	NXStream	*protypeStream;	// typed stream from which boxes can be created
	List		*boxList;
	shelfType	shelfBox[MAXCOUNT];	// description array of all boxes
	BOOL		needsHorizontalScroller;
	BOOL		isSelected;
}

// initialize a shelf
- (void) setBoxPrototype:(Box *)aBox;
- (Box *) readBoxFromStream:(NXStream *)theStream;
- (BOOL) loadShelfFromFile:(const char *)file;
- setBackgroundColor:(NXColor)color;

// find index of a box
- (int)indexOfBox:(Box *)box;
- (int)indexOfBoxWithIcon:(DragView *)view;
- (int)indexOfBoxForFile:(BibliographicFile *)aFile;
- (int)indexOfBoxNamed:(const char *)fileName;

// properties of an icon
- (const char *)filenameOfIconAt:(int)inx;
- (int)getstateOfIconAt:(int)inx;
- setState:(int)state forIconAt:(int)inx;

// set fileparameter of a box
- attachFile:(const char *)fName toObject:(BibliographicFile *)obj;
- attachObject:(BibliographicFile *)obj toFile:(const char *)fName;
- detachObject:(BibliographicFile *)obj;

// remove box from shelf
- (void) removeBoxAt:(int)inx;
- (void) removeBoxWithIcon:(DragView *)theView;

// insert box 
- (int)insertBox:(Box *)box at:(int)inx;
- (int)insertBox:(Box *)box;

// display
- (void)sizeShelf:(int)cnt;
- (void)setCoordinates:(NXRect *)r at:(int)inx;
- (void)redrawShelf;

@end

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