SO3Engine
|
SO3FlashWidget.cpp
Go to the documentation of this file.
47SFlashWidget::SFlashWidget(SScene* targetScene, const std::string& flashWidgetName, const int& xPos, const int& yPos, const unsigned short& widgetWidth, const unsigned short& widgetHeight, SViewPort* targetViewport, const unsigned int& widgetZOrder) : SWidget(targetScene, flashWidgetName, xPos, yPos, widgetWidth, widgetHeight, targetViewport, widgetZOrder, SO3_FLASH_WIDGET_TYPE)
54SFlashWidget::SFlashWidget(SScene* targetScene, const std::string& flashWidgetName, const int& xPos, const int& yPos, const unsigned short& widgetWidth, const unsigned short& widgetHeight, SViewPort* targetViewport) : SWidget(targetScene, flashWidgetName, xPos, yPos, widgetWidth, widgetHeight, targetViewport, SO3_FLASH_WIDGET_TYPE)
61SFlashWidget::SFlashWidget(SScene* targetScene, const std::string& flashWidgetName, const unsigned short& widgetWidth, const unsigned short& widgetHeight, SMaterial* targetMaterial, const unsigned short& targetTechnique, const unsigned short& targetPass, const unsigned short& targetTextureUnit) : SWidget(targetScene, flashWidgetName, widgetWidth, widgetHeight, targetMaterial, targetTechnique, targetPass, targetTextureUnit, SO3_FLASH_WIDGET_TYPE)
102 HRESULT result = getClassFunc(ShockwaveFlashObjects::CLSID_ShockwaveFlash, IID_IClassFactory, (void**)&factory);
114 HRESULT result = CoCreateInstance(ShockwaveFlashObjects::CLSID_ShockwaveFlash, 0, CLSCTX_INPROC_SERVER, IID_IOleObject, (void**)&oleObject);
116 OGRE_EXCEPT(Ogre::Exception::ERR_RT_ASSERTION_FAILED, "Unable to load the Flash ActiveX control.", "SFlashWidget::CommonConstructorSequence");
126 HRESULT result = oleObject->QueryInterface(__uuidof(IOleInPlaceObject), (LPVOID*)&inPlaceObject);
128 OGRE_EXCEPT(Ogre::Exception::ERR_RT_ASSERTION_FAILED, "Unable to load the Flash ActiveX control.", "SFlashWidget::CommonConstructorSequence");
137 result = oleObject->QueryInterface(__uuidof(ShockwaveFlashObjects::IShockwaveFlash), (LPVOID*)&flashInterface);
139 OGRE_EXCEPT(Ogre::Exception::ERR_RT_ASSERTION_FAILED, "Unable to load the Flash ActiveX control.", "SFlashWidget::CommonConstructorSequence");
147 // A windowless control is created, the container needs the IOleInPlaceObjectWindowless interface to dispatch messages to the object because the object does not have its own window.
148 result = oleObject->QueryInterface(__uuidof(IOleInPlaceObjectWindowless), (LPVOID*)&windowlessObject);
150 OGRE_EXCEPT(Ogre::Exception::ERR_RT_ASSERTION_FAILED, "Unable to load the Flash ActiveX control.", "SFlashWidget::CommonConstructorSequence");
152 // Flashhandler inherits from _IShockwaveFlashEvents, that permits to receive fscommand() events from the Flash movie.
266void SFlashWidget::InjectMouseMove(const int& xPos, const int& yPos, const MouseButtonId& button)
271void SFlashWidget::InjectMouseWheel(const int& scrollX, const int& scrollY, const int& relativeScroll)
276void SFlashWidget::InjectMouseDown(const int& xPos, const int& yPos, const MouseButtonId& button)
296void SFlashWidget::InjectTouchUpdate(const int& xPos, const int& yPos, const int& vx, const int& vy, const int& touchid)
301void SFlashWidget::InjectKeyEvent(const UINT& msg, const ScolWindowHandle& hwnd, const WPARAM& wParam, const LPARAM& lParam)
373void SFlashWidget::RunScriptFunction(const std::string& functionName, const std::vector<std::string>& argumentList)
582 mainBitmap = CreateDIBSection(hdc, (BITMAPINFO*)&bih, DIB_RGB_COLORS, (void**)&mainBuffer, 0, 0);
583 altBitmap = CreateDIBSection(hdc, (BITMAPINFO*)&bih, DIB_RGB_COLORS, (void **)&altBuffer, 0, 0);
644 const Ogre::PixelBox scolPixelBox(renderBuffer->width, renderBuffer->height, 1, Ogre::PF_BYTE_BGRA, renderBuffer->getBuffer());
659void SFlashWidget::load(const std::string& movieFilename, Hikari::HikariManager* hikariMgr, int type)
763Hikari::FlashValue SFlashWidget::callFunction(const std::wstring& funcName, const Hikari::Arguments& args)
766 HRESULT result = flashInterface->raw_CallFunction(_bstr_t(Hikari::Impl::serializeInvocation(funcName, args).c_str()), &returnVal);
773 OGRE_EXCEPT(Ogre::Exception::ERR_RT_ASSERTION_FAILED, "Failed to call ActionScript function '" + stringFunctionName + "' from FlashControl '" + SWidget::name + "'", "SFlashWidget::callFunction");
836 windowlessObject->OnWindowMessage(MouseButtonMessageConverter(index, true), index, MAKELPARAM(xPos, yPos), &result);
842 windowlessObject->OnWindowMessage(MouseButtonMessageConverter(index, false), index, MAKELPARAM(xPos, yPos), &result);
848 windowlessObject->OnWindowMessage(WM_MOUSEWHEEL, MAKEWPARAM(0, relScroll), MAKELPARAM(xPos, yPos), &result);
Definition FlashValue.h:62
Definition Hikari.h:75
void setFlashControl(IFlashControl *flashControl)
Definition Hikari.cpp:514
static HikariManager * getSingletonPtr()
Definition Hikari.cpp:126
Hikari::Impl::RenderBuffer * renderBuffer
Definition IFlashControl.h:86
IOleInPlaceObjectWindowless * windowlessObject
Definition IFlashControl.h:90
ShockwaveFlashObjects::IShockwaveFlash * flashInterface
Definition IFlashControl.h:88
Definition flashhandler.h:213
Definition FlashSite.h:40
HRESULT STDMETHODCALLTYPE QueryInterface(REFIID riid, LPVOID *ppv)
Definition FlashSite.h:68
Definition RenderBuffer.h:45
void copyArea(RECT srcRect, unsigned char *srcBuffer, int srcRowSpan)
Definition RenderBuffer.cpp:82
Definition SO3FlashWidget.h:62
virtual void InjectMouseWheel(const int &scrollX, const int &scrollY, const int &relativeScroll)
Definition SO3FlashWidget.cpp:271
virtual void setZOrder(unsigned short zorder)
Definition SO3FlashWidget.cpp:419
SFlashWidget(SScene *targetScene, const std::string &flashWidgetName, const int &xPos, const int &yPos, const unsigned short &widgetWidth, const unsigned short &widgetHeight, SViewPort *targetViewport, const unsigned int &widgetZOrder)
Definition SO3FlashWidget.cpp:47
virtual void setIgnoreTransparentPixels(bool shouldIgnore, float threshold=0.04)
Definition SO3FlashWidget.cpp:737
virtual void load(const std::string &movieFilename, Hikari::HikariManager *hikariMgr, int type)
Definition SO3FlashWidget.cpp:659
virtual void LoadFile(const std::string &file)
Definition SO3FlashWidget.cpp:249
void SetScaleMode(const FlashScaleMode &widgetScaleMode)
Definition SO3FlashWidget.cpp:351
virtual void injectMouseUp(int xPos, int yPos, int index)
Definition SO3FlashWidget.cpp:839
virtual const std::string & getMaterialName() const
Definition SO3FlashWidget.cpp:747
virtual void injectMouseWheel(int relScroll, int xPos, int yPos)
Definition SO3FlashWidget.cpp:845
virtual void injectMouseDown(int xPos, int yPos, int index)
Definition SO3FlashWidget.cpp:833
virtual void InjectTouchAdd(const int &xPos, const int &yPos, const int &touchid)
Definition SO3FlashWidget.cpp:286
virtual void setTransparent(bool isWidgetTransparent, bool useAlphaHack=false)
Definition SO3FlashWidget.cpp:689
virtual void unbind(const std::wstring &funcName)
Definition SO3FlashWidget.cpp:758
virtual bool CheckPixelAlpha(const int &posX, const int &posY)
Definition SO3FlashWidget.cpp:893
virtual const std::string & getName() const
Definition SO3FlashWidget.cpp:742
virtual void InjectTouchRemove(const int &touchid)
Definition SO3FlashWidget.cpp:291
virtual void setQuality(short renderQuality)
Definition SO3FlashWidget.cpp:698
virtual void setOpacity(float opacity)
Definition SO3FlashWidget.cpp:797
virtual void InjectTextEvent(const std::string &utf8)
Definition SO3FlashWidget.cpp:306
virtual void InjectTouchUpdate(const int &xPos, const int &yPos, const int &vx, const int &vy, const int &touchid)
Definition SO3FlashWidget.cpp:296
virtual bool isPointOverMe(int screenX, int screenY)
Definition SO3FlashWidget.cpp:442
FlashRenderQuality GetRenderingQuality()
Definition SO3FlashWidget.cpp:321
virtual void LoadURL(const std::string &url)
Definition SO3FlashWidget.cpp:241
virtual void SetSizeImpl(const unsigned short &newWidth, const unsigned short &newHeight)
Definition SO3FlashWidget.cpp:412
virtual void setScaleMode(short widgetScaleMode)
Definition SO3FlashWidget.cpp:724
virtual void InjectMouseMove(const int &xPos, const int &yPos, const MouseButtonId &button)
Definition SO3FlashWidget.cpp:266
virtual void InjectKeyEvent(const UINT &msg, const ScolWindowHandle &hwnd, const WPARAM &wParam, const LPARAM &lParam)
Definition SO3FlashWidget.cpp:301
void SetRenderingQuality(const FlashRenderQuality &newQuality)
Definition SO3FlashWidget.cpp:326
virtual Hikari::FlashValue callFunction(const std::wstring &funcName, const Hikari::Arguments &args=Hikari::Args())
Definition SO3FlashWidget.cpp:763
virtual void InjectMouseUp(const int &xPos, const int &yPos, const MouseButtonId &button)
Definition SO3FlashWidget.cpp:281
virtual void handleFlashCall(const std::wstring &xmlString)
Definition SO3FlashWidget.cpp:469
virtual void InjectMouseDown(const int &xPos, const int &yPos, const MouseButtonId &button)
Definition SO3FlashWidget.cpp:276
void CommonConstructorSequence(const bool &overlayedFlashControl)
Definition SO3FlashWidget.cpp:68
virtual void bind(const std::wstring &funcName, const Hikari::FlashDelegate &callback)
Definition SO3FlashWidget.cpp:753
virtual void SetMouseEnableImpl(const bool &enableMouseOnWidget)
Definition SO3FlashWidget.cpp:407
virtual void handleKeyEvent(UINT msg, WPARAM wParam, LPARAM lParam)
Definition SO3FlashWidget.cpp:851
virtual void getUVScale(float &uScale, float &vScale) const
Definition SO3FlashWidget.cpp:817
virtual void invalidateTotally()
Definition SO3FlashWidget.cpp:448
virtual void SetTransparencyImpl(const bool &enableTransparency)
Definition SO3FlashWidget.cpp:316
virtual void getExtents(unsigned short &width, unsigned short &height) const
Definition SO3FlashWidget.cpp:812
virtual void SetFocusImpl(const bool &focusOnWidget)
Definition SO3FlashWidget.cpp:310
virtual void setDraggable(bool widgetDraggable)
Definition SO3FlashWidget.cpp:732
virtual void injectMouseMove(int xPos, int yPos, int btn)
Definition SO3FlashWidget.cpp:827
virtual void RunScriptFunction(const std::string &functionName, const std::vector< std::string > &argumentList)
Definition SO3FlashWidget.cpp:373
virtual void SetKeyboardEnableImpl(const bool &enableKeyboardOnWidget)
Definition SO3FlashWidget.cpp:401
Definition SO3Material.h:43
Definition SO3Scene.h:125
Definition SO3ScriptFunction.h:33
Definition SO3ViewPort.h:56
Definition SO3Widget.h:51
void SetMouseEnable(const bool &enableMouseOnWidget)
Definition SO3Widget.cpp:1136
void SetKeyboardEnable(const bool &enableKeyboardOnWidget)
Definition SO3Widget.cpp:1125
void _FireOnLoadStart(SWidget *targetedWidget)
Definition SO3WidgetManager.cpp:1023
void _FireScriptWidgetEvent(SWidget *targetedWidget, const SScriptFunction &functionCalled)
Definition SO3WidgetManager.cpp:1013
void _FireOnLoadError(SWidget *targetedWidget, const int &errorCode, const std::string &failedUrl)
Definition SO3WidgetManager.cpp:1043
void _FireOnLoadEnd(SWidget *targetedWidget)
Definition SO3WidgetManager.cpp:1033
static SWidgetManager & getSingleton()
Definition SO3WidgetManager.cpp:53
FlashValue deserializeValue(const std::wstring &valueStr)
Definition flashhandler.h:117
std::wstring serializeInvocation(const std::wstring &funcName, const Arguments &args)
Definition flashhandler.h:153
bool deserializeInvocation(const std::wstring &xmlString, std::wstring &funcName, Arguments &args)
Definition flashhandler.h:172
Definition SO3DataScol.h:38
Generated by 1.9.8