home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / opendc12.zip / od124os2.exe / od12osp1.exe / pkg / en_US / iodpage.odz / iodpage.idl < prev    next >
Text File  |  1997-04-02  |  8KB  |  247 lines

  1. //#====START_GENERATED_PROLOG======================================
  2. //#
  3. //#
  4. //#   COMPONENT_NAME: odpagepart
  5. //#
  6. //#   CLASSES: none
  7. //#
  8. //#   ORIGINS: 82,27
  9. //#
  10. //#
  11. //#   (C) COPYRIGHT International Business Machines Corp. 1995,1996
  12. //#   All Rights Reserved
  13. //#   Licensed Materials - Property of IBM
  14. //#   US Government Users Restricted Rights - Use, duplication or
  15. //#   disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  16. //#       
  17. //#   IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
  18. //#   ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
  19. //#   PURPOSE. IN NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR
  20. //#   CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
  21. //#   USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
  22. //#   OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE
  23. //#   OR PERFORMANCE OF THIS SOFTWARE.
  24. //#
  25. //#====END_GENERATED_PROLOG========================================
  26. //#
  27.  
  28. //   @(#) 1.10 com/src/samples/pagepart/iodpage.idl, odpagepart, od96os2, odos29712d 3/7/97 13:03:22 [3/21/97 17:49:00]
  29.  
  30.  
  31. #ifndef _PageLayout_
  32. #define _PageLayout_
  33.  
  34. #ifndef _CONTAINER_
  35. #include <iodbasec.idl>
  36. #endif
  37.  
  38.  
  39. //======================================================================
  40. // Classes defined in this interface
  41. //======================================================================
  42.  
  43. interface  PageLayout;
  44. interface  M_PageLayout;
  45.  
  46. //======================================================================
  47. // Classes used by this interface
  48. //======================================================================
  49.  
  50. interface BaseContainer;
  51. interface M_BaseContainer;
  52. interface ContentObject;
  53. interface PageLayoutPrintExtension;
  54. interface ODScrollExtension;
  55. interface ODFrame;
  56. interface ODShape;
  57. interface ODMenuBar;
  58.  
  59.  
  60. //======================================================================
  61. // Type definitions used by this interface
  62. //======================================================================
  63.  
  64. typedef unsigned long  HMODULE;
  65. typedef unsigned long  HDRAW;
  66.  
  67.  
  68. //======================================================================
  69. // PageLayout Implementation
  70. //======================================================================
  71.  
  72. interface PageLayout : BaseContainer
  73. {
  74.    void DetermineVisiblePages(in ODFrame frame);
  75.    ODBoolean MaxPagesReached();
  76.    void InsertPage(in ODFrame frame, in short pageNumber);
  77.    void RemovePage(in ODFrame frame, in short pageNumber);
  78.    void ChangePaperSize(in ODFrame frame);
  79.    short DeterminePageNumberOfEmbed(in ContentObject object);
  80.    ODBoolean KeepEmbedWithinMargins(in ContentObject object);
  81.    void SnapToGrid(in ODFrame frame);
  82.    void FillEntirePage(in ODFrame frame);
  83.    void MoveEmbedsByOnePage(in short afterPage, in short direction);
  84.    void ResizeDocShell(in ODFacet facet);
  85.    void CreateMenuBar();
  86.    void DrawPage(in HDRAW DrawingSurface, in short pageNumber, in ODBoolean isPrinting, in ODBoolean DrawAdornments);
  87.  
  88.  
  89. #ifdef __SOMIDL__
  90.   implementation
  91.   {
  92.         dllname = "IODPage.dll";
  93.         functionprefix = PageLayout;
  94.         metaclass      = M_PageLayout;
  95.         majorversion = 1;
  96.         minorversion = 0;
  97.  
  98.         override:
  99.                 UpdateContentExtent,
  100.                 CreatePrintExtension,
  101.                 EnablePrinting,
  102.                 SetupPrinting,
  103.                 HandleScrollEvent,
  104.                 HandleMenuEvent,
  105.                 AdjustMenus,
  106.                 FacetAdded,
  107.                 FrameShapeChanged,
  108.                 ChangeNotification,
  109.                 DrawContents,
  110.                 ReadContents,
  111.                 WriteContents,
  112.                 ReadKindInfo,
  113.                 WriteKindInfo,
  114.                 WriteIconToSU,
  115.                 Initialize,
  116.                 ReleaseAll,
  117.                 somInit,
  118.                 somUninit;
  119.  
  120.         releaseorder:
  121.                 DetermineVisiblePages,
  122.                 MaxPagesReached,
  123.                 InsertPage,
  124.                 RemovePage,
  125.                 ChangePaperSize,
  126.                 DeterminePageNumberOfEmbed,
  127.                 KeepEmbedWithinMargins,
  128.                 SnapToGrid,
  129.                 FillEntirePage,
  130.                 MoveEmbedsByOnePage,
  131.                 ResizeDocShell,
  132.                 CreateMenuBar,
  133.                 DrawPage;
  134.  
  135.         //=======================================
  136.         // PageLayout Instance Variables
  137.         //=======================================
  138.  
  139.                 ODPart                    fPartWrapper;
  140.  
  141.                 PageLayoutPrintExtension  fPrintExt;
  142.                 ODScrollExtension         fScrollExt;
  143.  
  144.                 HMODULE                   fResources;
  145.                 ODMenuBar                 fMenuBar;
  146.  
  147.                 char*                     fCurrentPrinterQueueName;
  148.  
  149.                 short                     fNumberOfPages;
  150.                 long                      fPageWidth;
  151.                 long                      fPageHeight;
  152.  
  153.                 long                      fTotalPageWidth;
  154.                 long                      fTotalPageHeight;
  155.  
  156.                 short                     fFirstVisiblePage;
  157.                 short                     fLastVisiblePage;
  158.  
  159.                 ODBoolean                 fShowHorzRuler;
  160.                 ODBoolean                 fShowVertRuler;
  161.                 ODBoolean                 fShowHorzMargins;
  162.                 ODBoolean                 fShowVertMargins;
  163.                 ODBoolean                 fShowGrid;
  164.  
  165.                 ODBoolean                 fRulerUnits;
  166.  
  167.                 ODBoolean                 fIsTransparent;
  168.                 ODBoolean                 fPrintPageColor;
  169.  
  170.                 short                     fMarginLine;
  171.                 short                     fGridLine;
  172.  
  173.                 short                     fPageUnitMeasure;
  174.                 short                     fMarginsUnitMeasure;
  175.                 short                     fGridUnitMeasure;
  176.  
  177.                 long                      fGridSpacing;
  178.  
  179.                 long                      fPageNumberPosition;
  180.                 long                      fPageNumberStartOn;
  181.                 long                      fPageNumberStartWith;
  182.  
  183.                 char                      fCurrentFont[32];
  184.  
  185.                 long                      fHeaderFooterStartOn;
  186.                 char                      fHeaderText[256];
  187.                 char                      fFooterText[256];
  188.  
  189.                 long                      fLeftPageOffset;
  190.                 long                      fRightPageOffset;
  191.                 long                      fBottomPageOffset;
  192.                 long                      fTopPageOffset;
  193.  
  194.                 long                      fLeftMargin;
  195.                 long                      fRightMargin;
  196.                 long                      fBottomMargin;
  197.                 long                      fTopMargin;
  198.  
  199.                 COLORREF                  fPageColor;
  200.                 COLORREF                  fBackgroundColor;
  201.                 COLORREF                  fPageStringColor;
  202.                 COLORREF                  fRulerColor;
  203.                 COLORREF                  fHorzMarginColor;
  204.                 COLORREF                  fVertMarginColor;
  205.                 COLORREF                  fGridColor;
  206.  
  207.                 double                    fXScaleFactor;
  208.                 double                    fYScaleFactor;
  209.  
  210.                 ODBoolean                 fNeedToResizeDocShell;
  211.  
  212.                 ODBoolean                 fSameColorAsContainer;
  213.  
  214.                 ODShape                   fBackgroundShape;
  215.                 ODShape                   fVisiblePagesShape;
  216.  
  217.   }; // end implementation section
  218.  
  219. #endif //__SOMIDL__
  220.  
  221. }; // end interface definition
  222.  
  223.  
  224. // ******************************************************************
  225.  
  226. interface M_PageLayout : M_BaseContainer
  227. {
  228.  
  229. #ifdef __SOMIDL__
  230.   implementation
  231.   {
  232.     functionprefix = M_PageLayout;
  233.  
  234.     override:
  235.         clsGetODPartHandlerName,
  236.         clsGetODPartHandlerDisplayName,
  237.         clsGetODPartKinds,
  238.         clsGetOLE2ClassId,
  239.         clsGetWindowsIconFileName;
  240.   };
  241.  
  242. #endif  // _SOMIDL__
  243. };
  244.  
  245. #endif //_PageLayout_
  246.  
  247.