当前位置: 首页>>代码示例>>C++>>正文


C++ StHandle::isFullScreen方法代码示例

本文整理汇总了C++中StHandle::isFullScreen方法的典型用法代码示例。如果您正苦于以下问题:C++ StHandle::isFullScreen方法的具体用法?C++ StHandle::isFullScreen怎么用?C++ StHandle::isFullScreen使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在StHandle的用法示例。


在下文中一共展示了StHandle::isFullScreen方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: stWindowLoop

void StActiveXCtrl::stWindowLoop() {
    // do not load plugin until it is placed on screen
    StWindow aParentWin(myResMgr, myParentWin);
    for(;;) {
        if(aParentWin.isParentOnScreen()) {
            break;
        }

        StThread::sleep(10);
        if(myToQuit) {
            return;
        }
    }

    myStApp = new StImageViewer(myResMgr, myParentWin, new StOpenInfo());
    if(!myStApp->open()) {
        myStApp.nullify();
        return;
    }

    bool isFullscreen = false;
    myIsActive = true;
    for(;;) {
        if(myStApp->closingDown()) {
            myStApp.nullify();
            myIsActive = false;
            return;
        }

        myIsActive = myStApp->isActive();
        if(myToQuit) {
            myStApp->exit(0);
        } else if(myOpenEvent.check()
               && myStApp->isActive()) {
            // load the image
            myStApp->open(myOpenInfo);
            myOpenEvent.reset();
        }

        StHandle<StWindow> aWin = myStApp->getMainWindow();
        if(myIsActive) {
            aWin->show();
        } else {
            aWin->hide();
        }
        myStApp->processEvents();

        if(aWin->isFullScreen()) {
            if(!isFullscreen) {
                PostMessage(WM_TIMER, 1);
                isFullscreen = true;
            }
        } else if(isFullscreen) {
            PostMessage(WM_TIMER, 0);
            isFullscreen = false;
        }
    }
}
开发者ID:angelstudio,项目名称:sview,代码行数:58,代码来源:StActiveXCtrl.cpp

示例2: stWindowLoop

void StBrowserPlugin::stWindowLoop() {
    // do not load plugin until it is placed on screen
    StWindow aParentWin(myResMgr, myParentWin);
    for(;;) {
#ifndef _WIN32
        const int32_t anActiveNb =
#endif
            ST_PLUGIN_QUEUE.increment();

        if(aParentWin.isParentOnScreen()
#ifndef _WIN32
                || anActiveNb <= 1
#endif
          ) {
            break;
        }

        ST_PLUGIN_QUEUE.decrement();
        StThread::sleep(10);
        if(myToQuit) {
            return;
        }
    }

    // Load image viewer
    myStApp = new StImageViewer(myResMgr, myParentWin, new StOpenInfo());

    if(!myStApp->open()) {
        ST_PLUGIN_QUEUE.decrement();
        myStApp.nullify();
        return;
    }

    ST_PLUGIN_QUEUE.decrement();

    bool isFileOpened = false;
    bool isFullscreen = false;
    bool isFullLoaded = false;
    myIsActive = true;
    for(;;) {
        if(myStApp->closingDown()) {
            myStApp.nullify();
            myIsActive = false;
            return;
        }

        myIsActive = myStApp->isActive();
        if(myToQuit) {
            myStApp->exit(0);
        } else if(!isFileOpened
                  && myIsActive) {
            // load the image
            StMutexAuto aLock(myMutex);
            if(myPreviewUrl.isEmpty()) {
                if(!myFullPath.isEmpty()) {
                    myOpenInfo.setPath(myFullPath);
                    aLock.unlock();
                    myStApp->open(myOpenInfo);
                    isFileOpened = true;
                }
            } else if(!myPreviewPath.isEmpty()) {
                myOpenInfo.setPath(myPreviewPath);
                aLock.unlock();
                myStApp->open(myOpenInfo);
                isFileOpened = true;
            }
        }

        StHandle<StWindow> aWin = myStApp->getMainWindow();
        if(myIsActive) {
            aWin->show();
        } else {
            aWin->hide();
        }
        myStApp->processEvents();

        if(aWin->isFullScreen()) {
            StMutexAuto aLock(myMutex);
            if(!isFullscreen && !myFullPath.isEmpty()) {
                myOpenInfo.setPath(myFullPath);
                aLock.unlock();
                myStApp->open(myOpenInfo);
                isFullscreen = true;
            } else if(!isFullLoaded && NPNFuncs.pluginthreadasynccall != NULL) {
                aLock.unlock();
                NPNFuncs.pluginthreadasynccall(nppInstance, StBrowserPlugin::doLoadFullSize, this);
                isFullLoaded = true;
            }
        } else if(isFullscreen) {
            StMutexAuto aLock(myMutex);
            if(!myPreviewPath.isEmpty()) {
                myOpenInfo.setPath(myPreviewPath);
                aLock.unlock();
                myStApp->open(myOpenInfo);
                isFullscreen = false;
            }
        }
    }
}
开发者ID:gkv311,项目名称:sview,代码行数:99,代码来源:StBrowserPlugin.cpp


注:本文中的StHandle::isFullScreen方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。