home *** CD-ROM | disk | FTP | other *** search
/ Tools / WinSN5.0Ver.iso / NETSCAP.50 / WIN1998.ZIP / ns / cmd / winfe / splash.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-04-08  |  2.4 KB  |  99 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 _SPLASH_H_
  20. #define _SPLASH_H_
  21. // splash.h : header file
  22. //
  23.  
  24. /////////////////////////////////////////////////////////////////////////////
  25. // CBigIcon window
  26.  
  27. class CBigIcon : public CButton
  28. {
  29. // Construction
  30. public:
  31.     CBigIcon();
  32.     ~CBigIcon();
  33. // Attributes
  34. public:
  35.     HBITMAP m_hBitmap;
  36.     CSize m_sizeBitmap;
  37.  
  38. // Operations
  39. public:
  40.     void     SizeToContent(CSize& SizeBitmap);
  41.     void    DisplayStatus(LPCSTR lpszStatus);
  42.     void    CleanupResources(void);
  43.  
  44. // Implementation
  45. protected:
  46.     CFont   m_font;
  47.     CFont    m_copyrightFont;
  48.  
  49.     virtual void DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct);
  50.     void    DisplayCopyright(void);
  51.     void CenterText(CClientDC &dc, LPCSTR lpszStatus, int top);
  52.  
  53.     //{{AFX_MSG(CBigIcon)
  54.     afx_msg BOOL OnEraseBkgnd(CDC* pDC);
  55.     //}}AFX_MSG
  56.     DECLARE_MESSAGE_MAP()
  57. };
  58.  
  59. /////////////////////////////////////////////////////////////////////////////
  60. // CSplash dialog
  61.  
  62. class CSplashWnd : public CDialog
  63. {
  64. private:
  65.     BOOL    m_bNavBusyIniting;
  66.     int     m_timerID;
  67.     CSize   m_sizeBitmap;
  68.  
  69. // Construction
  70. public:
  71.     CSplashWnd();
  72.     BOOL Create(CWnd* pParent);
  73.  
  74.     void    DisplayStatus(LPCSTR lpszStatus);
  75.  
  76. // Dialog Data
  77.     //{{AFX_DATA(CSplashWnd)
  78.     enum { IDD = IDD_PLUGIN_SPLASH };
  79.         // NOTE: the ClassWizard will add data members here
  80.     //}}AFX_DATA
  81.  
  82. // Implementation
  83.     void NavDoneIniting();
  84.     void SafeHide();
  85.  
  86. protected:
  87.     CBigIcon m_icon; // self-draw button
  88.     void OnLogoClicked();
  89.  
  90.     // Generated message map functions
  91.     //{{AFX_MSG(CSplashWnd)
  92.     virtual void OnTimer(UINT);
  93.     virtual BOOL OnInitDialog();
  94.     //}}AFX_MSG
  95.     DECLARE_MESSAGE_MAP()
  96. };
  97.  
  98. #endif // _SPLASH_H_
  99.