SO3Engine
|
SO3BitmapWidget.cpp
Go to the documentation of this file.
43SBitmapWidget::SBitmapWidget(SScene* targetScene, const std::string& bitmapWidgetName, const int& xPos, const int& yPos, const unsigned short& widgetWidth, const unsigned short& widgetHeight, SViewPort* targetViewport, const unsigned int& widgetZOrder) : SWidget(targetScene, bitmapWidgetName, xPos, yPos, widgetWidth, widgetHeight, targetViewport, widgetZOrder, SO3_BITMAP_WIDGET_TYPE)
48SBitmapWidget::SBitmapWidget(SScene* targetScene, const std::string& bitmapWidgetName, const int& xPos, const int& yPos, const unsigned short& widgetWidth, const unsigned short& widgetHeight, SViewPort* targetViewport) : SWidget(targetScene, bitmapWidgetName, xPos, yPos, widgetWidth, widgetHeight, targetViewport, SO3_BITMAP_WIDGET_TYPE)
53SBitmapWidget::SBitmapWidget(SScene* targetScene, const std::string& bitmapWidgetName, const unsigned short& widgetWidth, const unsigned short& widgetHeight, SMaterial* targetMaterial, const unsigned short& targetTechnique, const unsigned short& targetPass, const unsigned short& targetTextureUnit) : SWidget(targetScene, bitmapWidgetName, widgetWidth, widgetHeight, targetMaterial, targetTechnique, targetPass, targetTextureUnit, SO3_BITMAP_WIDGET_TYPE)
123 const Ogre::PixelBox scolPixelBox(width, height, 1, (bitperpixel == 4) ? Ogre::PF_BYTE_BGRA : Ogre::PF_BYTE_BGR, pixelsData);
129 const Ogre::PixelBox scolPixelBox(width, height, 1, (bitperpixel == 4) ? Ogre::PF_BYTE_BGRA : Ogre::PF_BYTE_BGR, buffer);
131 ConversionTools::ScolBitmapGetRGBA(buffer, width, height, bitperpixel, align, pixelBuffer->getWidth(), pixelBuffer->getHeight(), pixelBuffer->getFormat(), static_cast<Ogre::uint32*>(pixelsData));
162 ConversionTools::ScolBitmapGetRGBA(scolBitmap, 0, pixelBuffer->getWidth(), pixelBuffer->getHeight(), pixelBuffer->getFormat(), static_cast<Ogre::uint32*>(pixelsData));
197 ConversionTools::ScolBitmapGetRGBA(scolBitmap, scolAlphaBitmap, pixelBuffer->getWidth(), pixelBuffer->getHeight(), pixelBuffer->getFormat(), static_cast<Ogre::uint32*>(pixelsData));
206void SBitmapWidget::InjectMouseMove(const int& xPos, const int& yPos, const MouseButtonId& button)
211void SBitmapWidget::InjectMouseWheel(const int& scrollX, const int& scrollY, const int& relativeScroll)
216void SBitmapWidget::InjectMouseDown(const int& xPos, const int& yPos, const MouseButtonId& button)
236void SBitmapWidget::InjectTouchUpdate(const int& xPos, const int& yPos, const int& vx, const int& vy, const int& touchid)
241void SBitmapWidget::InjectKeyEvent(const UINT& msg, const ScolWindowHandle& hwnd, const WPARAM& wParam, const LPARAM& lParam)
260void SBitmapWidget::RunScriptFunction(const std::string& functionName, const std::vector<std::string>& argumentList)
310void SBitmapWidget::CheckSizeAndAlloc(const unsigned int& newWidth, const unsigned int& newHeight, const bool& alpha)
316 nCalcTexWidth = Ogre::Bitwise::firstPO2From(static_cast <unsigned short>(newWidth * textureRatio));
317 nCalcTexHeight = Ogre::Bitwise::firstPO2From(static_cast <unsigned short>(newHeight * textureRatio));
333 if ((nCalcTexWidth != iLastWidth) || (nCalcTexHeight != iLastHeight) || (alpha != bLastAlphaState))
372 const Ogre::PixelBox scolPixelBox(iLastWidth, iLastHeight, 1, pixelBuffer->getFormat(), pixelsData);
MMechostr(MSKDEBUG, " > Start loading Plugin SO3Engine dll\n")
static void ScolBitmapGetRGBA(PtrObjBitmap scolBitmap, PtrObjBitmap alphaBitmap, const Ogre::PixelBox &pixelbox)
Definition SO3ConversionTools.cpp:326
virtual void SetKeyboardEnableImpl(const bool &enableKeyboardOnWidget)
Definition SO3BitmapWidget.cpp:265
virtual void SetMouseEnableImpl(const bool &enableMouseOnWidget)
Definition SO3BitmapWidget.cpp:270
virtual void SetFocusImpl(const bool &focusOnWidget)
Definition SO3BitmapWidget.cpp:251
virtual void InjectTouchUpdate(const int &xPos, const int &yPos, const int &vx, const int &vy, const int &touchid)
Definition SO3BitmapWidget.cpp:236
virtual void RunScriptFunction(const std::string &functionName, const std::vector< std::string > &argumentList)
Definition SO3BitmapWidget.cpp:260
virtual void LoadFile(const std::string &file)
Definition SO3BitmapWidget.cpp:79
virtual void InjectMouseWheel(const int &scrollX, const int &scrollY, const int &relativeScroll)
Definition SO3BitmapWidget.cpp:211
virtual void loadResource(Ogre::Resource *resource)
Definition SO3BitmapWidget.cpp:356
virtual void InjectTouchRemove(const int &touchid)
Definition SO3BitmapWidget.cpp:231
void CommonConstructorSequence()
Definition SO3BitmapWidget.cpp:58
virtual void InjectTouchAdd(const int &xPos, const int &yPos, const int &touchid)
Definition SO3BitmapWidget.cpp:226
virtual void InjectMouseMove(const int &xPos, const int &yPos, const MouseButtonId &button)
Definition SO3BitmapWidget.cpp:206
virtual void LoadURL(const std::string &url)
Definition SO3BitmapWidget.cpp:72
SBitmapWidget(SScene *targetScene, const std::string &bitmapWidgetName, const int &xPos, const int &yPos, const unsigned short &widgetWidth, const unsigned short &widgetHeight, SViewPort *targetViewport, const unsigned int &widgetZOrder)
Definition SO3BitmapWidget.cpp:43
virtual void InjectMouseDown(const int &xPos, const int &yPos, const MouseButtonId &button)
Definition SO3BitmapWidget.cpp:216
virtual void SetSizeImpl(const unsigned short &newWidth, const unsigned short &newHeight)
Definition SO3BitmapWidget.cpp:275
virtual void InjectTextEvent(const std::string &utf8)
Definition SO3BitmapWidget.cpp:246
virtual void InjectMouseUp(const int &xPos, const int &yPos, const MouseButtonId &button)
Definition SO3BitmapWidget.cpp:221
virtual bool CheckPixelAlpha(const int &posX, const int &posY)
Definition SO3BitmapWidget.cpp:280
void UpdateRawData(PtrObjBitmap scolBitmap)
Definition SO3BitmapWidget.cpp:143
virtual void SetTransparencyImpl(const bool &enableTransparency)
Definition SO3BitmapWidget.cpp:256
virtual void InjectKeyEvent(const UINT &msg, const ScolWindowHandle &hwnd, const WPARAM &wParam, const LPARAM &lParam)
Definition SO3BitmapWidget.cpp:241
Definition SO3Material.h:43
Definition SO3Scene.h:125
Definition SO3ViewPort.h:56
Definition SO3Widget.h:51
bool compensateNPOT
Use to indicate if the texture size has be rounded to an exact pow2.
Definition SO3Widget.h:91
void _FireOnLoadStart(SWidget *targetedWidget)
Definition SO3WidgetManager.cpp:1023
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
Definition SO3DataScol.h:38
Generated by 1.9.8