home *** CD-ROM | disk | FTP | other *** search
/ Tools / WinSN5.0Ver.iso / NETSCAP.50 / WIN1998.ZIP / ns / cmd / winfe / animbar.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-04-08  |  2.1 KB  |  84 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. #ifndef _ANIMBAR_H
  19. #define _ANIMBAR_H
  20.  
  21. #include "toolbar2.h"
  22.  
  23. class CAnimation: public CWnd
  24. {
  25. protected:
  26.     SIZE m_iconSize;
  27.     int m_iFrameCount;
  28.  
  29.     HBITMAP m_hAnimBitmap;
  30.     int m_iAnimationCount;
  31.     UINT m_uAnimationClock;
  32.     BOOL m_bInited;
  33.     BOOL m_bCaptured, m_bDepressed;
  34.  
  35.     void AnimateIcon();
  36.  
  37. public:
  38.     CAnimation( CWnd *pParent );
  39.  
  40.     void StopAnimation();
  41.     void StartAnimation();
  42.  
  43. protected:
  44.     afx_msg void OnPaint();
  45.     afx_msg void OnTimer(UINT);
  46.     afx_msg void OnLButtonDown( UINT nFlags, CPoint point );
  47.     afx_msg void OnMouseMove( UINT nFlags, CPoint point );
  48.     afx_msg void OnLButtonUp( UINT nFlags, CPoint point );
  49.     afx_msg void OnDestroy();
  50.  
  51.     DECLARE_MESSAGE_MAP()
  52. };
  53.  
  54. #define CAnimationBarParent CToolbarControlBar
  55.  
  56. class CAnimationBar: public CAnimationBarParent
  57. {
  58. protected:
  59.     POINT m_iconPt;
  60.     CAnimation *m_wndAnimation;
  61.  
  62. public:
  63.     CAnimationBar();
  64.     ~CAnimationBar();
  65.  
  66.     void StopAnimation();
  67.     void StartAnimation();
  68.     void PlaceToolbar(void);
  69.  
  70. protected:
  71. #ifdef XP_WIN32
  72. // Attributes
  73.     virtual CSize CalcFixedLayout(BOOL bStretch, BOOL bHorz);
  74.     virtual CSize CalcDynamicLayout(int nLength, DWORD dwMode );
  75.  
  76. #endif
  77.  
  78.     afx_msg int OnCreate( LPCREATESTRUCT lpCreateStruct );
  79.     afx_msg void OnSize( UINT nType, int cx, int cy );
  80.     DECLARE_MESSAGE_MAP()
  81. };
  82.  
  83. #endif
  84.