MCPcopy Create free account
hub / github.com/cmauri/eviacam / IsCursorOverWindow

Method IsCursorOverWindow

src/clickwindowcontroller.cpp:156–177  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

154}
155
156inline
157bool CClickWindowController::IsCursorOverWindow(long x, long y)
158{
159 wxRect pos= m_pWindow->GetRect();
160 wxRect parentPos= m_pWindow->GetNoClickButton()->GetScreenRect();
161 pos.Offset(0, parentPos.GetY() - pos.GetY());
162
163
164 int top= pos.GetTop();
165 int bottom= pos.GetBottom();
166 int left= pos.GetLeft();
167 int right= pos.GetRight();
168 if (top < 0) top= 0;
169 if (bottom < 0) bottom= 0;
170 if (left < 0) left= 0;
171 if (right < 0) right= 0;
172
173 if (y<= bottom && y>= top && x>= left && x<= right)
174 return true;
175 else
176 return false;
177}
178
179mousecmd::mousecmd CClickWindowController::GetAction(long x, long y)
180{

Callers

nothing calls this directly

Calls 1

GetNoClickButtonMethod · 0.45

Tested by

no test coverage detected