]> Creatis software - bbtk.git/commitdiff
#3506 LayoutSplit minimum size
authorEduardo DAVILA <davila@creatis.insa-lyon.fr>
Wed, 26 Jul 2023 06:38:32 +0000 (08:38 +0200)
committerEduardo DAVILA <davila@creatis.insa-lyon.fr>
Wed, 26 Jul 2023 06:38:32 +0000 (08:38 +0200)
packages/kw/src/bbkwLayoutSplit.cxx
packages/std/src/bbstdVectorFilterDouble.h
packages/wx/src/bbwxLayoutSplit.cxx
packages/wx/src/bbwxLayoutTab.cxx

index 938ef982f0f268b5cd6ca5f0cc4aaac66d100ab8..70dbc6feac5c5d3a8c6c0a8aaea1c0f65c2d5485 100644 (file)
@@ -82,31 +82,25 @@ namespace bbkw
     int height = parent->GetHeight();
     int orientation = 0;
     if (bbtk::Utilities::loosematch(bbGetInputOrientation(),"0|H|HORIZONTAL")==true)  
-      { 
-       orientation = 0; 
-     }
-    else if (bbtk::Utilities::loosematch(bbGetInputOrientation(),"1|V|VERTICAL")==true)          
-      {
-       orientation = 1; 
-      }
-    else 
-      {
-       bbtkWarning("Unrecognized value '"<<bbGetInputOrientation()<<"' for input 'Orientation' of LayoutSplit "<<bbGetName()<<std::endl);
-      }
+    {
+        orientation = 0;
+    } else if (bbtk::Utilities::loosematch(bbGetInputOrientation(),"1|V|VERTICAL")==true) {
+         orientation = 1;
+    } else {
+        bbtkWarning("Unrecognized value '"<<bbGetInputOrientation()<<"' for input 'Orientation' of LayoutSplit "<<bbGetName()<<std::endl);
+    }
 
     if (orientation==0)
-      {
-       splitframe->SetOrientationToHorizontal ();
-       width = width / 2;
-      }
-    else 
-      {
-       splitframe->SetOrientationToVertical ();
-       height = height / 2 ;   
-      }  
-
-   width = width - 5;
-   height = height - 5 ;
+    {
+        splitframe->SetOrientationToHorizontal ();
+        width = width / 2;
+    } else {
+        splitframe->SetOrientationToVertical ();
+        height = height / 2 ;
+    }
+
+   width    = width - 5;
+   height   = height - 5 ;
  
    /*   
     bbGetOutputWidget()->GetApplication()->Script("place %s -x 0 -y 0 -width %d -height %d",
@@ -114,24 +108,13 @@ namespace bbkw
                                                  parent->GetWidth(),
                                                  parent->GetHeight() );
    */
