Home || Architecture || Video Search || Visual Search || Scripts || Applications || Important Messages || OGL || Src

bool Impala::Visualization::RotorBrowser::RotorBrowser::SwitchToContext ( String  name  )  [inline, private]

Definition at line 2400 of file RotorBrowser.h.

References Impala::Visualization::RotorBrowser::RotorBrowserListener::ContextChangeEvent(), Impala::Visualization::RotorBrowser::RotorBrowserContext::GetName(), ILOG_DEBUG, ILOG_WARN, mActiveContext, mBrowseMode, mContexts, mManageDepth, MODE_ROTORBROWSER, mRotorBrowserListener, RepositionContexts(), and Impala::Visualization::RotorBrowser::RotorBrowserContext::SetDepth().

Referenced by CrossBrowserNavigateKey(), DoQueryByRegion(), DoVisualQuery(), KbNavigateFork(), KeyboardCrossFunc(), KeyboardForkFunc(), KeyboardRotorFunc(), MouseFunc(), ReloadCrossBrowser(), ReloadForkBrowser(), ReloadInitial(), and ResetRanking().

02401     {
02402         if (mActiveContext && mActiveContext->GetName() == name)
02403             return true;
02404         if (mContexts.size() == 0) {
02405             ILOG_DEBUG( "SwitchToContext: no other contexts found." );
02406             return false;
02407         }
02408         if (mActiveContext == NULL)
02409         {
02410             mActiveContext = mContexts.front();
02411             mContexts.pop_front();
02412             ILOG_WARN("no active context found. Active context set to "
02413                       << mActiveContext->GetName() );
02414         }
02415 
02416         String scontext = mActiveContext->GetName();
02417         int maxr = 0;
02418         while (mActiveContext->GetName() != name)
02419         {
02420             RotorBrowserContext *next = mContexts.front();
02421             mContexts.pop_front();
02422             if (mBrowseMode == MODE_ROTORBROWSER && mManageDepth)
02423             {
02424                 next->SetDepth(5);
02425                 mActiveContext->SetDepth(3);
02426             }
02427             mContexts.push_back(mActiveContext);
02428             mActiveContext = next;
02429             if (mActiveContext->GetName() == scontext && ++maxr==2)
02430                 return false; // not found after making full circle
02431         }
02432         ILOG_DEBUG("RotorBrowser::SwitchToContext: active context now: "
02433                    << mActiveContext->GetName() );
02434         if (mRotorBrowserListener)
02435             mRotorBrowserListener->ContextChangeEvent(this, mActiveContext);
02436         RepositionContexts();
02437         return true;
02438     }

Here is the call graph for this function:


Generated on Fri Mar 19 11:55:16 2010 for ImpalaSrc by  doxygen 1.5.1