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


C++ Navigator类代码示例

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


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

示例1: qDebug

void EventLog::show() {
	qDebug() << "EventLog: show()";

	qDebug() << "finding NavigationPane object from cache";
	Navigator* nav = Navigator::getInstance();
	NavigationPane* navpane = nav->getNavigationPane();
	// refresh _root
	_root = _qml->createRootNode<AbstractPane>();
	navpane->push(_root);

	//find and reconnect all the controls again, because we had to refresh the root pointer
	findAndConnectControls();
}
开发者ID:aantonyan,项目名称:Cascades-Community-Samples,代码行数:13,代码来源:EventLog.cpp

示例2: vibrate

bool NavigatorVibration::vibrate(Navigator& navigator, const VibrationPattern& pattern)
{
    if (!navigator.frame())
        return false;

    Page* page = navigator.frame()->page();
    if (!page)
        return false;

    if (page->visibilityState() != PageVisibilityStateVisible)
        return false;

    return NavigatorVibration::from(*page).vibrate(pattern);
}
开发者ID:joone,项目名称:blink-crosswalk,代码行数:14,代码来源:NavigatorVibration.cpp

示例3: URL

void NavigatorContentUtils::unregisterProtocolHandler(Navigator& navigator, const String& scheme, const String& url, ExceptionCode& ec)
{
    if (!navigator.frame())
        return;

    URL baseURL = navigator.frame()->document()->baseURL();

    if (!verifyCustomHandlerURL(baseURL, url, ec))
        return;

    if (!verifyProtocolHandlerScheme(scheme, ec))
        return;

    NavigatorContentUtils::from(navigator.frame()->page())->client()->unregisterProtocolHandler(scheme, baseURL, URL(ParsedURLString, url));
}
开发者ID:valbok,项目名称:WebKitForWayland,代码行数:15,代码来源:NavigatorContentUtils.cpp

示例4: URL

ExceptionOr<void> NavigatorContentUtils::registerProtocolHandler(Navigator& navigator, const String& scheme, const String& url, const String& title)
{
    if (!navigator.frame())
        return { };

    URL baseURL = navigator.frame()->document()->baseURL();

    if (!verifyCustomHandlerURL(baseURL, url))
        return Exception { SyntaxError };

    if (!verifyProtocolHandlerScheme(scheme))
        return Exception { SecurityError };

    NavigatorContentUtils::from(navigator.frame()->page())->client()->registerProtocolHandler(scheme, baseURL, URL({ }, url), navigator.frame()->displayStringModifiedByEncoding(title));
    return { };
}
开发者ID:wolfviking0,项目名称:webcl-webkit,代码行数:16,代码来源:NavigatorContentUtils.cpp

示例5: declined

String NavigatorContentUtils::isProtocolHandlerRegistered(Navigator& navigator, const String& scheme, const String& url, ExceptionCode& ec)
{
    static NeverDestroyed<String> declined(ASCIILiteral("declined"));

    if (!navigator.frame())
        return declined;

    URL baseURL = navigator.frame()->document()->baseURL();

    if (!verifyCustomHandlerURL(baseURL, url, ec))
        return declined;

    if (!verifyProtocolHandlerScheme(scheme, ec))
        return declined;

    return customHandlersStateString(NavigatorContentUtils::from(navigator.frame()->page())->client()->isProtocolHandlerRegistered(scheme, baseURL, URL(ParsedURLString, url)));
}
开发者ID:valbok,项目名称:WebKitForWayland,代码行数:17,代码来源:NavigatorContentUtils.cpp

示例6: declined

ExceptionOr<String> NavigatorContentUtils::isProtocolHandlerRegistered(Navigator& navigator, const String& scheme, const String& url)
{
    static NeverDestroyed<String> declined(MAKE_STATIC_STRING_IMPL("declined"));

    if (!navigator.frame())
        return String { declined };

    URL baseURL = navigator.frame()->document()->baseURL();

    if (!verifyCustomHandlerURL(baseURL, url))
        return Exception { SyntaxError };

    if (!verifyProtocolHandlerScheme(scheme))
        return Exception { SecurityError };

    return customHandlersStateString(NavigatorContentUtils::from(navigator.frame()->page())->client()->isProtocolHandlerRegistered(scheme, baseURL, URL({ }, url)));
}
开发者ID:wolfviking0,项目名称:webcl-webkit,代码行数:17,代码来源:NavigatorContentUtils.cpp

