]> Creatis software - creaMaracasVisu.git/blobdiff - bbtk/src/bbmaracasvisuPlotterView.cxx
char * vs std::string
[creaMaracasVisu.git] / bbtk / src / bbmaracasvisuPlotterView.cxx
index cee80abbc03277a852ce4e810d114ceffa0199de..98a59d0840e1fe799482370196c48daf4a65660d 100644 (file)
@@ -19,32 +19,40 @@ void PlotterView::Process()
 //---------------------------------------------------
 void PlotterView::CreateWidget(wxWindow* parent)
 {
-    bbtkDebugMessageInc("Core",9,"PlotterView::CreateWxWindow()"<<std::endl);
-               mwxwidget = new pPlotterWindow( parent , -1,wxDefaultPosition,  wxDefaultSize,  0 );
-               mwxwidget->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()"<<std::endl);
+    
+   mwxwidget = new pPlotterWindow( parent , -1,wxDefaultPosition,  wxDefaultSize,  0 );
+   mwxwidget->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<double> inX = bbGetInputInX();
+   std::vector<double> inY = bbGetInputInY();
+      
+   pGraphicalFunction *pGF = mwxwidget->getFunctionForVectors( &inX, &inY ); 
+   mwxwidget->addFunction(pGF);
+   bbtkDebugDecTab("Core",9);
+   bbSetOutputWidget( mwxwidget );
 }
 
 //---------------------------------------------------
-void PlotterView::bbUserConstructor()
+void PlotterView::bbUserSetDefaultValues()
 {
        mwxwidget = NULL;
 }
-
-//---------------------------------------------------
-void PlotterView::bbUserCopyConstructor(bbtk::BlackBox::Pointer)
-{
-}
-
-//---------------------------------------------------
-void PlotterView::bbUserDestructor()
-{
-}
+       
+       //-----------------------------------------------------------------     
+       void PlotterView::bbUserInitializeProcessing()
+       {
+       }
+       
+       //-----------------------------------------------------------------     
+       void PlotterView::bbUserFinalizeProcessing()
+       {
+       }
+       
+       //-----------------------------------------------------------------     
 
 }
 // EO namespace bbcreaMaracasVisu