This is MiscColorList.h in view mode; [Download] [Up]
#ifndef __MiscColorList_h #define __MiscColorList_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. // //============================================================================= //----------------------------------------------------------------------------- // MiscColorList.h // // An extensible array of colors that can act as a color palette to // reduce the storage overhead of storing a lot of colors. Also // useful for speeding color comparisons in some cases. // //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- // $Id: MiscColorList.h,v 1.1 96/08/30 14:51:51 sunshine Exp $ // $Log: MiscColorList.h,v $ // Revision 1.1 96/08/30 14:51:51 sunshine // Extensible array of colors acting as a color palette. // //----------------------------------------------------------------------------- extern "Objective-C" { #import <appkit/color.h> } struct MiscColorList { private: int num_colors; int max_colors; NXColor* colors; MiscColorList(MiscColorList const&) {} // No copy constructor. void operator = (MiscColorList const&) {} // No assign operator. public: MiscColorList(); ~MiscColorList(); int count() const { return num_colors; } void empty() { num_colors = 0; } NXColor const& nth( int n ) const { return colors[n]; } NXColor const& operator [] ( int n ) const { return colors[n]; } int store( NXColor c ); }; #endif // __MiscColorList_h
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.