]> Creatis software - bbtkGEditor.git/blobdiff - lib/EditorGraphicBBS/bbsVtkGUIEditorGraphic/vtkGBoxView.h
#3084 bbGEditor Bug New Normal - Color refresh for inputs and outputs
[bbtkGEditor.git] / lib / EditorGraphicBBS / bbsVtkGUIEditorGraphic / vtkGBoxView.h
index df91361af8f9ddf1cc742e8653221b5f687af986..66fd90da22e41fbe606fc51ef2b1d58bf6bccf3a 100644 (file)
@@ -73,6 +73,7 @@ Version:   $Revision$
 //Includes same project
 #include "GlobalConstants.h"
 #include "vtkGObjectView.h"
+#include "vtkGPortView.h"
 #include "GBoxModel.h"
 
 //Includes creaMaracasVisu
@@ -90,56 +91,48 @@ Version:   $Revision$
 #include "vtkTextActor3D.h"
 #include "vtkTextProperty.h"
 
-
 //Includes std
 #include <iostream>
 
-
 namespace bbtk
 {
-
        class vtkGBoxView : public vtkGObjectView
        {
-
        public: 
-
                //Constructors
                vtkGBoxView();
                ~vtkGBoxView();
-               
                //Public methods                
-
+               void addInputPort(vtkGPortView *inputport);
+               void addOutputPort(vtkGPortView *outputport);
        private:
-
                //Private Attributes
-
                // Input Triangles
-               vtkPoints                       *_TrianglesInputsPts;
-               vtkPolyDataMapper       *_TrianglesInputsPolyMapper;
-               vtkActor                        *_TrianglesInputsActor;
+               vtkPoints                                       *_TrianglesInputsPts;
+               vtkPolyDataMapper                       *_TrianglesInputsPolyMapper;
+               vtkActor                                        *_TrianglesInputsActor;
+               vtkUnsignedCharArray            *_cellDataInputTriangles;  // input output port colors Color
                // Output Triangles
-               vtkPoints                       *_TrianglesOutputsPts;
-               vtkPolyDataMapper       *_TrianglesOutputsPolyMapper;
-               vtkActor                        *_TrianglesOutputsActor;
-
+               vtkPoints                                       *_TrianglesOutputsPts;
+               vtkPolyDataMapper                       *_TrianglesOutputsPolyMapper;
+               vtkActor                                        *_TrianglesOutputsActor;
+               vtkUnsignedCharArray            *_cellDataOutputTriangles;  // input output port colors Color
                //Private Methods
-
        protected:
-
                //Protected Attributes
-               
+               //Protected Attributes
+               std::vector<vtkGPortView*>      _inputsG;
+               std::vector<vtkGPortView*>      _outputsG;
                //Protected Methods
                virtual void addVtkActors();
                virtual void removeVtkActors();
                virtual void createVtkObjects();
-                       void createVtkInputOutputPorts();
-
+                               void createVtkInputOutputPorts();
                virtual void update(int idController,int command);
                virtual void updateColors();
+                               void updateColorsPorts();
                void updatePorts();
        };
-
-
 }
 // namespace bbtk
 #endif