PlayerSeekBar.h

00001 /* 
00002  *      Copyright (C) 2003-2005 Gabest
00003  *      http://www.gabest.org
00004  *
00005  *  This Program is free software; you can redistribute it and/or modify
00006  *  it under the terms of the GNU General Public License as published by
00007  *  the Free Software Foundation; either version 2, or (at your option)
00008  *  any later version.
00009  *   
00010  *  This Program is distributed in the hope that it will be useful,
00011  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00013  *  GNU General Public License for more details.
00014  *   
00015  *  You should have received a copy of the GNU General Public License
00016  *  along with GNU Make; see the file COPYING.  If not, write to
00017  *  the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. 
00018  *  http://www.gnu.org/copyleft/gpl.html
00019  *
00020  */
00021 
00022 #pragma once
00023 
00024 // CPlayerSeekBar
00025 
00026 class CPlayerSeekBar : public CDialogBar
00027 {
00028         DECLARE_DYNAMIC(CPlayerSeekBar)
00029 
00030 private:
00031         __int64 m_start, m_stop, m_pos, m_posreal;
00032         bool m_fEnabled;
00033         
00034         void MoveThumb(CPoint point);
00035         void SetPosInternal(__int64 pos);
00036 
00037         CRect GetChannelRect();
00038         CRect GetThumbRect();
00039         CRect GetInnerThumbRect();
00040 
00041 public:
00042         CPlayerSeekBar();
00043         virtual ~CPlayerSeekBar();
00044 
00045         void Enable(bool fEnable);
00046 
00047         void GetRange(__int64& start, __int64& stop);
00048         void SetRange(__int64 start, __int64 stop);
00049         __int64 GetPos(), GetPosReal();
00050         void SetPos(__int64 pos);
00051 
00052 
00053 // Overrides
00054         // ClassWizard generated virtual function overrides
00055         //{{AFX_VIRTUAL(CPlayerSeekBar)
00056         virtual BOOL Create(CWnd* pParentWnd);
00057         virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
00058         //}}AFX_VIRTUAL
00059 
00060 // Generated message map functions
00061 protected:
00062         //{{AFX_MSG(CPlayerSeekBar)
00063         afx_msg void OnPaint();
00064         afx_msg void OnSize(UINT nType, int cx, int cy);
00065         afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
00066         afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
00067         afx_msg void OnMouseMove(UINT nFlags, CPoint point);
00068         afx_msg BOOL OnEraseBkgnd(CDC* pDC);
00069         //}}AFX_MSG
00070         DECLARE_MESSAGE_MAP()
00071 public:
00072         afx_msg BOOL OnPlayStop(UINT nID);
00073 };

Generated on Tue Dec 13 14:46:59 2005 for guliverkli by  doxygen 1.4.5