home *** CD-ROM | disk | FTP | other *** search
Text File | 1997-05-19 | 1.3 KB | 59 lines | [TEXT/CWIE] |
- // =================================================================================
- // FontLight.h ©1997 BB's Team inc. All rights reserved
- // =================================================================================
-
- #pragma once
-
- #include "PLConstants.h"
- #include <UTextTraits.h>
- #include <LString.h>
-
- typedef struct FontPair {
- unsigned char glyph;
- float value;
- } FontPair, *FontPairPtr;
-
- class FontLight {
-
- public:
- static const Rect nullRect;
- enum {
- kMissing = -10000,
- kForbidden = -20000
- };
-
- FontLight (void);
- virtual ~FontLight();
- void SetTextTraits (const TextTraitsRecord &);
- void SetRect (Rect);
- void SetScreen (Boolean);
- void Set7Bits (Boolean in7Bits);
-
- void Update (void);
- Boolean IsUpToDate (void);
- char ComputeChar (float);
- void GetMinMax (float &fMin, float &fMax);
- void SetAllowed (LStr255);
- LStr255 GetAllowed ();
-
- protected:
- void InitPairs (void);
- void SortPairs (void);
-
- Int32 mFirstChar, mLastChar;
- Int32 mFirstEntry, mLastEntry;
- Boolean m7Bits;
- Boolean mUpToDate;
- Boolean mForScreen;
- Rect mRect;
- FontPair mPair[256];
- LStr255 mAllowed;
- TextTraitsRecord mTextTraits;
-
- };
-
-
- // sort "C-style" comparison function
- Boolean ComparePairs (const FontPair &a, const FontPair &b);
-
-