]> Creatis software - creaMaracasVisu.git/commitdiff
#3515 bbcreaMaracasVisuwxVtkBaseView_Info Middle mouse
authorEduardo DAVILA <davila@creatis.insa-lyon.fr>
Thu, 15 Jun 2023 09:29:54 +0000 (11:29 +0200)
committerEduardo DAVILA <davila@creatis.insa-lyon.fr>
Thu, 15 Jun 2023 09:29:54 +0000 (11:29 +0200)
bbtk/bbs/boxes/Mesh_tool_ApplySurface.bbg
bbtk/bbs/boxes/Mesh_tool_ApplySurface.bbs
bbtk/src/bbcreaMaracasVisuwxVtkBaseView_Info.cxx
bbtk/src/bbcreaMaracasVisuwxVtkBaseView_Info.h

index 8ce9d4f59ed76e227cbb957a76150584de562f50..298832c737a55a376ba7eb97a3b4621dea3192a7 100644 (file)
@@ -1,6 +1,6 @@
 # ----------------------------------
 # - BBTKGEditor v 1.5 BBG BlackBox Diagram file
-# - /home/garzon/Creatis/C23/creatools_source/creaMaracasVisu/bbtk/bbs/boxes/Mesh_tool_ApplySurface.bbg
+# - /Users/davila/Creatis/C23/creatools_source/creaMaracasVisu/bbtk/bbs/boxes/Mesh_tool_ApplySurface.bbg
 # ----------------------------------
 
 APP_START
@@ -72,7 +72,7 @@ COMPLEX_PORT
 meshmanagermodel
 -150.374274:130.740991:-900.000000
 FIN_COMPLEX_PORT
-BOXES:75
+BOXES:76
 BOX
 creaMaracasVisu:ShowNPoints:showNpoints
 ISEXEC:FALSE
@@ -82,8 +82,6 @@ PORT
 Radio:"2"
 PORT
 Type:"4"
-PORT
-WinTitle:"1.1   Splines"
 FIN_BOX
 BOX
 creaVtk:CreateMeshFromPoints:Box04
@@ -366,8 +364,8 @@ FIN_BOX
 BOX
 wx:LayoutLine:Box50
 ISEXEC:FALSE
--57.295971:-56.374591:-900.000000
--23.975971:-58.874591:-900.000000
+-42.742907:-58.168804:-900.000000
+-9.422907:-60.668804:-900.000000
 PORT
 Orientation:"V"
 PORT
@@ -468,8 +466,8 @@ FIN_BOX
 BOX
 wx:LayoutTab:Box86
 ISEXEC:FALSE
--57.013911:-62.286670:-900.000000
--23.693911:-64.786670:-900.000000
+-55.020341:-67.071239:-900.000000
+-21.700341:-69.571239:-900.000000
 FIN_BOX
 BOX
 creaVtk:MeshManager:Box92
@@ -672,8 +670,8 @@ FIN_BOX
 BOX
 wx:LayoutLine:Box118
 ISEXEC:FALSE
-105.323248:-27.231844:-900.000000
-138.643248:-29.731844:-900.000000
+101.734821:-52.151474:-900.000000
+135.054821:-54.651474:-900.000000
 PORT
 Orientation:"H"
 FIN_BOX
@@ -697,7 +695,17 @@ Params:" 1"
 PORT
 Type:"230"
 FIN_BOX
-CONNECTIONS:158
+BOX
+wx:LayoutLine:Box121
+ISEXEC:FALSE
+76.461485:-66.685249:-900.000000
+109.781485:-69.185249:-900.000000
+PORT
+Orientation:"V"
+PORT
+WinTitle:"1.1   Splines"
+FIN_BOX
+CONNECTIONS:159
 CONNECTION
 Box06:LstContourPointsX:Box04:LstX
 NumberOfControlPoints:0
@@ -963,9 +971,6 @@ CONNECTION
 Box50:Widget:Box86:Widget4
 NumberOfControlPoints:0
 CONNECTION
-showNpoints:Widget:Box86:Widget2
-NumberOfControlPoints:0
-CONNECTION
 Box49:Widget:Box50:Widget2
 NumberOfControlPoints:0
 CONNECTION
