home *** CD-ROM | disk | FTP | other *** search
/ Adobe Graphics & Publishing SDK 1996 December / Adobe Graphics & Publishing SDK 1996 December.iso / pc / pm65sdk / sourcecode / pagemakerclasslibrary / commands / pruleoptions.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  1996-08-19  |  1.2 KB  |  47 lines

  1. /*
  2.  *--- PRuleOptions.cpp ----------------------------------------------------
  3.  * Copyright (c) 1995-96 Adobe Systems Incorporated.  All rights reserved.
  4.  * Created on Sun, Oct 22, 1995 @ 4:19 PM by Paul Ferguson.
  5.  *
  6.  * Description:  For notes about this class, refer to the
  7.  * PCL documentation file PRuleOptions.html
  8.  *-------------------------------------------------------------------------
  9.  */
  10.  
  11. #include "PRuleOptions.h"
  12. #include "PGetRuleOptions.h"
  13. #include "PRequestBuf.h"
  14. #include "PCommand.h"
  15.  
  16. const size_t REQUEST_SIZE = 12;
  17.  
  18. PRuleOptions::PRuleOptions
  19.   (    long    yTopOffset,
  20.     long    yBottomOffset,
  21.     short    bAlignToGrid,
  22.     short    dGridSize )
  23. {
  24.     char * temp[REQUEST_SIZE];
  25.     PRequestBuf request(temp);
  26.  
  27.     request << yTopOffset << yBottomOffset << bAlignToGrid << dGridSize;
  28.             
  29.     PCommand command(pm_ruleoptions, request);
  30. }
  31.  
  32.  
  33. PRuleOptions::PRuleOptions(const PGetRuleOptions& ruleOpts)
  34. {
  35.     char * temp[REQUEST_SIZE];
  36.     PRequestBuf request(temp);
  37.  
  38.     request << ruleOpts.nTopOffset
  39.             << ruleOpts.nBottomOffset
  40.             << (short) ruleOpts.bAlignToGrid
  41.             << ruleOpts.nGridSize;
  42.             
  43.     PCommand command(pm_ruleoptions, request);
  44. }
  45.  
  46. // end of PRuleOptions.cpp
  47.