示例7: getMediaDevices

void NavigatorMediaStream::getMediaDevices(Navigator& navigator, PassOwnPtr<MediaDeviceInfoCallback> callback, ExceptionState& exceptionState)
{
    UserMediaController* userMedia = UserMediaController::from(navigator.frame());
    if (!userMedia) {
        exceptionState.throwDOMException(NotSupportedError, "No media device controller available; is this a detached window?");
        return;
    }

    MediaDevicesRequest* request = MediaDevicesRequest::create(navigator.frame()->document(), userMedia, callback, exceptionState);
    if (!request) {
        if (!exceptionState.hadException())
            exceptionState.throwDOMException(NotSupportedError, "Failed to request media devices.");
        return;
    }

    request->start();
}
开发者ID:darktears,项目名称:blink-crosswalk,代码行数:17,代码来源:NavigatorMediaStream.cpp

示例8: webkitGetUserMedia

void NavigatorMediaStream::webkitGetUserMedia(Navigator& navigator, const MediaStreamConstraints& options, NavigatorUserMediaSuccessCallback* successCallback, NavigatorUserMediaErrorCallback* errorCallback, ExceptionState& exceptionState)
{
    if (!successCallback)
        return;

    UserMediaController* userMedia = UserMediaController::from(navigator.frame());
    if (!userMedia) {
        exceptionState.throwDOMException(NotSupportedError, "No user media controller available; is this a detached window?");
        return;
    }

    String errorMessage;
    if (navigator.frame()->document()->isPrivilegedContext(errorMessage)) {
        UseCounter::count(navigator.frame(), UseCounter::GetUserMediaSecureOrigin);
    } else {
        UseCounter::countDeprecation(navigator.frame(), UseCounter::GetUserMediaInsecureOrigin);
        OriginsUsingFeatures::countAnyWorld(*navigator.frame()->document(), OriginsUsingFeatures::Feature::GetUserMediaInsecureOrigin);
        if (navigator.frame()->settings()->strictPowerfulFeatureRestrictions()) {
            exceptionState.throwSecurityError(ExceptionMessages::failedToExecute("webkitGetUserMedia", "Navigator", errorMessage));
            return;
        }
    }

    UserMediaRequest* request = UserMediaRequest::create(navigator.frame()->document(), userMedia, options, successCallback, errorCallback, exceptionState);
    if (!request) {
        ASSERT(exceptionState.hadException());
        return;
    }

    request->start();
}
开发者ID:smishenk,项目名称:chromium-crosswalk,代码行数:31,代码来源:NavigatorMediaStream.cpp

示例9: ToRotated

m2::AnyRectD ToRotated(m2::RectD const & rect, Navigator const & navigator)
{
  double const dx = rect.SizeX();
  double const dy = rect.SizeY();

  return m2::AnyRectD(rect.Center(),
                      navigator.Screen().GetAngle(),
                      m2::RectD(-dx/2, -dy/2, dx/2, dy/2));
}
开发者ID:morsya,项目名称:omim,代码行数:9,代码来源:navigator_utils.cpp

示例10: vibrate

bool NavigatorVibration::vibrate(Navigator& navigator, const VibrationPattern& pattern)
{
    if (!navigator.frame())
        return false;

    UseCounter::count(navigator.frame(), UseCounter::NavigatorVibrate);
    if (!navigator.frame()->isMainFrame())
        UseCounter::count(navigator.frame(), UseCounter::NavigatorVibrateSubFrame);

    Page* page = navigator.frame()->page();
    if (!page)
        return false;

    if (!page->isPageVisible())
        return false;

    return NavigatorVibration::from(*page).vibrate(pattern);
}
开发者ID:aobzhirov,项目名称:ChromiumGStreamerBackend,代码行数:18,代码来源:NavigatorVibration.cpp

示例11: webkitGetUserMedia

