This is RZBrowserCell.h in view mode; [Download] [Up]
/*
* RZBrowserCell
*
* A subclass of BrowserCell supporting fixed and variable position tabs,
* multi-font text and inline graphics.
*
* Here is an example of setting up a Browser to use a RZBrowserCell:
*
* // create a prototype cell for the browser
* id cellPrototype = [[RZBrowserCell alloc] init];
*
* // initialize the tab stops
* // fixed tab at 10 pixels
* [cellPrototype addFixedTab:10.0];
*
* // proportional tab at 20% with min at 30 and max at 600 pixels
* [cellPrototype addProportionalTab:0.2 min:30 max:600];
*
* // fixed tab 60 pixels from right side
* [cellPrototype addFixedTab:-60.0];
*
* // make sure to set the prototype before we've loaded any columns
* [browser setCellPrototype:cellPrototype];
* [browser loadColumnZero];
* [[browser window] makeKeyAndOrderFront:self];
*
*
* You may freely copy, distribute and reuse the code in this example.
* This code is provided AS IS without warranty of any kind, expressed
* or implied, as to its fitness for any particular use.
*
* Copyright 1995 Ralph Zazula (rzazula@next.com). All Rights Reserved.
*
*/
#import <appkit/NXBrowserCell.h>
#define FONT_NORMAL 0
#define FONT_BOLD 1
#define FONT_ITALIC 2
#define FONT_BOLD_ITALIC 3
#define FONT_BLACK 0
#define FONT_DKGRAY 1
#define FONT_LTGRAY 2
#define FONT_WHITE 3
@interface RZBrowserCell : NXBrowserCell
{
NXCoord ascender, descender, lineHeight;
id tabStops, textTokens;
}
- free;
- setFont:fontObj;
- calcCellSize:(NXSize *)theSize inRect:(const NXRect *)aRect;
- drawInside:(const NXRect *)cellFrame inView:controlView;
- highlight:(const NXRect *)cellFrame inView:controlView lit:(BOOL)flag;
/*** manipulating tabs ***/
- addProportionalTab:(float)position;
- addProportionalTab:(float)position min:(float)minPos max:(float)maxPos;
- addFixedTab:(float)position;
- clearTabs;
/*** manipulating text tokens ***/
- setText:(const char *)format at:(unsigned)index font:(char)font color:(char)color, ...;
- setText:(const char *)format at:(unsigned)index, ...;
- setText:(const char *)format at:(unsigned)index font:(char)font, ...;
- setText:(const char *)format at:(unsigned)index color:(char)color, ...;
- clearText;
/*** manipulating icons ***/
- setImageNamed:(const char *)name at:(unsigned)index;
/*** archiving ***/
- write:(NXTypedStream *)ts;
- read:(NXTypedStream *)ts;
@end
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.