]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/mac/carbon/moviectrl.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/msw/moviectrl.h
3 // Purpose: DirectX7+ wxMovieCtrl MSW
4 // Author: Ryan Norton <wxprojects@comcast.net>
8 // Copyright: (c) Ryan Norton
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
16 #include "wx/datetime.h"
17 #include "wx/control.h"
26 class wxMovieCtrl
: public wxControl
29 wxMovieCtrl() : m_bLoaded(false)
32 wxMovieCtrl(wxWindow
* parent
, wxWindowID id
, const wxString
& fileName
, const wxString
& label
= wxT(""),
33 const wxPoint
& pos
= wxDefaultPosition
, const wxSize
& size
= wxDefaultSize
,
34 long style
= 0, const wxString
& name
= wxPanelNameStr
) : m_bLoaded(false)
35 { Create(parent
, id
, fileName
, label
, pos
, size
, style
, name
); }
39 bool Create(wxWindow
* parent
, wxWindowID id
, const wxString
& fileName
, const wxString
& label
= wxT(""),
40 const wxPoint
& pos
= wxDefaultPosition
, const wxSize
& size
= wxDefaultSize
,
41 long style
= 0, const wxString
& name
= wxPanelNameStr
);
47 wxMovieCtrlState
GetState();
49 double GetPlaybackRate();
50 bool SetPlaybackRate(double dRate
);
52 bool Load(const wxString
& fileName
);
55 bool Seek(const wxTimeSpan
& where
);
61 void OnSize(wxSizeEvent
& evt
);
62 wxSize
DoGetBestSize() const;
68 struct MovieRecord
* m_movie
;
70 class _wxQTTimer
* m_timer
;
72 friend class _wxQTTimer
;
74 DECLARE_DYNAMIC_CLASS(wxMovieCtrl
);
78 class WXDLLEXPORT wxMovieEvent
: public wxNotifyEvent
81 wxMovieEvent(wxEventType commandType
= wxEVT_NULL
, int id
= 0)
82 : wxNotifyEvent(commandType
, id
)
85 wxMovieEvent(const wxMovieEvent
&clone
)
86 : wxNotifyEvent(clone
.GetEventType(), clone
.GetId())
89 wxEvent
*Clone() { return new wxMovieEvent(*this); }
91 DECLARE_DYNAMIC_CLASS(wxMovieEvent
)
94 #define wxMOVIE_FINISHED_ID 13000
95 DECLARE_EVENT_TYPE(wxEVT_MOVIE_FINISHED
, wxMOVIE_FINISHED_ID
)
96 typedef void (wxEvtHandler::*wxMovieEventFunction
)(wxMovieEvent
&);
97 #define EVT_MOVIE_FINISHED(winid, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_MOVIE_FINISHED, winid, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxMovieEventFunction) & fn, (wxObject *) NULL ),
99 #endif // wxUSE_MOVIECTRL