MCPcopy Create free account
hub / github.com/VitalAudio/visage / handleHitTest

Method handleHitTest

visage_app/window_event_handler.cpp:239–249  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

237 }
238
239 HitTestResult WindowEventHandler::handleHitTest(int x, int y) {
240 Point window_position = convertToLogical({ x, y });
241 Frame* hovered_frame = content_frame_->frameAtPoint(window_position);
242 if (hovered_frame == nullptr)
243 current_hit_test_ = HitTestResult::Client;
244 else {
245 Point position = window_position - hovered_frame->positionInWindow();
246 current_hit_test_ = hovered_frame->hitTest(position);
247 }
248 return current_hit_test_;
249 }
250
251 void WindowEventHandler::handleMouseMove(int x, int y, int button_state, int modifiers) {
252 MouseEvent mouse_event = mouseEvent(x, y, button_state, modifiers);

Callers

nothing calls this directly

Calls 3

frameAtPointMethod · 0.80
positionInWindowMethod · 0.80
hitTestMethod · 0.45

Tested by

no test coverage detected