X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=bbtk%2Fsrc%2FbbmaracasvisuPlotterView.cxx;h=98a59d0840e1fe799482370196c48daf4a65660d;hb=f010d4e7f1754243c513cc659372169c42560d5f;hp=4c60cf3d1af541e62652c4fcde7ce579a9795186;hpb=800f29fd7e4cc70d8706b3075454e63f0b1a5717;p=creaMaracasVisu.git diff --git a/bbtk/src/bbmaracasvisuPlotterView.cxx b/bbtk/src/bbmaracasvisuPlotterView.cxx index 4c60cf3..98a59d0 100644 --- a/bbtk/src/bbmaracasvisuPlotterView.cxx +++ b/bbtk/src/bbmaracasvisuPlotterView.cxx @@ -17,33 +17,42 @@ void PlotterView::Process() } //--------------------------------------------------- -void PlotterView::CreateWidget() +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() -{ -} - -//--------------------------------------------------- -void PlotterView::bbUserDestructor() +void PlotterView::bbUserSetDefaultValues() { + mwxwidget = NULL; } + + //----------------------------------------------------------------- + void PlotterView::bbUserInitializeProcessing() + { + } + + //----------------------------------------------------------------- + void PlotterView::bbUserFinalizeProcessing() + { + } + + //----------------------------------------------------------------- } // EO namespace bbcreaMaracasVisu