home *** CD-ROM | disk | FTP | other *** search
/ Tools / WinSN5.0Ver.iso / NETSCAP.50 / WIN1998.ZIP / ns / cmd / winfe / srvritem.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-04-08  |  2.0 KB  |  68 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 __ServerItem_H
  20. #define __ServerItem_H
  21. // interface of the CNetscapeSrvrItem class
  22. //
  23.  
  24. class CNetscapeSrvrItem : public COleServerItem
  25. {
  26.     DECLARE_DYNAMIC(CNetscapeSrvrItem)
  27.  
  28. // Constructors
  29. public:
  30.     CNetscapeSrvrItem(CGenericDoc* pContainerDoc);
  31.  
  32. // Attributes
  33.     CGenericDoc* GetDocument() const
  34.         { return (CGenericDoc*)COleServerItem::GetDocument(); }
  35.     BOOL IsShowUI() {return  m_ShowUI;}
  36.  
  37. // Overrides
  38.     // ClassWizard generated virtual function overrides
  39.     //{{AFX_VIRTUAL(CNetscapeSrvrItem)
  40.     public:
  41.     virtual BOOL OnDraw(CDC* pDC, CSize& rSize);
  42.     virtual BOOL OnGetExtent(DVASPECT dwDrawAspect, CSize& rSize);
  43.     virtual BOOL OnSetExtent(DVASPECT nDrawAspect, const CSize& size);
  44.     //}}AFX_VIRTUAL
  45.  
  46. // Implementation
  47. public:
  48.     ~CNetscapeSrvrItem();
  49. #ifdef _DEBUG
  50.     virtual void AssertValid() const;
  51.     virtual void Dump(CDumpContext& dc) const;
  52. #endif
  53.     void OnDoVerb(LONG iVerb);
  54.  
  55. protected:
  56.     BOOL m_ShowUI;
  57.     virtual void Serialize(CArchive& ar);   // overridden for document i/o
  58.  
  59. //    Loading and unloading of OLE menus only when needed.
  60. private:
  61.     static int m_iOLEMenuLock;
  62.     void LoadOLEMenus();
  63.     void UnloadOLEMenus();
  64. };
  65.  
  66. /////////////////////////////////////////////////////////////////////////////
  67. #endif // __ServerItem_H
  68.