SO3Engine
|
SO3ObjWindowWidget.cpp
Go to the documentation of this file.
44SObjWindowWidget::SObjWindowWidget(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_OBJ_WINDOW_WIDGET_TYPE)
49SObjWindowWidget::SObjWindowWidget(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_OBJ_WINDOW_WIDGET_TYPE)
54SObjWindowWidget::SObjWindowWidget(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_OBJ_WINDOW_WIDGET_TYPE)
99void SObjWindowWidget::InjectMouseMove(const int& xPos, const int& yPos, const MouseButtonId& button)
109void SObjWindowWidget::InjectMouseWheel(const int& scrollX, const int& scrollY, const int& relativeScroll)
118void SObjWindowWidget::InjectMouseDown(const int& xPos, const int& yPos, const MouseButtonId& button)
138void SObjWindowWidget::InjectMouseUp(const int& xPos, const int& yPos, const MouseButtonId& button)
168void SObjWindowWidget::InjectTouchUpdate(const int& xPos, const int& yPos, const int& vx, const int& vy, const int& touchid)
173void SObjWindowWidget::InjectKeyEvent(const UINT& msg, const ScolWindowHandle& hwnd, const WPARAM& wParam, const LPARAM& lParam)
203void SObjWindowWidget::RunScriptFunction(const std::string& functionName, const std::vector<std::string>& argumentList)
218void SObjWindowWidget::SetSizeImpl(const unsigned short& newWidth, const unsigned short& newHeight)
238void SObjWindowWidget::InjectMouseMessage(const int& xPos, const int& yPos, const unsigned int& message, const WPARAM& wParam)
250 localPosition.x = static_cast<int>((static_cast<long>(xPos) * (parentWindowInfos.rcWindow.right - parentWindowInfos.rcWindow.left) / static_cast<long>(width)) - (parentWindowInfos.rcClient.left - parentWindowInfos.rcWindow.left));
251 localPosition.y = static_cast<int>((static_cast<long>(yPos) * (parentWindowInfos.rcWindow.bottom - parentWindowInfos.rcWindow.top) / static_cast<long>(height)) - (parentWindowInfos.rcClient.top - parentWindowInfos.rcWindow.top));
255 localPosition.x = static_cast<int>(static_cast<long>(xPos) * (parentWindowInfos.rcClient.right - parentWindowInfos.rcClient.left) / static_cast<long>(width));
256 localPosition.y = static_cast<int>(static_cast<long>(yPos) * (parentWindowInfos.rcClient.bottom - parentWindowInfos.rcClient.top) / static_cast<long>(height));
265 // Store infos about parent for later use. No need to do it for first pass, as we already have information of targetWindowHandle in parentWindowInfos.
283 localPosition.x = localPosition.x - (chilWindowInfos.rcWindow.left - parentWindowInfos.rcClient.left);
284 localPosition.y = localPosition.y - (chilWindowInfos.rcWindow.top - parentWindowInfos.rcClient.top);
296 SendMessage(lastChildWindowHandle, WM_SETCURSOR, (WPARAM)(0), (LPARAM)(MAKELONG(HTCLIENT, message)));
297 SendMessage(lastChildWindowHandle, message, wParam, MAKELPARAM(localPosition.x, localPosition.y));
311 long targetWindowWithBordersWidth = targetWindowInfos.rcWindow.right - targetWindowInfos.rcWindow.left;
312 long targetWindowWithBordersHeight = targetWindowInfos.rcWindow.bottom - targetWindowInfos.rcWindow.top;
315 if((lastWindowWithBordersWidth != targetWindowWithBordersWidth) || (lastWindowWithBordersHeight != targetWindowWithBordersHeight))
337 Ogre::PixelBox scolPixelBox(targetWindowWithBordersWidth, targetWindowWithBordersHeight, 1, Ogre::PF_BYTE_BGR, pixelsData);
342 long targetWindowWithoutBordersWidth = targetWindowInfos.rcClient.right - targetWindowInfos.rcClient.left;
343 long targetWindowWithoutBordersHeight = targetWindowInfos.rcClient.bottom - targetWindowInfos.rcClient.top;
346 Ogre::Box windowRectWithoutBorders(xOffset, yOffsetTop, targetWindowWithoutBordersWidth + xOffset, targetWindowWithoutBordersHeight + yOffsetTop);
396void SObjWindowWidget::CreateMemoryBitmap(const long& targetWindowWidth, const long& targetWindowHeight)
419 memoryBitmap = CreateDIBSection(targetWindowDC, &info, DIB_RGB_COLORS, (void**)&pixelsData, 0, 0);
Definition SO3Material.h:43
virtual void SetSizeImpl(const unsigned short &newWidth, const unsigned short &newHeight)
Definition SO3ObjWindowWidget.cpp:218
virtual void InjectTouchUpdate(const int &xPos, const int &yPos, const int &vx, const int &vy, const int &touchid)
Definition SO3ObjWindowWidget.cpp:168
virtual void InjectMouseWheel(const int &scrollX, const int &scrollY, const int &relativeScroll)
Definition SO3ObjWindowWidget.cpp:109
virtual void InjectTextEvent(const std::string &utf8)
Definition SO3ObjWindowWidget.cpp:182
virtual void SetFocusImpl(const bool &focusOnWidget)
Definition SO3ObjWindowWidget.cpp:187
virtual bool CheckPixelAlpha(const int &posX, const int &posY)
Definition SO3ObjWindowWidget.cpp:223
virtual void SetKeyboardEnableImpl(const bool &enableKeyboardOnWidget)
Definition SO3ObjWindowWidget.cpp:208
virtual void InjectMouseUp(const int &xPos, const int &yPos, const MouseButtonId &button)
Definition SO3ObjWindowWidget.cpp:138
void SetBorderVisible(const bool &drawBordersEnable)
Definition SO3ObjWindowWidget.cpp:233
virtual void InjectKeyEvent(const UINT &msg, const ScolWindowHandle &hwnd, const WPARAM &wParam, const LPARAM &lParam)
Definition SO3ObjWindowWidget.cpp:173
virtual void InjectTouchRemove(const int &touchid)
Definition SO3ObjWindowWidget.cpp:163
virtual void InjectMouseMove(const int &xPos, const int &yPos, const MouseButtonId &button)
Definition SO3ObjWindowWidget.cpp:99
virtual void SetMouseEnableImpl(const bool &enableMouseOnWidget)
Definition SO3ObjWindowWidget.cpp:213
virtual void SetTransparencyImpl(const bool &enableTransparency)
Definition SO3ObjWindowWidget.cpp:198
virtual void InjectTouchAdd(const int &xPos, const int &yPos, const int &touchid)
Definition SO3ObjWindowWidget.cpp:158
void SetTargetWindow(const ScolWindowHandle &targetWindowHandlePtr)
Definition SO3ObjWindowWidget.cpp:78
virtual void RunScriptFunction(const std::string &functionName, const std::vector< std::string > &argumentList)
Definition SO3ObjWindowWidget.cpp:203
virtual void LoadURL(const std::string &url)
Definition SO3ObjWindowWidget.cpp:85
virtual void InjectMouseDown(const int &xPos, const int &yPos, const MouseButtonId &button)
Definition SO3ObjWindowWidget.cpp:118
SObjWindowWidget(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 SO3ObjWindowWidget.cpp:44
virtual void LoadFile(const std::string &file)
Definition SO3ObjWindowWidget.cpp:92
void CommonConstructorSequence()
Definition SO3ObjWindowWidget.cpp:59
Definition SO3Scene.h:125
Definition SO3ViewPort.h:56
Definition SO3Widget.h:51
void _FireOnLoadError(SWidget *targetedWidget, const int &errorCode, const std::string &failedUrl)
Definition SO3WidgetManager.cpp:1043
static SWidgetManager & getSingleton()
Definition SO3WidgetManager.cpp:53
Definition SO3DataScol.h:38
Generated by 1.9.8