%
%  DIN A4:  29.7 x 21.0
%
function g = testGrList()
  clear all
  
  % Text-Size
  txt_s  = 14;

  % Rechteck-Maße
  breite = 6;
  hoehe  = 4;

  % x-Pos der Rechtecke
  diff1  = 10;
  diff2  = 11;
  start0 = 0.2;
  start  = start0+8;
  start2 = start+diff1;
  start3 = start2+diff2;
  txt_d  = 1;   % x-Textabstand 
  
  % y-Pos der Rechtecke
  y_diff  = 6;
  unten1  = 0.2;             % MATLAB-Objekte
  unten2  = y_diff+unten1;   % Shape
  unten3  = y_diff+unten2;   % GrNode
  unten4  = y_diff+unten3;   % GrList
  oben1   = unten1 + hoehe;
  oben2   = unten2 + hoehe;
  oben3   = unten3 + hoehe;
  oben4   = unten4 + hoehe;
  % y-Text-Pos.
  txt_4   = oben4 - hoehe/2;
  txt_3a  = oben3 - hoehe/2 + 0.7;
  txt_3b  = oben3 - hoehe/2 - 0.7;
  txt_2   = oben2 - hoehe/2;
  txt_1   = oben1 - hoehe/2;
    
  
  % Listen-Kopf 
  g = GrList(); 
  
  % Dummy-Linie für axis equal
  s = ShLine( 0, 1, 0,0 );
  s.setLineWidth( 0.1 )
  n = GrNode( s );  g.pushBack( n );
    
  % GrList
  s = ShText( 'GrList:', start0, txt_4 );
  s.setFontSize( txt_s );
  g.pushBack( GrNode( s ) ); 
  
  s = ShRect( breite,hoehe, start, unten4 );
  s.setLineWidth( 2 )
  g.pushBack( GrNode( s ) ); 
  
  s = ShText( 'front', start+txt_d, txt_4 );
  s.setFontSize( txt_s );
  g.pushBack( GrNode( s ) ); 
  
  % Line zu GrNode
  s = ShLine( 0, 3, start+2*txt_d, oben3 );
  s.setLineWidth( 2 )
  s.setLnStyle( LnStyle.dashdot );
  n = GrNode( s );  g.pushBack( n );
  

  % GrNode
  s = ShText( 'GrNode:', start0, txt_3a );
  s.setFontSize( txt_s );
  g.pushBack( GrNode( s ) ); 
  
  r = ShRect( breite,hoehe, start, unten3 );
  r.setLineWidth( 2 )
  g.pushBack( GrNode( r ) );
  
  sa = ShText( 'next', start+txt_d, txt_3a );
  sa.setFontSize( txt_s );
  g.pushBack( GrNode( sa ) ); 
  
  sb = ShText( 'data', start+txt_d, txt_3b );
  sb.setFontSize( txt_s );
  g.pushBack( GrNode( sb ) ); 
   
  s = ShLine( diff1-breite+1.5, 0, start+breite-1.5, txt_3a );
  s.setLineWidth( 2 )
  n = GrNode( s );  g.pushBack( n );
  
  % Line zu Shape
  sl = ShLine( 0, 2.5, start+2*txt_d, oben2 );
  sl.setLineWidth( 2 )
  sl.setLnStyle( LnStyle.dashdot );
  n = GrNode( sl );  g.pushBack( n );
  
  % Kopie 1 
  r = ShRect( r );
  r.move( diff1, 0 );
  g.pushBack( GrNode( r ) );
  
  sa = ShText( sa );
  sa.move( diff1, 0 );
  g.pushBack( GrNode( sa ) );
  
  sb = ShText( sb );
  sb.move( diff1, 0 );
  g.pushBack( GrNode( sb ) );
  
  s = ShLine( 2.5, 0, start2+breite-1.5, txt_3a );
  s.setLineWidth( 2 )
  n = GrNode( s );  g.pushBack( n );
 
  s = ShText( '...', start2+breite+txt_d+.2, txt_3a+0.4 );
  s.setFontSize( txt_s );
  g.pushBack( GrNode( s ) ); 
  
  s = ShLine( -2.4, 0, start3, txt_3a );
  s.setLineWidth( 2 )
  n = GrNode( s );  g.pushBack( n );
  
  sl = ShLine( sl );
  sl.move( diff1, 0 );
  n = GrNode( sl );  g.pushBack( n );
  
  % Kopie 2  
  r = ShRect( r );
  r.move( diff2, 0 );
  g.pushBack( GrNode( r ) );
  
  sa = ShText( sa );
  sa.move( diff2, 0 );
  g.pushBack( GrNode( sa ) );
  
  sb = ShText( sb );
  sb.move( diff2, 0 );
  g.pushBack( GrNode( sb ) );  
  
  sl = ShLine( sl );
  sl.move( diff2, 0 );
  n = GrNode( sl );  g.pushBack( n );
  
 
  % Shape
  s = ShText( 'Shape:', start0, txt_2 );
  s.setFontSize( txt_s );
  g.pushBack( GrNode( s ) ); 
  
  s = ShRect( breite,hoehe, start, unten2 );
  s.setLineWidth( 2 )
  g.pushBack( GrNode( s ) ); 
  
  s = ShText( 'hnd', start+txt_d, txt_2 );
  s.setFontSize( txt_s );
  g.pushBack( GrNode( s ) ); 
  
  s = ShLine( 0, 3, start+2*txt_d, oben1 );
  s.setLineWidth( 2 )
  s.setLnStyle( LnStyle.dashdot );
  n = GrNode( s );  g.pushBack( n );
  
    
  % MATLAB-Objekte
  s = ShText( 'MATLAB:', start0, txt_1 );
  s.setFontSize( txt_s );
  g.pushBack( GrNode( s ) ); 
  
  s = ShRect( breite,hoehe, start, unten1 );
  s.setLineWidth( 2 )
  g.pushBack( GrNode( s ) ); 
  
  s = ShText( 'plot', start+txt_d, txt_1 );
  s.setFontSize( txt_s );
  g.pushBack( GrNode( s ) ); 
    
  % alles zeichnen 
  g.draw;  
  g.noTicks
  
end