]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/msw/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
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
)
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
);
53 bool Seek(const wxTimeSpan
& where
);
58 virtual void SetLabel(const wxString
& label
);
61 void OnSize(wxSizeEvent
& evt
);
62 wxSize
DoGetBestSize() const;
65 //msw-specific - we need to overload the window proc
66 WXLRESULT
MSWWindowProc(WXUINT nMsg
, WXWPARAM wParam
, WXLPARAM lParam
);
78 DECLARE_DYNAMIC_CLASS(wxMovieCtrl
);
82 class WXDLLEXPORT wxMovieEvent
: public wxNotifyEvent
85 wxMovieEvent(wxEventType commandType
= wxEVT_NULL
, int id
= 0)
86 : wxNotifyEvent(commandType
, id
)
89 wxMovieEvent(const wxMovieEvent
&clone
)
90 : wxNotifyEvent(clone
.GetEventType(), clone
.GetId())
93 wxEvent
*Clone() { return new wxMovieEvent(*this); }
95 DECLARE_DYNAMIC_CLASS(wxMovieEvent
)
98 #define wxMOVIE_FINISHED_ID 13000
99 DECLARE_EVENT_TYPE(wxEVT_MOVIE_FINISHED
, wxMOVIE_FINISHED_ID
)
100 typedef void (wxEvtHandler::*wxMovieEventFunction
)(wxMovieEvent
&);
101 #define EVT_MOVIE_FINISHED(winid, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_MOVIE_FINISHED, winid, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxMovieEventFunction) & fn, (wxObject *) NULL ),
103 #endif // wxUSE_MOVIECTRL