-   bbGetOutputWidget()->GetApplication()->Script
-     ("pack %s -expand yes -fill both",
-      bbGetOutputWidget()->GetWidgetName());
-
-    splitframe->SetReliefToGroove();
-    splitframe->SetBorderWidth(2);
-
-
-    vtkKWWidget* w1 =  bbCreateWidgetOfInput("Widget1",splitframe->GetFrame1());
-    
-    vtkKWWidget* w2 = bbCreateWidgetOfInput("Widget2",splitframe->GetFrame2());
-    splitframe->GetApplication()->Script
-      ("pack %s -expand yes -fill both",
-       w1->GetWidgetName()) ;
-   splitframe->GetApplication()->Script
-      ("pack %s -expand yes -fill both",
-       w2->GetWidgetName()) ;
+   bbGetOutputWidget()->GetApplication()->Script("pack %s -expand yes -fill both", bbGetOutputWidget()->GetWidgetName());
+   splitframe->SetReliefToGroove();
+   splitframe->SetBorderWidth(2);
+   vtkKWWidget* w1 = bbCreateWidgetOfInput("Widget1",splitframe->GetFrame1());
+   vtkKWWidget* w2 = bbCreateWidgetOfInput("Widget2",splitframe->GetFrame2());
+   splitframe->GetApplication()->Script("pack %s -expand yes -fill both",w1->GetWidgetName()) ;
+   splitframe->GetApplication()->Script("pack %s -expand yes -fill both",w2->GetWidgetName()) ;
 
     /*
     splitframe->GetApplication()->Script("pack %s -expand yes -fill x -fill y",        w2->GetWidgetName());
index 2f3b55619de3342251e4e661011ca59b7761fb1a..c9d9438eb255b738f4c6493049206db66c9ef6dc 100644 (file)
@@ -52,7 +52,7 @@ BBTK_BEGIN_DESCRIBE_BLACK_BOX(VectorFilterDouble,bbtk::AtomicBlackBox);
   BBTK_AUTHOR("InfoDev");
   BBTK_DESCRIPTION("No Description.");
   BBTK_CATEGORY("empty");
-  BBTK_INPUT(VectorFilterDouble,Type,"default (0)  0=Erase duplicated lines, 1=Redimention Vectors, 2=Insert intermediat points,3=Adition k1, 4=Substraction k1, 5=Multilication k1, 6=Division k1, 7=Connect mesh X1,Y1,Z1,idxs1,X2,X2,X2,idx2, 8=Order All vectors with the logic of In0 , 9=Invert Vectors, 10=Nearest Point in the vector. In3PointXYZ In0LstX In1LstY In2LstZ  (Out0-index Out1-PointXYZ), 11=Mul Spacing (K1[spcX,spcY,spcZ]=Spacing), 12=Div Spacing (K1[spcX,spcY,spcZ]=Spacing), 13=Distance pointIn0 and pontIn1,  14=Select specific segments In0=lstPx In1=lstPy In2=lstPz In3=lstIndex (if k1 empty all segments are selected) ",int,"");
+  BBTK_INPUT(VectorFilterDouble,Type,"default (0)  0=Erase duplicated lines, 1=Redimention Vectors, 2=Insert intermediat points,3=Adition k1, 4=Substraction k1, 5=Multilication k1, 6=Division k1, 7=Connect mesh X1,Y1,Z1,idxs1,X2,X2,X2,idx2, 8=Order All vectors with the logic of In0 , 9=Invert Vectors, 10=Nearest Point in the vector. In3PointXYZ In0LstX In1LstY In2LstZ  (Out0-index Out1-PointXYZ), 11=Mul Spacing (K1[spcX,spcY,spcZ]=Spacing), 12=Div Spacing (K1[spcX,spcY,spcZ]=Spacing), 13=Distance pointIn0 and pontIn1,  14=Select specific segments [k1] in In0=lstPx In1=lstPy In2=lstPz In3=lstIndex (if k1 empty all segments are selected) ",int,"");
   BBTK_INPUT(VectorFilterDouble,k1,"(default [0])  nothing (Type0), k1[0]=new size vectors (Type 1) , nothing (Type2), k1[0] = Addition const. (Type 3), k1[0] = Substraction const. (Type 4), k1[0] = Multiplication const. (Type 5) , k1[0] = Division const. (Type 6)  , k1[spcX,spcY,spcZ] MulSpc In0_X,In1_Y,In2_Z (type 11),  k1[spcX,spcY,spcZ] DivSpc In0_X,In1_Y,In2_Z (type 12) , k1[segment1, segment2,..] (type 14) ",std::vector<double>,"");
   BBTK_INPUT(VectorFilterDouble,In0,"Input vector",std::vector<double>,"");
   BBTK_INPUT(VectorFilterDouble,In1,"Input vector",std::vector<double>,"");
index 460dc8697c18fb9cd23e20f5e6153e8f322c6c54..de0a432657279451d5f5931d6b037571e77ee65d 100644 (file)
@@ -82,10 +82,10 @@ namespace bbwx
                                               wxDefaultPosition,
                                               wxDefaultSize,
                                               //wxSize(400,200),
-                                              wxSP_3D |
+                           wxSP_3DSASH |
                                               wxSP_LIVE_UPDATE );
     w->SetName( bbtk::std2wx( bbGetInputWinTitle() ) );
-       w->SetMinimumPaneSize(2);
+       w->SetMinimumPaneSize(15);
        //RaC Nov2012 Correctly resize internal panels with the window resize event
        w->SetSashGravity(0.5);
 /*
index 6923062550b8500ce8c48bc16704d33645d9afca..fac1678d5f3cceb919cd1f0c05ab8caa012056b5 100644 (file)
@@ -76,7 +76,8 @@ namespace bbwx
     mwxNotebook        = new wxNotebook(panel, //bbGetWxParent(),
                                   -1, 
                                   wxDefaultPosition,
-                                  wxDefaultSize,
+//                                wxDefaultSize,
+                                     wxSize(50,50),
                                   style );
     Connect( mwxNotebook->GetId(),   wxEVT_NOTEBOOK_PAGE_CHANGED , 
             (wxObjectEventFunction)