]> git.saurik.com Git - wxWidgets.git/blame_incremental - include/wx/mac/carbon/moviectrl.h
wxMovieCtrl - for playing movies - mac carbon QT 3 MSW-compatable implementation...
[wxWidgets.git] / include / wx / mac / carbon / moviectrl.h
... / ...
CommitLineData
1/////////////////////////////////////////////////////////////////////////////
2// Name: wx/msw/moviectrl.h
3// Purpose: DirectX7+ wxMovieCtrl MSW
4// Author: Ryan Norton <wxprojects@comcast.net>
5// Modified by:
6// Created: 11/07/04
7// RCS-ID: $Id$
8// Copyright: (c) Ryan Norton
9// Licence: wxWindows licence
10/////////////////////////////////////////////////////////////////////////////
11
12#include "wx/defs.h"
13
14#if wxUSE_MOVIECTRL
15
16#include "wx/datetime.h"
17
18enum wxMovieCtrlState
19{
20 wxMOVIECTRL_STOPPED,
21 wxMOVIECTRL_PAUSED,
22 wxMOVIECTRL_PLAYING
23};
24
25class wxMovieCtrl : public wxControl
26{
27public:
28 wxMovieCtrl()
29 { }
30
31 wxMovieCtrl(wxWindow* parent, wxWindowID id, const wxString& fileName, const wxString& label = wxT(""),
32 const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
33 long style = 0, const wxString& name = wxPanelNameStr)
34 { Create(parent, id, fileName, label, pos, size, style, name); }
35
36 ~wxMovieCtrl();
37
38 bool Create(wxWindow* parent, wxWindowID id, const wxString& fileName, const wxString& label = wxT(""),
39 const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
40 long style = 0, const wxString& name = wxPanelNameStr);
41
42 bool Play();
43 bool Pause();
44 bool Stop();
45
46 wxMovieCtrlState GetState();
47
48#if wxUSE_DATETIME
49 bool Seek(const wxTimeSpan& where);
50#endif
51
52 virtual void SetLabel(const wxString& label);
53
54protected:
55 void OnSize(wxSizeEvent& evt);
56 wxSize DoGetBestSize() const;
57 bool InitQT();
58
59 struct MovieRecord* m_movie;
60 wxSize m_bestSize;
61 class _wxQTTimer* m_timer;
62
63 DECLARE_DYNAMIC_CLASS(wxMovieCtrl);
64 DECLARE_EVENT_TABLE()
65};
66
67#endif // wxUSE_MOVIECTRL