Definition at line 267 of file SizableWindow.h. References mMaxH, mMaxW, mMaxX, mMaxY, mMinH, mMinW, mMinX, and mMinY. Referenced by OglGui::Graph::WndMouseFunc(). 00268 { 00269 int clamped = -1; 00270 if (nX < mMinX) clamped = nX = mMinX; 00271 if (nY < mMinY) clamped = nY = mMinY; 00272 if (nX > mMaxX) clamped = nX = mMaxX; 00273 if (nY > mMaxY) clamped = nY = mMaxY; 00274 if (nW < mMinW) clamped = nW = mMinW; 00275 if (nH < mMinH) clamped = nH = mMinH; 00276 if (nW > mMaxW) clamped = nW = mMaxW; 00277 if (nH > mMaxH) clamped = nH = mMaxH; 00278 return clamped != -1; 00279 }
|