Mercurial > hg > orthanc-stone
comparison Framework/Widgets/LayoutWidget.cpp @ 55:f0f354a97581 wasm
simplification
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 28 Apr 2017 17:24:18 +0200 |
parents | 01aa453d4d5b |
children | ca644004d2ee |
comparison
equal
deleted
inserted
replaced
54:01aa453d4d5b | 55:f0f354a97581 |
---|---|
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 | 192 |
193 bool HasRenderMouseOver(int x, | 193 bool HasRenderMouseOver() |
194 int y) | 194 { |
195 { | 195 return widget_->HasRenderMouseOver(); |
196 if (Contains(x, y)) | |
197 { | |
198 return widget_->HasRenderMouseOver(x - left_, y - top_); | |
199 } | |
200 else | |
201 { | |
202 return false; | |
203 } | |
204 } | 196 } |
205 }; | 197 }; |
206 | 198 |
207 | 199 |
208 void LayoutWidget::ComputeChildrenExtents() | 200 void LayoutWidget::ComputeChildrenExtents() |
517 throw Orthanc::OrthancException(Orthanc::ErrorCode_InternalError); | 509 throw Orthanc::OrthancException(Orthanc::ErrorCode_InternalError); |
518 } | 510 } |
519 } | 511 } |
520 | 512 |
521 | 513 |
522 bool LayoutWidget::HasRenderMouseOver(int x, | 514 bool LayoutWidget::HasRenderMouseOver() |
523 int y) | 515 { |
524 { | 516 for (size_t i = 0; i < children_.size(); i++) |
525 for (size_t i = 0; i < children_.size(); i++) | 517 { |
526 { | 518 if (children_[i]->HasRenderMouseOver()) |
527 if (children_[i]->HasRenderMouseOver(x, y)) | |
528 { | 519 { |
529 return true; | 520 return true; |
530 } | 521 } |
531 } | 522 } |
532 | 523 |