home *** CD-ROM | disk | FTP | other *** search
/ Tools / WinSN5.0Ver.iso / NETSCAP.50 / WIN1998.ZIP / ns / cmd / winfe / cxmeta.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-04-08  |  2.1 KB  |  65 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. #ifndef MetaFileContext__H
  20. #define MetaFileContext__H
  21.  
  22. //    Deriving from CDCCX
  23. #include "cxdc.h"
  24.  
  25. class CMetaFileCX : public CDCCX    {
  26. //    construction, destructions, indirect construction
  27. public:
  28.     CMetaFileCX(CDC* pMetaFileDC, SIZE& pSize, URL_Struct *pUrl);
  29.     ~CMetaFileCX();
  30.     static DWORD MetaFileAnchorObject(CDC *pMetaFileDC, SIZE& pSize, URL_Struct *pUrl);
  31.  
  32. //    CDC Access.
  33. private:
  34.     CDC *m_pMetaFileDC;
  35.     lo_SavedEmbedListData* m_embedList;        /* to save the savedData from the URL struct.*/
  36.  
  37. public:
  38.     virtual HDC GetContextDC();
  39.     virtual BOOL IsDeviceDC() {return TRUE;}
  40.     virtual HDC GetAttribDC() {return m_pMetaFileDC->m_hAttribDC;}
  41.     virtual void ReleaseContextDC(HDC pDC);
  42.  
  43. //    The size of the viewport which we'll be formatting layout to.
  44. protected:
  45.     SIZE m_csViewport;
  46.  
  47. //    Post Initialization
  48. public:
  49.     virtual void Initialize(BOOL bOwnDC, RECT *pRect = NULL, BOOL bInitialPalette = TRUE, BOOL bNewMemDC = TRUE);
  50.  
  51. //    Context sensitive attribute mapping.
  52. public:
  53.     virtual PRBool ResolveIncrementalImages();
  54.  
  55. //    Overrides
  56. public:
  57.     //    All connections complete.
  58.     virtual void AllConnectionsComplete(MWContext *pContext);
  59.     //    Layout initialization respecting page size.
  60.     virtual void LayoutNewDocument(MWContext *pContext, URL_Struct *pURL, int32 *pWidth, int32 *pHeight, int32 *pmWidth, int32 *pmHeight);
  61.  
  62. };
  63.  
  64. #endif // MetaFileContext__H
  65.