# HG changeset patch # User am@osimis.io # Date 1535374717 -7200 # Node ID 8a86695fcbc322637199b85dd339af943445edfa # Parent a38465cc909f804e66d45796be47a0cb0163eb4b renamings diff -r a38465cc909f -r 8a86695fcbc3 Framework/Viewport/IViewport.h --- a/Framework/Viewport/IViewport.h Mon Aug 27 14:41:49 2018 +0200 +++ b/Framework/Viewport/IViewport.h Mon Aug 27 14:58:37 2018 +0200 @@ -86,6 +86,6 @@ virtual void UpdateContent() = 0; // Should only be called from IWidget - virtual void NotifyChange(const IWidget& widget) = 0; + virtual void NotifyContentChanged(const IWidget& widget) = 0; }; } diff -r a38465cc909f -r 8a86695fcbc3 Framework/Viewport/WidgetViewport.cpp --- a/Framework/Viewport/WidgetViewport.cpp Mon Aug 27 14:41:49 2018 +0200 +++ b/Framework/Viewport/WidgetViewport.cpp Mon Aug 27 14:58:37 2018 +0200 @@ -80,7 +80,7 @@ } - void WidgetViewport::NotifyChange(const IWidget& widget) + void WidgetViewport::NotifyContentChanged(const IWidget& widget) { backgroundChanged_ = true; observers_.Apply(*this, &IObserver::OnViewportContentChanged); diff -r a38465cc909f -r 8a86695fcbc3 Framework/Viewport/WidgetViewport.h --- a/Framework/Viewport/WidgetViewport.h Mon Aug 27 14:41:49 2018 +0200 +++ b/Framework/Viewport/WidgetViewport.h Mon Aug 27 14:58:37 2018 +0200 @@ -51,7 +51,7 @@ IWidget& SetCentralWidget(IWidget* widget); // Takes ownership - virtual void NotifyChange(const IWidget& widget); + virtual void NotifyContentChanged(const IWidget& widget); virtual void Register(IObserver& observer) { diff -r a38465cc909f -r 8a86695fcbc3 Framework/Widgets/EmptyWidget.h --- a/Framework/Widgets/EmptyWidget.h Mon Aug 27 14:41:49 2018 +0200 +++ b/Framework/Widgets/EmptyWidget.h Mon Aug 27 14:58:37 2018 +0200 @@ -58,7 +58,7 @@ { } - virtual void NotifyChange() + virtual void NotifyContentChanged() { } diff -r a38465cc909f -r 8a86695fcbc3 Framework/Widgets/IWidget.h --- a/Framework/Widgets/IWidget.h Mon Aug 27 14:41:49 2018 +0200 +++ b/Framework/Widgets/IWidget.h Mon Aug 27 14:58:37 2018 +0200 @@ -73,6 +73,6 @@ // Subclasses can call this method to signal the display of the // widget must be refreshed - virtual void NotifyChange() = 0; + virtual void NotifyContentChanged() = 0; }; } diff -r a38465cc909f -r 8a86695fcbc3 Framework/Widgets/LayerWidget.cpp --- a/Framework/Widgets/LayerWidget.cpp Mon Aug 27 14:41:49 2018 +0200 +++ b/Framework/Widgets/LayerWidget.cpp Mon Aug 27 14:58:37 2018 +0200 @@ -341,7 +341,7 @@ currentScene_->ContainsPlane(slice)) { currentScene_->SetLayer(index, tmp.release()); - NotifyChange(); + NotifyContentChanged(); } else if (pendingScene_.get() != NULL && pendingScene_->ContainsPlane(slice)) @@ -353,7 +353,7 @@ pendingScene_->IsComplete()) { currentScene_ = pendingScene_; - NotifyChange(); + NotifyContentChanged(); } } } @@ -463,7 +463,7 @@ pendingScene_->SetLayerStyle(layer, style); } - NotifyChange(); + NotifyContentChanged(); } diff -r a38465cc909f -r 8a86695fcbc3 Framework/Widgets/LayoutWidget.cpp --- a/Framework/Widgets/LayoutWidget.cpp Mon Aug 27 14:41:49 2018 +0200 +++ b/Framework/Widgets/LayoutWidget.cpp Mon Aug 27 14:58:37 2018 +0200 @@ -261,7 +261,7 @@ } } - NotifyChange(*this); + NotifyContentChanged(*this); } @@ -297,10 +297,10 @@ } - void LayoutWidget::NotifyChange(const IWidget& widget) + void LayoutWidget::NotifyContentChanged(const IWidget& widget) { // One of the children has changed - WidgetBase::NotifyChange(); + WidgetBase::NotifyContentChanged(); } diff -r a38465cc909f -r 8a86695fcbc3 Framework/Widgets/LayoutWidget.h --- a/Framework/Widgets/LayoutWidget.h Mon Aug 27 14:41:49 2018 +0200 +++ b/Framework/Widgets/LayoutWidget.h Mon Aug 27 14:58:37 2018 +0200 @@ -55,7 +55,7 @@ virtual void SetDefaultView(); - virtual void NotifyChange(const IWidget& widget); + virtual void NotifyContentChanged(const IWidget& widget); void SetHorizontal(); diff -r a38465cc909f -r 8a86695fcbc3 Framework/Widgets/TestCairoWidget.cpp --- a/Framework/Widgets/TestCairoWidget.cpp Mon Aug 27 14:41:49 2018 +0200 +++ b/Framework/Widgets/TestCairoWidget.cpp Mon Aug 27 14:58:37 2018 +0200 @@ -36,7 +36,7 @@ value_ = 1; } - NotifyChange(); + NotifyContentChanged(); } diff -r a38465cc909f -r 8a86695fcbc3 Framework/Widgets/TestWorldSceneWidget.cpp --- a/Framework/Widgets/TestWorldSceneWidget.cpp Mon Aug 27 14:41:49 2018 +0200 +++ b/Framework/Widgets/TestWorldSceneWidget.cpp Mon Aug 27 14:58:37 2018 +0200 @@ -131,7 +131,7 @@ if (animate_) { count_++; - NotifyChange(); + NotifyContentChanged(); } else { diff -r a38465cc909f -r 8a86695fcbc3 Framework/Widgets/WidgetBase.cpp --- a/Framework/Widgets/WidgetBase.cpp Mon Aug 27 14:41:49 2018 +0200 +++ b/Framework/Widgets/WidgetBase.cpp Mon Aug 27 14:58:37 2018 +0200 @@ -27,16 +27,16 @@ namespace OrthancStone { - void WidgetBase::NotifyChange() + void WidgetBase::NotifyContentChanged() { if (parent_ != NULL) { - parent_->NotifyChange(); + parent_->NotifyContentChanged(); } if (viewport_ != NULL) { - viewport_->NotifyChange(*this); + viewport_->NotifyContentChanged(*this); } } diff -r a38465cc909f -r 8a86695fcbc3 Framework/Widgets/WidgetBase.h --- a/Framework/Widgets/WidgetBase.h Mon Aug 27 14:41:49 2018 +0200 +++ b/Framework/Widgets/WidgetBase.h Mon Aug 27 14:58:37 2018 +0200 @@ -105,7 +105,7 @@ return transmitMouseOver_; } - virtual void NotifyChange(); + virtual void NotifyContentChanged(); const std::string& GetName() const { diff -r a38465cc909f -r 8a86695fcbc3 Framework/Widgets/WorldSceneWidget.cpp --- a/Framework/Widgets/WorldSceneWidget.cpp Mon Aug 27 14:41:49 2018 +0200 +++ b/Framework/Widgets/WorldSceneWidget.cpp Mon Aug 27 14:58:37 2018 +0200 @@ -272,7 +272,7 @@ SetSceneExtent(view_); view_.SetDefaultView(); - NotifyChange(); + NotifyContentChanged(); observers_.Apply(*this, &IWorldObserver::NotifyViewChange, view_); } @@ -282,7 +282,7 @@ { view_ = view; - NotifyChange(); + NotifyContentChanged(); observers_.Apply(*this, &IWorldObserver::NotifyViewChange, view_); } diff -r a38465cc909f -r 8a86695fcbc3 Platforms/Wasm/Defaults.cpp --- a/Platforms/Wasm/Defaults.cpp Mon Aug 27 14:41:49 2018 +0200 +++ b/Platforms/Wasm/Defaults.cpp Mon Aug 27 14:58:37 2018 +0200 @@ -18,7 +18,7 @@ static OrthancStone::StartupParametersBuilder startupParametersBuilder; static OrthancStone::MessageBroker broker; -static OrthancStone::ChangeObserver changeObserver_; +static OrthancStone::ViewportContentChangedObserver viewportContentChangedObserver_; static OrthancStone::StatusBar statusBar_; static std::list> viewports_; @@ -50,7 +50,7 @@ printf("There are now %d viewports in C++\n", viewports_.size()); viewport->SetStatusBar(statusBar_); - viewport->Register(changeObserver_); + viewport->Register(viewportContentChangedObserver_); return viewport.get(); } @@ -123,7 +123,7 @@ unsigned int height, uint8_t* data) { - changeObserver_.Reset(); + viewportContentChangedObserver_.Reset(); //printf("ViewportRender called %dx%d\n", width, height); if (width == 0 || diff -r a38465cc909f -r 8a86695fcbc3 Platforms/Wasm/Defaults.h --- a/Platforms/Wasm/Defaults.h Mon Aug 27 14:41:49 2018 +0200 +++ b/Platforms/Wasm/Defaults.h Mon Aug 27 14:58:37 2018 +0200 @@ -31,7 +31,7 @@ namespace OrthancStone { // default Ovserver to trigger Viewport redraw when something changes in the Viewport - class ChangeObserver : + class ViewportContentChangedObserver : public OrthancStone::IViewport::IObserver { private: @@ -39,7 +39,7 @@ bool isScheduled_; public: - ChangeObserver() : + ViewportContentChangedObserver() : isScheduled_(false) { } @@ -49,7 +49,7 @@ isScheduled_ = false; } - virtual void NotifyChange(const OrthancStone::IViewport &viewport) + virtual void OnViewportContentChanged(const OrthancStone::IViewport &viewport) { if (!isScheduled_) {