home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 5 / FreshFish_July-August1994.bin / bbs / gnu / aplusplus-1.01-src.lha / src / amiga / aplusplus-1.01 / include / aplusplus / graphics / FontC.h < prev    next >
C/C++ Source or Header  |  1994-05-09  |  1KB  |  49 lines

  1. #ifndef APP_FontC_H
  2. #define APP_FontC_H
  3. /******************************************************************************
  4.  **
  5.  **    C++ Class Library for the Amiga© system software.
  6.  **
  7.  **    Copyright (C) 1994 by Armin Vogt  **  EMail: armin@uni-paderborn.de
  8.  **    All Rights Reserved.
  9.  **
  10.  **    $VER: apphome:APlusPlus/graphics/FontC.h 1.04 (04.05.94) $
  11.  **    
  12.  ******************************************************************************/
  13.  
  14. extern "C" {
  15. #include <graphics/text.h>
  16. #include <exec/types.h>
  17. }
  18.  
  19.  
  20. /******************************************************************************************
  21.       » FontC class «
  22.  
  23.     Each FontC object poses as handle to one Amiga® font.
  24.     The font specifications default to the IntuiRoot Screen's Font which may be proportional.
  25.  ******************************************************************************************/
  26.  
  27. class FontC 
  28. {
  29.     private:
  30.         struct TextFont *font;
  31.         void create(UBYTE *fontName,UWORD ySize,UBYTE style,UBYTE flags);
  32.         void copy(const FontC& from);
  33.         
  34.    public:
  35.       FontC(UBYTE *fontName=0,UWORD ySize=0,UBYTE style=0,UBYTE flags=0);
  36.         // defaults to Preferences Screen Font.
  37.         
  38.         FontC(struct TextAttr *ta);
  39.         FontC(struct TextFont *tf);
  40.         FontC(const FontC& from);
  41.         FontC& operator = (const FontC&);
  42.       ~FontC();
  43.         
  44.         operator const struct TextFont * () const { return font; }    // conversion operator
  45.         operator const struct TextAttr * () const;
  46.         UWORD ySize() { return font->tf_YSize; }
  47. };
  48. #endif    /* APP_FontC */
  49.