#if wxUSE_MOVIECTRL
#include "wx/datetime.h"
+#include "wx/control.h"
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();
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