| 1193 | } |
| 1194 | |
| 1195 | void GuiCanvas::findMouseControl(const GuiEvent &event) |
| 1196 | { |
| 1197 | // Any children at all? |
| 1198 | if(size() == 0) |
| 1199 | { |
| 1200 | mMouseControl = NULL; |
| 1201 | return; |
| 1202 | } |
| 1203 | |
| 1204 | // Otherwise, check the point and find the overlapped control. |
| 1205 | GuiControl *controlHit = findHitControl(event.mousePoint); |
| 1206 | if(controlHit != static_cast<GuiControl*>(mMouseControl)) |
| 1207 | { |
| 1208 | if(bool(mMouseControl)) |
| 1209 | mMouseControl->onMouseLeave(event); |
| 1210 | mMouseControl = controlHit; |
| 1211 | mMouseControl->onMouseEnter(event); |
| 1212 | } |
| 1213 | } |
| 1214 | |
| 1215 | void GuiCanvas::refreshMouseControl() |
| 1216 | { |
nothing calls this directly
no test coverage detected