@@ -1152,9 +1157,6 @@ CONNECTION
 Box117:Widget:Box118:Widget2
 NumberOfControlPoints:0
 CONNECTION
-Box118:Widget:Box50:Widget9
-NumberOfControlPoints:0
-CONNECTION
 Box119:Widget:Box118:Widget3
 NumberOfControlPoints:0
 CONNECTION
@@ -1172,4 +1174,13 @@ NumberOfControlPoints:0
 CONNECTION
 Box105:Out:Box120:Mesh
 NumberOfControlPoints:0
+CONNECTION
+showNpoints:Widget:Box121:Widget1
+NumberOfControlPoints:0
+CONNECTION
+Box118:Widget:Box121:Widget2
+NumberOfControlPoints:0
+CONNECTION
+Box121:Widget:Box86:Widget2
+NumberOfControlPoints:0
 APP_END
index e11c59945ada8cc7a8cae179df2e7f507dbb0f14..f92d158ccb5d94b6fc37ed094d5e0232744fc77b 100644 (file)
@@ -1,6 +1,6 @@
 # ----------------------------------
 # - BBTKGEditor v 1.5 BBS BlackBox Script (Complex Box)
-# - /home/garzon/Creatis/C23/creatools_source/creaMaracasVisu/bbtk/bbs/boxes/Mesh_tool_ApplySurface.bbs
+# - /Users/davila/Creatis/C23/creatools_source/creaMaracasVisu/bbtk/bbs/boxes/Mesh_tool_ApplySurface.bbs
 # ----------------------------------
 
 include std
@@ -21,7 +21,6 @@ category "demo"
 new creaMaracasVisu:ShowNPoints showNpoints
   set showNpoints.Radio "2"
   set showNpoints.Type "4"
-  set showNpoints.WinTitle "1.1   Splines"
 
 new creaVtk:CreateMeshFromPoints Box04
 
@@ -255,6 +254,10 @@ new creaMaracasVisu:ShowNPoints_Tools Box120
   set Box120.Params " 1"
   set Box120.Type "230"
 
+new wx:LayoutLine Box121
+  set Box121.Orientation "V"
+  set Box121.WinTitle "1.1   Splines"
+
 
 connect Box06.LstContourPointsX Box04.LstX
 connect showNpoints.lstIndexs Box06.LstIndexsIn
@@ -333,7 +336,6 @@ connect Box82.Widget Box79.Widget2
 connect Box84.Widget Box44.Widget9
 connect Box86.Widget Box38.Widget2
 connect Box50.Widget Box86.Widget4
-connect showNpoints.Widget Box86.Widget2
 connect Box49.Widget Box50.Widget2
 connect Box34.Widget Box50.Widget4
 connect Box57.BoxChange Box08.BoxExecute
@@ -392,13 +394,15 @@ connect showNpoints.WidgetShowNPoints Box116.WidgetShowNPoints
 connect Box68.Spacing Box116.Spacing
 connect Box117.BoxChange Box116.BoxExecute
 connect Box117.Widget Box118.Widget2
-connect Box118.Widget Box50.Widget9
 connect Box119.Widget Box118.Widget3
 connect Box119.BoxChange Box120.BoxExecute
 connect showNpoints.WidgetShowNPoints Box120.WidgetShowNPoints
 connect Box68.Spacing Box120.Spacing
 connect Box105.Out Box116.Mesh
 connect Box105.Out Box120.Mesh
+connect showNpoints.Widget Box121.Widget1
+connect Box118.Widget Box121.Widget2
+connect Box121.Widget Box86.Widget2
 
 # Complex input ports
 input point showNpoints.In " "
index b70dd458beeb84b071ccae2f346845c91df36f7a..7c8c778b4f52fb62f1213e28f112c3ed202c58f8 100644 (file)
@@ -42,6 +42,8 @@ class InteractorwxVtkBaseView : public InteractorwxVtkBaseView_model
         virtual bool    OnMouseMove();
         virtual bool    OnRightButtonDown();
         virtual bool    OnRightButtonUp();
