X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4ad7af2b83d24c75a0cdf32c7e5ee1c2cc4dd543..3a774635dc72055d9119440f76d1bdceedc3b42e:/include/wx/mac/carbon/moviectrl.h?ds=inline diff --git a/include/wx/mac/carbon/moviectrl.h b/include/wx/mac/carbon/moviectrl.h index eac2847c6f..ac6ab9a8ee 100644 --- a/include/wx/mac/carbon/moviectrl.h +++ b/include/wx/mac/carbon/moviectrl.h @@ -14,6 +14,7 @@ #if wxUSE_MOVIECTRL #include "wx/datetime.h" +#include "wx/control.h" enum wxMovieCtrlState { @@ -25,12 +26,12 @@ enum wxMovieCtrlState class wxMovieCtrl : public wxControl { public: - wxMovieCtrl() + wxMovieCtrl() : m_bLoaded(false) { } wxMovieCtrl(wxWindow* parent, wxWindowID id, const wxString& fileName, const wxString& label = wxT(""), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - long style = 0, const wxString& name = wxPanelNameStr) + long style = 0, const wxString& name = wxPanelNameStr) : m_bLoaded(false) { Create(parent, id, fileName, label, pos, size, style, name); } ~wxMovieCtrl(); @@ -45,23 +46,54 @@ public: wxMovieCtrlState GetState(); + double GetPlaybackRate(); + bool SetPlaybackRate(double dRate); + + bool Load(const wxString& fileName); + #if wxUSE_DATETIME bool Seek(const wxTimeSpan& where); + wxTimeSpan Tell(); + wxTimeSpan Length(); #endif - virtual void SetLabel(const wxString& label); - protected: void OnSize(wxSizeEvent& evt); wxSize DoGetBestSize() const; bool InitQT(); + void Cleanup(); + + bool m_bLoaded; struct MovieRecord* m_movie; wxSize m_bestSize; class _wxQTTimer* m_timer; + + friend class _wxQTTimer; DECLARE_DYNAMIC_CLASS(wxMovieCtrl); - DECLARE_EVENT_TABLE() }; +//Event stuff +class WXDLLEXPORT wxMovieEvent : public wxNotifyEvent +{ +public: + wxMovieEvent(wxEventType commandType = wxEVT_NULL, int id = 0) + : wxNotifyEvent(commandType, id) + { } + + wxMovieEvent(const wxMovieEvent &clone) + : wxNotifyEvent(clone.GetEventType(), clone.GetId()) + { } + + wxEvent *Clone() { return new wxMovieEvent(*this); } + + DECLARE_DYNAMIC_CLASS(wxMovieEvent) +}; + +#define wxMOVIE_FINISHED_ID 13000 +DECLARE_EVENT_TYPE(wxEVT_MOVIE_FINISHED, wxMOVIE_FINISHED_ID) +typedef void (wxEvtHandler::*wxMovieEventFunction)(wxMovieEvent&); +#define EVT_MOVIE_FINISHED(winid, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_MOVIE_FINISHED, winid, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxMovieEventFunction) & fn, (wxObject *) NULL ), + #endif // wxUSE_MOVIECTRL \ No newline at end of file