X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=bbtk%2Fsrc%2FbbmaracasvisuPlotterView.cxx;h=98a59d0840e1fe799482370196c48daf4a65660d;hb=f010d4e7f1754243c513cc659372169c42560d5f;hp=b760826ae1b330f8022d94cb0c3892236a37645a;hpb=de5cb63cdc23317a114c77f7b6184126d7988508;p=creaMaracasVisu.git diff --git a/bbtk/src/bbmaracasvisuPlotterView.cxx b/bbtk/src/bbmaracasvisuPlotterView.cxx index b760826..98a59d0 100644 --- a/bbtk/src/bbmaracasvisuPlotterView.cxx +++ b/bbtk/src/bbmaracasvisuPlotterView.cxx @@ -19,31 +19,40 @@ void PlotterView::Process() //--------------------------------------------------- void PlotterView::CreateWidget(wxWindow* parent) { - bbtkDebugMessageInc("Core",9,"PlotterView::CreateWxWindow()"<AddLayer(new pPlotterScaleX()); - mwxwidget->AddLayer(new pPlotterScaleY()); - pGraphicalFunction *pGF = mwxwidget->getFunctionForVectors( &(bbGetInputInX()), &(bbGetInputInY()) ); // taking address of temporary ! JPRx - - mwxwidget->addFunction(pGF); - bbtkDebugDecTab("Core",9); - bbSetOutputWidget( mwxwidget ); + bbtkDebugMessageInc("Core",9,"PlotterView::CreateWxWindow()"<AddLayer(new pPlotterScaleX()); + mwxwidget->AddLayer(new pPlotterScaleY()); + + // avoid 'taking address of temporary ' + //pGraphicalFunction *pGF = mwxwidget->getFunctionForVectors( &(bbGetInputInX()), &(bbGetInputInY()) ); // taking address of temporary ! JPRx + std::vector inX = bbGetInputInX(); + std::vector inY = bbGetInputInY(); + + pGraphicalFunction *pGF = mwxwidget->getFunctionForVectors( &inX, &inY ); + mwxwidget->addFunction(pGF); + bbtkDebugDecTab("Core",9); + bbSetOutputWidget( mwxwidget ); } //--------------------------------------------------- -void PlotterView::bbUserConstructor() -{ -} - -//--------------------------------------------------- -void PlotterView::bbUserCopyConstructor(bbtk::BlackBox::Pointer) -{ -} - -//--------------------------------------------------- -void PlotterView::bbUserDestructor() +void PlotterView::bbUserSetDefaultValues() { + mwxwidget = NULL; } + + //----------------------------------------------------------------- + void PlotterView::bbUserInitializeProcessing() + { + } + + //----------------------------------------------------------------- + void PlotterView::bbUserFinalizeProcessing() + { + } + + //----------------------------------------------------------------- } // EO namespace bbcreaMaracasVisu