+        virtual bool    OnMiddleButtonDown();
+        virtual bool    OnMiddleButtonUp();
         virtual bool    OnLeftDClick();
         virtual bool    OnRightDClick();
 private:
@@ -95,6 +97,45 @@ bool InteractorwxVtkBaseView::OnLeftButtonUp()
     return true;
 }
 
+
+bool InteractorwxVtkBaseView::OnMiddleButtonDown()
+{
+    if (_box!=NULL)
+    {
+        if ( _box->bbGetInputInteractionType()==12 ) // MiddleDrag
+        {
+            flagDrag=true;
+        }
+        if ( (_box->bbGetInputInteractionType()==10 ) && (_wxvtkbaseview!=NULL) )   // MiddleButton Down
+        {
+            _box->SetwxVtkBaseViewOutputs( _wxvtkbaseview );
+            _box->bbSignalOutputModification();
+            return false;
+        } // if _vtkbaseview
+    } // if _box
+    return true;
+}
+
+bool InteractorwxVtkBaseView::OnMiddleButtonUp()
+{
+    if (_box!=NULL)
+    {
+        if ( _box->bbGetInputInteractionType()==12 )  // MiddleDrag
+        {
+            flagDrag=false;
+        }
+        if ( (_box->bbGetInputInteractionType()==11 ) && (_wxvtkbaseview!=NULL) )  // MiddleButton Up
+        {
+            _box->SetwxVtkBaseViewOutputs( _wxvtkbaseview );
+            _box->bbSignalOutputModification();
+            return false;
+        } // if _vtkbaseview
+    } // if _box
+    return true;
+}
+
+
+
 bool InteractorwxVtkBaseView::OnMouseMove()
 {
     if (_box!=NULL)
@@ -114,6 +155,11 @@ bool InteractorwxVtkBaseView::OnMouseMove()
         {
             ok=true;
         } // if InteractionType 9
+        if (( _box->bbGetInputInteractionType()==12 ) && (flagDrag==true) )
+        {
+            ok=true;
+        } // if InteractionType 9
+
         if (ok==true)
         {
             _box->SetwxVtkBaseViewOutputs( _wxvtkbaseview );
index d6efc375d55ef36a2a75eff57e4db14629b37651..d31b2d04c35b20114e45d2f5f7a511d803e882b3 100644 (file)
@@ -84,7 +84,7 @@ BBTK_BEGIN_DESCRIBE_BLACK_BOX(wxVtkBaseView_Info,bbtk::AtomicBlackBox);
   BBTK_INPUT(wxVtkBaseView_Info,wxVtkBaseView,"wxVtkBaseView Used for the principal output. Used in case of InteractionType!=0",wxVtkBaseView*,"");
   BBTK_INPUT(wxVtkBaseView_Info,wxVtkBaseView2,"Used in case of InteractionType!=0",wxVtkBaseView*,"");
   BBTK_INPUT(wxVtkBaseView_Info,wxVtkBaseView3,"Used in case of InteractionType!=0",wxVtkBaseView*,"");
-  BBTK_INPUT(wxVtkBaseView_Info,InteractionType,"(default 0) 0:Nothing 1:LeftButtonDown 2:LeftButtonUp 3:MouseMove 4:RightButtonDown 5:RightButtonUp 6:LeftDClick 7:RightDClick 8:DragLeft 9:DragRight",int,"");
+  BBTK_INPUT(wxVtkBaseView_Info,InteractionType,"(default 0) 0:Nothing 1:LeftButtonDown 2:LeftButtonUp 3:MouseMove 4:RightButtonDown 5:RightButtonUp 6:LeftDClick 7:RightDClick 8:DragLeft 9:DragRight 10:MiddleButtonDown 11:MiddleButtonUp  12:DragMiddle ",int,"");
 
   BBTK_OUTPUT(wxVtkBaseView_Info,Direction,"Direction -1=3D 0=YZ  1=XZ  2=XY(default)",int,"");
   BBTK_OUTPUT(wxVtkBaseView_Info,vtkRenderer,"vtkRenderer default=NULL",vtkRenderer*,"");