home *** CD-ROM | disk | FTP | other *** search
/ NeXTSTEP 3.0 / NeXTSTEP3.0.iso / NextDeveloper / Headers / appkit / FontManager.h < prev    next >
Text File  |  1991-11-20  |  3KB  |  104 lines

  1. /*
  2.     FontManager.h
  3.     Application Kit, Release 2.0
  4.     Copyright (c) 1988, 1989, 1990, NeXT, Inc.  All rights reserved. 
  5. */
  6.  
  7. #import <objc/Object.h>
  8.  
  9. typedef unsigned int NXFontTraitMask;
  10.  
  11. /*
  12.  * Font Traits
  13.  *
  14.  * This list should be kept small since the more traits that are assigned
  15.  * to a given font, the harder it will be to map it to some other family.
  16.  * Some traits are mutually exclusive such as NX_EXPANDED and NX_CONDENSED.
  17.  */
  18.  
  19. #define NX_ITALIC        0x00000001
  20. #define NX_BOLD            0x00000002
  21. #define NX_UNBOLD        0x00000004
  22. #define NX_NONSTANDARDCHARSET    0x00000008
  23. #define NX_NARROW        0x00000010
  24. #define NX_EXPANDED        0x00000020
  25. #define NX_CONDENSED        0x00000040
  26. #define NX_SMALLCAPS        0x00000080
  27. #define NX_POSTER        0x00000100
  28. #define NX_COMPRESSED        0x00000200
  29. #define NX_UNITALIC         0x01000000    /* historical */
  30.  
  31. /* whatToDo values */
  32.  
  33. #define NX_NOFONTCHANGE        0
  34. #define NX_VIAPANEL        1
  35. #define NX_ADDTRAIT        2
  36. #define NX_SIZEUP        3
  37. #define NX_SIZEDOWN        4
  38. #define NX_HEAVIER        5
  39. #define NX_LIGHTER        6
  40. #define NX_REMOVETRAIT        7
  41.  
  42. #define NX_CHANGETRAIT        2    /* historical */
  43.  
  44. @interface FontManager : Object
  45. {
  46.     id                  panel;
  47.     id                  menu;
  48.     SEL                 action;
  49.     int                 whatToDo;
  50.     NXFontTraitMask     traitToChange;
  51.     id                  selFont;
  52.     struct _fmFlags {
  53.     unsigned int        multipleFont:1;
  54.     unsigned int        disabled:1;
  55.     unsigned int        _RESERVED:14;
  56.     }                   fmFlags;
  57.     unsigned short      _lastPos;
  58.     id                delegate;
  59.     unsigned int        _reservedFMint2;
  60.     unsigned int        _reservedFMint3;
  61.     unsigned int        _reservedFMint4;
  62. }
  63.  
  64. + setFontPanelFactory:factoryId;
  65. + setFontManagerFactory:factoryId;
  66. + new;
  67. + allocFromZone:(NXZone *)zone;
  68. + alloc;
  69.  
  70. - (BOOL)isMultiple;
  71. - selFont;
  72. - setSelFont:fontObj isMultiple:(BOOL)flag;
  73. - convertFont:fontObj;
  74. - getFontMenu:(BOOL)create;
  75. - getFontPanel:(BOOL)create;
  76. - findFont:(const char *)family traits:(NXFontTraitMask)traits weight:(int)weight size:(float)size;
  77. - getFamily:(const char **)family traits:(NXFontTraitMask *)traits weight:(int *)weight size:(float *)size ofFonUEntObj;
  78. - (char **)availableFonts;
  79. - convert:fontObj toSize:(float)size;
  80. - convert:fontObj toFace:(const char *)typeface;
  81. - convert:fontObj toFamily:(const char *)family;
  82. - convert:fontObj toHaveTrait:(NXFontTraitMask)trait;
  83. - convert:fontObj toNotHaveTrait:(NXFontTraitMask)trait;
  84. - convertWeight:(BOOL)upFlag of:fontObj;
  85. - addFontTrait:sender;
  86. - removeFontTrait:sender;
  87. - modifyFont:sender;
  88. - orderFrontFontPanel:sender;
  89. - modifyFontViaPanel:sender;
  90. - (BOOL)isEnabled;
  91. - setEnabled:(BOOL)flag;
  92. - (SEL)action;
  93. - setAction:(SEL)aSelector;
  94. - finishUnarchiving;
  95. - sendAction;
  96. - setDelegate:anObject;
  97. - delegate;
  98.  
  99. @end
  100.  
  101. @interface Object(FontManagerDelegate)
  102. - (BOOL)fontManager:sender willIncludeFont:(const char *)fontName;
  103. @end
  104.