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

void Impala::Visualization::ParseKeyBindingStr ( String str,
int &  c,
int &  state 
)

Definition at line 26 of file KeyBindings.h.

References Impala::atoi().

Referenced by CheckKeyBinding().

00027 {
00028     int     modState = 0;
00029     int     modIdx;
00030     String  modStr;
00031 
00032     state = c = 0;
00033     if ((modIdx=str.find('#'))!=String::npos)
00034     {
00035         modStr = str.substr(0,modIdx);
00036         if (modStr == "ctrl")
00037             modState |= oglControl;
00038         else if (modStr == "shift")
00039             modState |= oglShift;
00040         else if (modStr == "ctrl-shift" || modStr == "shift-ctrl")
00041             modState |= oglControl | oglShift;
00042     }
00043 
00044     state = modState;
00045 
00046     int     charIdx = modIdx ? modIdx+1 : 0;
00047     String  charStr = str.substr(charIdx);
00048     if (charStr.length()==1)
00049     {
00050         c = charStr[0];
00051         if (modState & oglControl)
00052         {
00053             c = toupper(c);
00054             c -= 'A'-1;
00055         }
00056     }
00057     else if (charStr[0] == 'f' && charStr[1] == 'n')
00058     {
00059         int fnNr = atoi(charStr.substr(2));
00060         c = oglFUNC(fnNr);
00061     }
00062     else if (charStr == "pageup")
00063         c = oglPAGEUP;
00064     else if (charStr == "pagedown")
00065         c = oglPAGEDOWN;
00066     else if (charStr == "up")
00067         c = oglUP;
00068     else if (charStr == "down")
00069         c = oglDOWN;
00070     else if (charStr == "right")
00071         c = oglRIGHT;
00072     else if (charStr == "left")
00073         c = oglLEFT;
00074     else if (charStr == "home")
00075         c = oglHOME;
00076     else if (charStr == "end")
00077         c = oglEND;
00078     else if (charStr == "insert")
00079         c = oglINSERT;
00080     else if (charStr == "delete")
00081         c = oglDELETE;
00082 }

Here is the call graph for this function:


Generated on Fri Mar 19 11:41:40 2010 for ImpalaSrc by  doxygen 1.5.1