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

bool Impala::Visualization::RotorBrowser::RotorBrowser::CrossBrowserNavigateKey ( int  c,
int  state,
bool  keepCenter 
) [inline]

Definition at line 630 of file RotorBrowser.h.

References BookmarkActiveCenterEx(), BookmarkSpecificEx(), CheckKBN(), Impala::Visualization::RotorBrowser::RotorBrowserContext::GetCenter(), Impala::Visualization::RotorBrowser::RotorBrowserContext::GetName(), Impala::Visualization::RotorBrowser::RotorBrowserContext::GetRelative(), Impala::Visualization::RotorBrowser::RotorBrowserContext::GoLeft(), Impala::Visualization::RotorBrowser::RotorBrowserContext::GoRight(), ILOG_USER, mActiveContext, PublishContextMoved(), SwitchToContext(), and UpdateViewsToContext().

Referenced by KeyboardCrossFunc().

00631     {
00632         int up=0, down=0, left=0, right=0;
00633 
00634         if ((up    = CheckKBN("CbGoUp",    c, state)) ||
00635             (down  = CheckKBN("CbGoDown",  c, state)) ||
00636             (left  = CheckKBN("CbGoLeft",  c, state)) ||
00637             (right = CheckKBN("CbGoRight", c, state)))
00638         {
00639             state = 0; // Only move
00640         }
00641         else if ((up   = CheckKBN("CbBookmarkUpNegative",   c, state)) ||
00642                  (down = CheckKBN("CbBookmarkDownNegative", c, state)) ||
00643                  (left = CheckKBN("CbBookmarkPrevNegative", c, state)) ||
00644                  (right= CheckKBN("CbBookmarkNextNegative", c, state)))
00645         {
00646             state = oglControl; // Bookmark negative
00647         }
00648         else if ((up   = CheckKBN("CbBookmarkUpPositive",   c, state)) ||
00649                  (down = CheckKBN("CbBookmarkDownPositive", c, state)) ||
00650                  (left = CheckKBN("CbBookmarkPrevPositive", c, state)) ||
00651                  (right= CheckKBN("CbBookmarkNextPositive", c, state)))
00652         {
00653             state = oglShift; // Bookmark positive
00654         }
00655         if (up)    c = oglUP;
00656         if (down)  c = oglDOWN;
00657         if (left)  c = oglLEFT;
00658         if (right) c = oglRIGHT;
00659 
00660         if (!(left || right || up || down))
00661             return false;
00662 
00663         char*  dirStr[] = {"UP (forward)", "DOWN (backward)", "LEFT", "RIGHT"};
00664         String action   = (state==oglControl) ? " removing " : " bookmarking ";
00665 
00666         if (!keepCenter && (state==oglShift || state==oglControl))
00667         {
00668             BookmarkActiveCenterEx(state==oglShift);
00669             ILOG_USER("KB: " << action << " center "  <<
00670                       mActiveContext->GetCenter() << " from " <<
00671                       mActiveContext->GetName() << " and....");
00672         }
00673 
00674         SwitchToContext((left||right) ? "time" : "shots_initialquery");
00675 
00676         if (keepCenter && (state == oglControl || state == oglShift))
00677         {
00678             int dir     = (left || up) ? -1 : 1;
00679             int target  = mActiveContext->GetRelative(dir);
00680 
00681             BookmarkSpecificEx(target, state==oglShift);
00682             ILOG_USER("KB: " << action << dirStr[c-oglUP] << target);
00683             UpdateViewsToContext();
00684         }
00685 
00686         if (!keepCenter)
00687         {
00688             ILOG_USER("KB: crossbrowser " << dirStr[c-oglUP]);
00689             if (left || down)
00690                 mActiveContext->GoLeft();
00691             if (right || up)
00692                 mActiveContext->GoRight();
00693             UpdateViewsToContext();
00694             PublishContextMoved((left || down) ? -1 : 1);
00695         }
00696         return true;
00697     }

Here is the call graph for this function:


Generated on Fri Mar 19 11:53:45 2010 for ImpalaSrc by  doxygen 1.5.1