// =========================================================================== // 3DUtilities.h ©1995 J. Rodden, DD/MF & Associates. All rights reserved // =========================================================================== // Utilities for drawing 3D effects. // // This is intended to look and act as much like a Toolbox Manager as possible. // You should use the first set of procedures in general, but the second set // is directly available for flexibility. // // This source code is loosely based on and heavily inspired by source code // by James W. Osborne, copyright (c) 1993, Apple Computer. #pragma once #include <3DGrays.h> // =========================================================================== // These wrapper functions provide the basic 3D appearance recommended in // Develop issue 15. // =========================================================================== void Get3DBackColor(RGBColor *outBkgndColor); void Get3DLightColor(RGBColor *outLightColor); void Get3DShadowColor(RGBColor *outShadowColor); void Get3DPenState(PenState *outPnState); void Set3DBackColor(const RGBColor *inBkgndColor); void Set3DLightColor(const RGBColor *inLightColor); void Set3DShadowColor(const RGBColor *inShadowColor); void Set3DPenState(const PenState *inPnState); void Draw3DInsetOvalPanel(const Rect *inRect); void Draw3DRaisedOvalPanel(const Rect *inRect); void Draw3DInsetOvalBorder(const Rect *inRect); void Draw3DRaisedOvalBorder(const Rect *inRect); void Draw3DInsetOvalFrame(const Rect *inRect); void Draw3DRaisedOvalFrame(const Rect *inRect); void Draw3DInsetPanel(const Rect *inRect); void Draw3DRaisedPanel(const Rect *inRect); void Draw3DInsetBorder(const Rect *inRect); void Draw3DRaisedBorder(const Rect *inRect); void Draw3DInsetFrame(const Rect *inRect); void Draw3DRaisedFrame(const Rect *inRect); void Draw3DInsetHLine(short vpos, short h1, short h2); void Draw3DInsetVLine(short hpos, short v1, short v2); void Draw3DRaisedHLine(short vpos, short h1, short h2); void Draw3DRaisedVLine(short hpos, short v1, short v2); // =========================================================================== // These are the functions that actually do the work, use these to customize // color usage. For inset effects, use dark color for inULColor and light color // for inLRColor. Reverse colors for raised appearance. // =========================================================================== void Draw3DOvalPanel(const Rect *inRect, const RGBColor *inBKColor, const RGBColor *inULColor, const RGBColor *inLRColor, const Boolean inFrameIt); void Draw3DOvalBorder(const Rect *inRect, const RGBColor *inULColor, const RGBColor *inLRColor, const Boolean inFrameIt); void Draw3DOvalFrame(const Rect *inRect, const RGBColor *inULColor, const RGBColor *inLRColor); void Draw3DPanel(const Rect *inRect, const RGBColor *inBKColor, const RGBColor *inULColor, const RGBColor *inLRColor, const Boolean inFrameIt); void Draw3DBorder(const Rect *inRect, const RGBColor *inULColor, const RGBColor *inLRColor, const Boolean inFrameIt); void Draw3DFrame(const Rect *inRect, const RGBColor *inULColor, const RGBColor *inLRColor); void Draw3DHLine(short vpos, short h1, short h2, const RGBColor *inULColor, const RGBColor *inLRColor); void Draw3DVLine(short hpos, short v1, short v2, const RGBColor *inULColor, const RGBColor *inLRColor); void DrawCLine(const RGBColor *inColor, short h1, short v1, short h2, short v2); void CLineTo(const RGBColor *theColor, short h, short v); void BWShadowInset(const Rect* inRect); void BWShadowRaised(const Rect* inRect); void BWShadowLine( short h1, short v1, short h2, short v2); // =========================================================================== // Provide backward compatability (ONLY) with early releases of this package. #define DrawH3DLine Draw3DHLine #define DrawV3DLine Draw3DVLine // ===========================================================================