gcc_pure static bool IsFullWindow(const Window &w, int width, int height) { return w.IsVisible() && w.GetLeft() <= 0 && w.GetRight() >= (int)width && w.GetTop() <= 0 && w.GetBottom() >= (int)height; }
gcc_pure static bool IsAt(Window &w, PixelScalar x, PixelScalar y) { return w.IsVisible() && x >= w.GetLeft() && x < w.GetRight() && y >= w.GetTop() && y < w.GetBottom(); }
bool ContainerWindow::OnMouseDouble(PixelScalar x, PixelScalar y) { Window *child = EventChildAt(x, y); if (child != NULL) return child->OnMouseDouble(x - child->GetLeft(), y - child->GetTop()); return PaintWindow::OnMouseDouble(x, y); }
bool ContainerWindow::OnMouseMove(PixelScalar x, PixelScalar y, unsigned keys) { Window *child = EventChildAt(x, y); if (child != NULL) return child->OnMouseMove(x - child->GetLeft(), y - child->GetTop(), keys); return PaintWindow::OnMouseMove(x, y, keys); }
bool ContainerWindow::OnMouseWheel(PixelScalar x, PixelScalar y, int delta) { Window *child = EventChildAt(x, y); if (child != NULL) return child->OnMouseWheel(x - child->GetLeft(), y - child->GetTop(), delta); return PaintWindow::OnMouseWheel(x, y, delta); }