home *** CD-ROM | disk | FTP | other *** search
/ Tools / WinSN5.0Ver.iso / NETSCAP.50 / WIN1998.ZIP / ns / cmd / winfe / apipage.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-04-08  |  2.6 KB  |  119 lines

  1. /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
  2.  *
  3.  * The contents of this file are subject to the Netscape Public License
  4.  * Version 1.0 (the "NPL"); you may not use this file except in
  5.  * compliance with the NPL.  You may obtain a copy of the NPL at
  6.  * http://www.mozilla.org/NPL/
  7.  *
  8.  * Software distributed under the NPL is distributed on an "AS IS" basis,
  9.  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
  10.  * for the specific language governing rights and limitations under the
  11.  * NPL.
  12.  *
  13.  * The Initial Developer of this code under the NPL is Netscape
  14.  * Communications Corporation.  Portions created by Netscape are
  15.  * Copyright (C) 1998 Netscape Communications Corporation.  All Rights
  16.  * Reserved.
  17.  */
  18.  
  19. // apiprint.h contains the page setup api
  20.  
  21. #ifndef __APIPAGE_H
  22. #define __APIPAGE_H
  23.  
  24. #ifndef __APIAPI_H
  25.     #include "apiapi.h"
  26. #endif
  27. #ifndef __NSGUIDS_H
  28.     #include "nsguids.h"
  29. #endif
  30.  
  31. // APIID_Printer (IPrinter interface)
  32. // this interface is used to retrieve and set information from
  33. // the page setup object.   The functions are pretty self
  34. // explanatory.  A -1 gets the current value in the single
  35. // argument function calls.
  36.  
  37. class IPageSetup {
  38. public:
  39.  
  40.     virtual    void GetMargins ( 
  41.         long * plLeft,
  42.         long * plRight,
  43.         long * plTop,
  44.         long * plBottom 
  45.         ) = 0;
  46.  
  47.     virtual void SetMargins (
  48.         long lLeft,
  49.         long lRight,
  50.         long lTop,
  51.         long lBottom
  52.         ) = 0;
  53.  
  54.     virtual void GetPageSize (
  55.         long * lWidth,
  56.         long * lHeight
  57.         ) = 0;
  58.  
  59.     virtual void SetPageSize (
  60.         long lWidth,
  61.         long lHeight
  62.         ) = 0;
  63.     virtual void SetPrintingBkImage (BOOL flag) = 0;
  64.     virtual BOOL IsPrintingBkImage (void) = 0;
  65.  
  66. #define    PRINT_TITLE        1
  67. #define PRINT_URL        2
  68.  
  69.     // -1 = Get state
  70.     //  0 = disable
  71.     //
  72.     //  1 (01) = title
  73.     //  2 (10) = location (URL)
  74.     //  combinable with OR
  75.  
  76.     virtual int Header ( 
  77.         int flag = -1
  78.         ) = 0;
  79.  
  80. #define    PRINT_PAGENO    1
  81. #define PRINT_PAGECOUNT    2
  82. #define    PRINT_DATE        4
  83.  
  84.     // -1 = Get state
  85.     //  0 = disable
  86.     //
  87.     //  1 (001) = page #
  88.     //  2 (010) = total page count
  89.     //  4 (100) = date printed
  90.     //  combinable with OR
  91.  
  92.     virtual int Footer (
  93.         int flag = -1
  94.         ) = 0;
  95.  
  96.     virtual int SolidLines (
  97.         int flag = -1
  98.         ) = 0;
  99.         
  100.     virtual int BlackText (
  101.         int flag = -1
  102.         ) = 0;
  103.  
  104.     virtual int BlackLines (
  105.         int flag = -1
  106.         ) = 0;
  107.  
  108.     virtual int ReverseOrder (
  109.         int flag = -1
  110.         ) = 0;
  111. };
  112.  
  113. typedef IPageSetup * LPPAGESETUP;
  114.  
  115. #define    APICLASS_PAGESETUP    "PageSetup"
  116. #define ApiPageSetup(v,unk) APIPTRDEF(IID_IPageSetup,IPageSetup,v,unk)
  117.  
  118. #endif
  119.