home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1998 January: Mac OS SDK / Dev.CD Jan 98 SDK2.toast / Development Kits (Disc 2) / QuickDraw GX / Programming Stuff / GX Libraries / JobFormatModeLibrary.c < prev    next >
Encoding:
C/C++ Source or Header  |  1995-06-16  |  3.5 KB  |  120 lines  |  [TEXT/MPS ]

  1.  
  2. /*
  3.     File:        JobFormatModeLibrary.c
  4.  
  5.     Contains:    This file contains handy job format mode sample routines.
  6.  
  7.     Version:    Quickdraw GX 1.1
  8.  
  9.     Written by:    Dave Hersey
  10.  
  11.     Copyright:    © 1994-1995 by Apple Computer, Inc., all rights reserved.
  12.  
  13.     File Ownership:
  14.  
  15.         DRI:                 Dave Hersey
  16.  
  17.         Other Contact:        Ron Voss
  18.  
  19.         Technology:         QuickDraw GX
  20.  
  21.     Change History (most recent first):
  22.  
  23.          <1>      6/6/95    DH        First checked in.
  24. */
  25.  
  26. #include "JobFormatModeLibrary.h"
  27.  
  28.  
  29. /* Wrappers for JobFormatModeQuery() */
  30.  
  31.  
  32. /****************************************************************************************
  33.  
  34.                             GetJobFormatLineConstraint
  35.                             
  36.     function :
  37.                     Returns position constraint table for direct mode line drawing
  38.     parameters :
  39.                     the job and optional handle to hold the position constraint table
  40.                     
  41. ****************************************************************************************/
  42. gxPositionConstraintTableHdl GetJobFormatLineConstraint(gxJob theJob, gxPositionConstraintTableHdl hPositionConstraintTable) {
  43.     
  44.     GXJobFormatModeQuery(theJob, gxGetJobFormatLineConstraintQuery, NULL, &hPositionConstraintTable);
  45.     
  46.     return hPositionConstraintTable;
  47. }
  48.  
  49.  
  50. /****************************************************************************************
  51.  
  52.                             GetJobFormatFonts
  53.                             
  54.     function :
  55.                     Returns font table for direct mode
  56.     parameters :
  57.                     the job and optional handle to hold the font table
  58.                     
  59. ****************************************************************************************/
  60. gxFontTableHdl GetJobFormatFonts(gxJob theJob, gxFontTableHdl hFontTable) {
  61.     
  62.     GXJobFormatModeQuery(theJob, gxGetJobFormatFontsQuery, NULL, &hFontTable);
  63.     
  64.     return hFontTable;
  65. }
  66.  
  67.  
  68. /****************************************************************************************
  69.  
  70.                             GetJobFormatFontCommonStyles
  71.                             
  72.     function :
  73.                     Returns style name table for direct mode
  74.     parameters :
  75.                     the job and optional handle to hold the style name table
  76.                     
  77. ****************************************************************************************/
  78. gxStyleNameTableHdl GetJobFormatFontCommonStyles(gxJob theJob, gxFont theFont, gxStyleNameTableHdl hStyleTable) {
  79.     
  80.     GXJobFormatModeQuery(theJob, gxGetJobFormatFontCommonStylesQuery, theFont, &hStyleTable);
  81.     
  82.     return hStyleTable;
  83. }
  84.  
  85.  
  86. /****************************************************************************************
  87.  
  88.                             GetJobFormatFontConstraint
  89.                             
  90.     function :
  91.                     Returns position constraint table for direct mode fonts
  92.     parameters :
  93.                     the job and optional handle to hold the position constraint table
  94.                     
  95. ****************************************************************************************/
  96. gxPositionConstraintTableHdl GetJobFormatFontConstraint(gxJob theJob, gxFont theFont, gxPositionConstraintTableHdl hPositionConstraintTable) {
  97.     
  98.     GXJobFormatModeQuery(theJob, gxGetJobFormatFontConstraintQuery, theFont, &hPositionConstraintTable);
  99.     
  100.     return hPositionConstraintTable;
  101. }
  102.  
  103.  
  104. /****************************************************************************************
  105.  
  106.                             SetStyleJobFormatCommonStyle
  107.                             
  108.     function :
  109.                     Returns the style with the additional font style information set
  110.     parameters :
  111.                     the job and a style with the font and size values set
  112.                     
  113. ****************************************************************************************/
  114. gxStyle SetStyleJobFormatCommonStyle(gxJob theJob, Str255 theStyleName, gxStyle theStyle) {
  115.     
  116.     GXJobFormatModeQuery(theJob, gxSetStyleJobFormatCommonStyleQuery, theStyleName, theStyle);
  117.     
  118.     return theStyle;
  119. }
  120.