Example #1
0
EnginePtr Widget::getEngine()
{
    auto systemWindow = getSystemWindow();
    if (systemWindow)
        return systemWindow->getEngine();
    return nullptr;
}
Example #2
0
    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,
                                                &params );
            mWindow->setActive(true);

            return true;
        }
        else
#endif
            return false;
    }
Example #3
0
void Widget::setMouseOverHere()
{
	getSystemWindow()->setMouseFocusWidget(sharedFromThis());
}
Example #4
0
void Widget::setFocusHere()
{
	getSystemWindow()->setKeyboardFocusWidget(sharedFromThis());
}
Example #5
0
void Widget::releaseMouse()
{
	getSystemWindow()->setMouseCaptureWidget(WidgetPtr());
}
Example #6
0
void Widget::captureMouse()
{
	getSystemWindow()->setMouseCaptureWidget(sharedFromThis());
}
Example #7
0
void Widget::killAllPopUps(const WidgetPtr &popupGroup)
{
    getSystemWindow()->killAllPopUps(popupGroup);
}
Example #8
0
void Widget::popKill(const WidgetPtr &popupGroup)
{
    getSystemWindow()->killPopUp(sharedFromThis(), popupGroup);
}
Example #9
0
void Widget::popUp(const WidgetPtr &popupGroup)
{
    getSystemWindow()->activatePopUp(sharedFromThis(), popupGroup);
}
Example #10
0
WidgetPtr Widget::getCurrentPopUpGroup()
{
    return getSystemWindow()->getCurrentPopUpGroup();
}