next up previous
Next: State Space Example Up: Examples Previous: Simple Example

Difficult Example

This one shows the ability of the GUIparse to create code that will embed columns inside other columns.

Figure 3.3: Difficult Example. This example shows several columns and sub-columns with a mixture of widgets.
\includegraphics[width=4in]{Figures/difficult.eps}

# More complicated project. This one uses a combination of columns
# and rows to achieve a different effect

# first the required information
inputs 1
outputs 1
data_size 1

# Let's greate a simple column
start_col h
      label  'First Column'
      slider_with_label 'k0',-100,100,10,0
      slider_with_label 'k1',-200,200,20,1
      slider_with_label 'k2',-300,300,30,2
      slider_with_label 'k3', 0, 20, 3, 3 
      slider_with_label 'k4', 0, 100, 5, 4
      spin_with_label   'k5', 0, 100, 5, 4
      spin_with_label   'k6', 0, 100, 5, 4
end_col

# add a separator between the columns
v_separator

# now create a more complicated column
start_col n
      label  'Second Column'
      start_row n
        start_col h
          slider_with_label 'h5',-100,100,10,5  
          slider_with_label 'h6',-200,200,20,6  
          slider_with_label 'h7',0,2000,100,7   
        end_col
        v_separator
        start_col h
          slider_with_label 'h8',-100,100,10,8  
          slider_with_label 'h9',-200,200,20,9  
          slider_with_label 'h10',0,2000,100,10 
        end_col
      end_row
      h_separator
      slider_with_label 'My Big Gain\nFor Control',0,2000,100,11 
      h_separator
      start_row n
        start_col n
          label 'Tiny sub-\ncolumn (1,2)'
          slider -100,100,10,12   
          spin -200,200,20,13   
          spin 0,2000,100,14    
        end_col
        v_separator
        start_col n
          label 'Tiny sub-\ncolumn (2,2)'
          slider -100,100,10,15   
          spin -200,200,20,16   
        end_col
      end_row
end_col



Michael Barabanov 2001-06-19