comparison Framework/Widgets/LayoutWidget.cpp @ 386:e33659decec5

renamed UpdateContent() as DoAnimation()
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 09 Nov 2018 17:06:28 +0100
parents 557c8ff1db5c
children b70e9be013e4
comparison
equal deleted inserted replaced
385:6cc3ce74dc05 386:e33659decec5
90 { 90 {
91 assert(widget != NULL); 91 assert(widget != NULL);
92 SetEmpty(); 92 SetEmpty();
93 } 93 }
94 94
95 void UpdateContent() 95 void DoAnimation()
96 { 96 {
97 if (widget_->HasUpdateContent()) 97 if (widget_->HasAnimation())
98 { 98 {
99 widget_->UpdateContent(); 99 widget_->DoAnimation();
100 } 100 }
101 } 101 }
102 102
103 IWidget& GetWidget() const 103 IWidget& GetWidget() const
104 { 104 {
360 children_.push_back(new ChildWidget(widget)); 360 children_.push_back(new ChildWidget(widget));
361 widget->SetParent(*this); 361 widget->SetParent(*this);
362 362
363 ComputeChildrenExtents(); 363 ComputeChildrenExtents();
364 364
365 if (widget->HasUpdateContent()) 365 if (widget->HasAnimation())
366 { 366 {
367 hasUpdateContent_ = true; 367 hasAnimation_ = true;
368 } 368 }
369 369
370 return *widget; 370 return *widget;
371 } 371 }
372 372
460 children_[i]->GetWidget().KeyPressed(key, keyChar, modifiers); 460 children_[i]->GetWidget().KeyPressed(key, keyChar, modifiers);
461 } 461 }
462 } 462 }
463 463
464 464
465 void LayoutWidget::UpdateContent() 465 void LayoutWidget::DoAnimation()
466 { 466 {
467 if (hasUpdateContent_) 467 if (hasAnimation_)
468 { 468 {
469 for (size_t i = 0; i < children_.size(); i++) 469 for (size_t i = 0; i < children_.size(); i++)
470 { 470 {
471 children_[i]->UpdateContent(); 471 children_[i]->DoAnimation();
472 } 472 }
473 } 473 }
474 else 474 else
475 { 475 {
476 throw Orthanc::OrthancException(Orthanc::ErrorCode_InternalError); 476 throw Orthanc::OrthancException(Orthanc::ErrorCode_InternalError);