comparison Framework/Widgets/LayoutWidget.cpp @ 54:01aa453d4d5b wasm

IWidget::HasRenderMouseOver
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 27 Apr 2017 17:49:29 +0200
parents c2dc924f1a63
children f0f354a97581
comparison
equal deleted inserted replaced
53:c2dc924f1a63 54:01aa453d4d5b
187 if (Contains(x, y)) 187 if (Contains(x, y))
188 { 188 {
189 widget_->MouseWheel(direction, x - left_, y - top_, modifiers); 189 widget_->MouseWheel(direction, x - left_, y - top_, modifiers);
190 } 190 }
191 } 191 }
192
193 bool HasRenderMouseOver(int x,
194 int y)
195 {
196 if (Contains(x, y))
197 {
198 return widget_->HasRenderMouseOver(x - left_, y - top_);
199 }
200 else
201 {
202 return false;
203 }
204 }
192 }; 205 };
193 206
194 207
195 void LayoutWidget::ComputeChildrenExtents() 208 void LayoutWidget::ComputeChildrenExtents()
196 { 209 {
502 else 515 else
503 { 516 {
504 throw Orthanc::OrthancException(Orthanc::ErrorCode_InternalError); 517 throw Orthanc::OrthancException(Orthanc::ErrorCode_InternalError);
505 } 518 }
506 } 519 }
520
521
522 bool LayoutWidget::HasRenderMouseOver(int x,
523 int y)
524 {
525 for (size_t i = 0; i < children_.size(); i++)
526 {
527 if (children_[i]->HasRenderMouseOver(x, y))
528 {
529 return true;
530 }
531 }
532
533 return false;
534 }
507 } 535 }