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

int OglGui::SizableWindow::GetAction ( int  x,
int  y 
) [inline, protected]

Definition at line 247 of file SizableWindow.h.

References East, mAllowMove, mAllowSizeEast, mAllowSizeNorth, mAllowSizeSouth, mAllowSizeWest, Move, mSensePix, North, South, West, OglGui::OglWindow::WndHeight(), and OglGui::OglWindow::WndWidth().

Referenced by MouseFunc().

00248     {
00249         int action = 0;
00250         int w = WndWidth(), h = WndHeight();
00251 
00252         if (x >= 0 && x <= mSensePix && mAllowSizeWest)   action |= West;
00253         if (x >= w-mSensePix && x <= w && mAllowSizeEast) action |= East;
00254         if (y >= 0 && y <= mSensePix && mAllowSizeSouth)  action |= South;
00255         if (y >= h-mSensePix && y <= h && mAllowSizeNorth)action |= North;
00256 
00257         // Prevent impossible actions resulting from very small windows
00258         if ((action & (West|East)) == (West|East))
00259             action &= ~West;
00260         if ((action & (North|South)) == (North|South))
00261             action &= ~North;
00262         if (!action && x > 0 && y > 0 && x < w && y < h && mAllowMove)
00263             action = Move;
00264         return action;
00265     }

Here is the call graph for this function:


Generated on Thu Jan 13 09:26:52 2011 for ImpalaSrc by  doxygen 1.5.1