PlaceInGrid (Point point, Dimension size) { // 1/3 (left) | (center/bottom) | 1/3 (right) if (point.x < size.width / 3) return PlaceInGrid.left; if (point.x > size.width * 2 / 3) return PlaceInGrid.right; // 3/4 (center with tab titles) | 1/4 (bottom) if (point.y > size.height * 3 / 4) return PlaceInGrid.bottom; return PlaceInGrid.center; }