wxMediaCtrl patch from Ryan:
- factored out Active X code into separate files - also refactored common part of all backends in mediactrlcmn.cpp - adds async loading from URLs support to Mac version - support for ShowPlayerControls() in Mac wxMediaCtrl - more minor bug fixes in the MSW version and the sample (this is slightly modified patch 1264533 (without the list control part)) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35461 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -468,6 +468,49 @@ void wxMediaCtrl::DoMoveWindow(int x, int y, int w, int h)
|
||||
m_imp->Move(x, y, w, h);
|
||||
}
|
||||
|
||||
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
//
|
||||
// wxMediaBackendCommonBase
|
||||
//
|
||||
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
|
||||
void wxMediaBackendCommonBase::NotifyMovieSizeChanged()
|
||||
{
|
||||
// our best size changed after opening a new file
|
||||
m_ctrl->InvalidateBestSize();
|
||||
m_ctrl->SetSize(m_ctrl->GetSize());
|
||||
|
||||
// if the parent of the control has a sizer ask it to refresh our size
|
||||
wxWindow * const parent = m_ctrl->GetParent();
|
||||
if ( parent->GetSizer() )
|
||||
{
|
||||
m_ctrl->GetParent()->Layout();
|
||||
m_ctrl->GetParent()->Refresh();
|
||||
m_ctrl->GetParent()->Update();
|
||||
}
|
||||
}
|
||||
|
||||
void wxMediaBackendCommonBase::NotifyMovieLoaded()
|
||||
{
|
||||
NotifyMovieSizeChanged();
|
||||
|
||||
// notify about movie being fully loaded
|
||||
QueueEvent(wxEVT_MEDIA_LOADED);
|
||||
}
|
||||
|
||||
bool wxMediaBackendCommonBase::SendStopEvent()
|
||||
{
|
||||
wxMediaEvent theEvent(wxEVT_MEDIA_STOP, m_ctrl->GetId());
|
||||
|
||||
return !m_ctrl->ProcessEvent(theEvent) || theEvent.IsAllowed();
|
||||
}
|
||||
|
||||
void wxMediaBackendCommonBase::QueueEvent(wxEventType evtType)
|
||||
{
|
||||
wxMediaEvent theEvent(evtType, m_ctrl->GetId());
|
||||
m_ctrl->AddPendingEvent(theEvent);
|
||||
}
|
||||
|
||||
#include "wx/html/forcelnk.h"
|
||||
FORCE_LINK(basewxmediabackends);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user