EnginePtr Widget::getEngine() { auto systemWindow = getSystemWindow(); if (systemWindow) return systemWindow->getEngine(); return nullptr; }
bool Window::configInitGL(const eq::uint128_t &init_id) { if (!eq::Window::configInitGL(init_id)) return false; // Get data const Config *config = static_cast<Config *>(getConfig()); const Node *node = static_cast<Node *>(getNode()); const InitData &init_data = node->getInitData(); // Create objects #ifdef GLX eq::glx::WindowIF* glxWindow = dynamic_cast< eq::glx::WindowIF* >( getSystemWindow( )); const XID parentWnd = glxWindow ? glxWindow->getXDrawable() : 0; if( parentWnd ) { Ogre::NameValuePairList params; // typedef std::map<std::string,std::string> params["externalGLControl"] = Ogre::String("True"); params["currentGLContext"] = Ogre::String("True"); // params["parentWindowHandle"] = Ogre::StringConverter::toString((unsigned long)(parentWnd)); const eq::PixelViewport& pvp = getPixelViewport(); // create window by size of pvp. Pipe *pipe = static_cast<Pipe *>(getPipe()); Ogre::Root *root = pipe->_ogre->getRoot(); mWindow = root->createRenderWindow( getName(), pvp.w, pvp.h, false, ¶ms ); mWindow->setActive(true); return true; } else #endif return false; }
void Widget::setMouseOverHere() { getSystemWindow()->setMouseFocusWidget(sharedFromThis()); }
void Widget::setFocusHere() { getSystemWindow()->setKeyboardFocusWidget(sharedFromThis()); }
void Widget::releaseMouse() { getSystemWindow()->setMouseCaptureWidget(WidgetPtr()); }
void Widget::captureMouse() { getSystemWindow()->setMouseCaptureWidget(sharedFromThis()); }
void Widget::killAllPopUps(const WidgetPtr &popupGroup) { getSystemWindow()->killAllPopUps(popupGroup); }
void Widget::popKill(const WidgetPtr &popupGroup) { getSystemWindow()->killPopUp(sharedFromThis(), popupGroup); }
void Widget::popUp(const WidgetPtr &popupGroup) { getSystemWindow()->activatePopUp(sharedFromThis(), popupGroup); }
WidgetPtr Widget::getCurrentPopUpGroup() { return getSystemWindow()->getCurrentPopUpGroup(); }