void NavigatorMediaStream::webkitGetUserMedia(Navigator& navigator, const Dictionary& options, PassOwnPtr<NavigatorUserMediaSuccessCallback> successCallback, PassOwnPtr<NavigatorUserMediaErrorCallback> errorCallback, ExceptionState& exceptionState)
{
    if (!successCallback)
        return;

    UserMediaController* userMedia = UserMediaController::from(navigator.frame());
    if (!userMedia) {
        exceptionState.throwDOMException(NotSupportedError, "No user media controller available; is this a detached window?");
        return;
    }

    UserMediaRequest* request = UserMediaRequest::create(navigator.frame()->document(), userMedia, options, successCallback, errorCallback, exceptionState);
    if (!request) {
        ASSERT(exceptionState.hadException());
        return;
    }

    request->start();
}
开发者ID:darktears,项目名称:blink-crosswalk,代码行数:19,代码来源:NavigatorMediaStream.cpp

示例12: run

void Menu::run()
{
  Navigator<ContinuousRobotDriver> navigator;
  Orientation* orientation = Orientation::getInstance();

  gUserInterface.waitForHand();
  startMelody();

  enc_left_front_write(0);
  enc_right_front_write(0);
  enc_left_back_write(0);
  enc_right_back_write(0);
  orientation->resetHeading();

  navigator.findBox(PersistantStorage::getTargetXLocation(),
                    PersistantStorage::getTargetYLocation());
  searchFinishMelody();
  navigator.findBox(0, 0);
  stopMelody();
}
开发者ID:Pitt-RAS,项目名称:micromouse,代码行数:20,代码来源:Menu.cpp

示例13: mouse

void
mouse(int button, int state, int x, int y)
{
    if ( state == 0 )
    {
        switch ( button )
        {
        case GLUT_LEFT_BUTTON:  trackball.buttonPress(Navigator::LEFT_MOUSE,x,y);
                                break;
        case GLUT_MIDDLE_BUTTON:trackball.buttonPress(Navigator::MIDDLE_MOUSE,x,y);
                                break;
        case GLUT_RIGHT_BUTTON: trackball.buttonPress(Navigator::RIGHT_MOUSE,x,y);
                                break;
        }
        mouseb |= 1 << button;
        buttonPressed=true;
    }
    else if ( state == 1 )
    {
        switch ( button )
        {
        case GLUT_LEFT_BUTTON:  trackball.buttonRelease(Navigator::LEFT_MOUSE,x,y);
                                break;
        case GLUT_MIDDLE_BUTTON:trackball.buttonRelease(Navigator::MIDDLE_MOUSE,x,y);
                                break;
        case GLUT_RIGHT_BUTTON: trackball.buttonRelease(Navigator::RIGHT_MOUSE,x,y);
                                break;
        }
        mouseb &= ~(1 << button);
        buttonPressed=false;
    }
    lastx = x;
    lasty = y;
}
开发者ID:mlimper,项目名称:OpenSG1x,代码行数:34,代码来源:testTrackballNavigator.cpp

示例14: main

int main(int argc, char **argv)
{
    osgInit(argc,argv);
        
    int winid = setupGLUT(&argc, argv);
    GLUTWindowPtr gwin= GLUTWindow::create();
    gwin->setId(winid);
    gwin->init();

    scene =createScenegraph();

    mgr = new SimpleSceneManager;
    mgr->setWindow(gwin );
    mgr->setRoot  (scene);
    mgr->showAll();
    
    Navigator * nav = mgr->getNavigator();
    nav->setFrom(nav->getFrom()+Vec3f(0,50,0));
    
    glutMainLoop();

    return 0;
}
开发者ID:mlimper,项目名称:OpenSG1x,代码行数:23,代码来源:09geometry_water2.cpp

示例15: configure

    virtual bool configure(yarp::os::ResourceFinder &rf)
    {
        yarp::os::Time::turboBoost();
        
        mNavThread=new Navigator(&rf);

        if (!mNavThread->start())
        {
            delete mNavThread;
            return false;
        }

        std::string local=rf.check("local",yarp::os::Value("/ikartnav")).asString().c_str();
        mHandlerPort.open(local.c_str());
        attach(mHandlerPort);
        //attachTerminal();

        return true;
    }
开发者ID:xufango,项目名称:contrib_bk,代码行数:19,代码来源:main.cpp


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