This is MiscDrawList.h in view mode; [Download] [Up]
#ifndef __MiscDrawList_h
#define __MiscDrawList_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.
//
//=============================================================================
//-----------------------------------------------------------------------------
// MiscDrawList.h
//
// An extensible array of specifications for drawing cell contents.
//
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
// $Id: MiscDrawList.h,v 1.1 96/08/30 14:52:40 sunshine Exp $
// $Log: MiscDrawList.h,v $
// Revision 1.1 96/08/30 14:52:40 sunshine
// An extensible array of specifications for drawing cell contents.
//
//-----------------------------------------------------------------------------
#include "MiscColorList.h"
#include <bool.h>
extern "Objective-C" {
@class Font, NXImage;
#import <appkit/graphics.h> // NXRect, NXColor
}
class MiscLineWrapper;
struct MiscDrawList
{
public:
struct Rec
{
NXRect text_rect;
NXRect icon_rect;
char* text;
Font* font;
NXImage* image;
int text_color;
int flags; // (alignment << 1) | (char_wrap)
void draw_icon();
void draw_text( MiscLineWrapper& ) const;
};
private:
MiscColorList color_list;
int num_recs;
int max_recs;
Rec* recs;
MiscDrawList(MiscDrawList const&) {} // No copy constructor.
void operator = (MiscDrawList const&) {} // No assign operator.
void draw_icons();
void draw_text();
public:
MiscDrawList();
~MiscDrawList();
int count() const { return num_recs; }
void empty();
void append( NXRect frame_rect, id cell,
BOOL is_highlighted,
NXColor default_text_color,
Font* default_font );
void draw();
};
#endif // __MiscDrawList_h
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.