ftp.nice.ch/pub/next/developer/resources/classes/misckit/MiscKit.1.10.0.s.gnutar.gz#/MiscKit/Palettes/MiscTableScroll/MiscRectColorList.h

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

#ifndef __MiscRectColorList_h
#define __MiscRectColorList_h
#ifdef __GNUC__
#pragma interface
#endif
//=============================================================================
//
//		Copyright (C) 1995,1996 by Paul S. McCarthy and Eric Sunshine.
//				Written by Paul S. McCarthy and Eric Sunshine.
//							All Rights Reserved.
//
//		This notice may not be removed from this source code.
//
//		This object is included in the MiscKit by permission from the authors
//		and its use is governed by the MiscKit license, found in the file
//		"License.rtf" in the MiscKit distribution.	Please refer to that file
//		for a list of all applicable permissions and restrictions.
//		
//=============================================================================
//-----------------------------------------------------------------------------
// MiscRectColorList.h
//
//		An extensible array of rectangles and colors for rendering a whole
//		list of rectangles with a single trip to the display server.
//
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
// $Id: MiscRectColorList.h,v 1.1 96/08/30 14:57:12 sunshine Exp $
// $Log:		MiscRectColorList.h,v $
// Revision 1.1	 96/08/30  14:57:12	 sunshine
// An extensible array of rectangles and colors for rendering a whole
// list of rectangles with a single trip to the display server.
// 
//-----------------------------------------------------------------------------
#include "MiscColorList.h"

extern "Objective-C" {
#import <appkit/graphics.h>				// NXRect
}

struct MiscRectColorList
		{
private:
		MiscColorList color_list;
		int num_rects;
		int max_rects;
		NXRect* rects;
		int*	colors;
		MiscRectColorList(MiscRectColorList const&) {}	// No copy constructor.
		void operator = (MiscRectColorList const&) {}	// No assign operator.
public:
		MiscRectColorList();
		~MiscRectColorList();
		int count() const		{ return num_rects; }
		void empty()			{ color_list.empty(); num_rects = 0; }
		void append( NXRect r, NXColor c );
		void draw();
		};

#endif // __MiscRectColorList_h

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