Merging r11186:11273 from grc branch.
[debian/gnuradio] / grc / blocks / options.xml
1 <?xml version="1.0"?>
2 <!--
3 ###################################################
4 ##Options Block:
5 ## options for window size,
6 ## and flow graph building.
7 ###################################################
8  -->
9 <block>
10         <name>Options</name>
11         <key>options</key>
12         <import>from gnuradio import gr
13 #if $generate_options() == 'wx_gui'
14 from grc_gnuradio import wxgui as grc_wxgui
15 import wx
16 #end if
17 #if $generate_options() != 'hb'
18 from optparse import OptionParser
19 from gnuradio.eng_option import eng_option
20 #end if
21 </import>
22         <make></make>
23         <callback>self.start($autostart)</callback>
24         <param>
25                 <name>Title</name>
26                 <key>title</key>
27                 <value></value>
28                 <type>string</type>
29                 <hide>#if $title() then 'none' else 'part'#</hide>
30         </param>
31         <param>
32                 <name>Author</name>
33                 <key>author</key>
34                 <value></value>
35                 <type>string</type>
36                 <hide>#if $author() then 'none' else 'part'#</hide>
37         </param>
38         <param>
39                 <name>Description</name>
40                 <key>description</key>
41                 <value></value>
42                 <type>string</type>
43                 <hide>#if $description() then 'none' else 'part'#</hide>
44         </param>
45         <param>
46                 <name>Window Size</name>
47                 <key>window_size</key>
48                 <value>1280, 1024</value>
49                 <type>int_vector</type>
50                 <hide>part</hide>
51         </param>
52         <param>
53                 <name>Generate Options</name>
54                 <key>generate_options</key>
55                 <value>wx_gui</value>
56                 <type>enum</type>
57                 <hide>#if $generate_options() == 'wx_gui' then 'part' else 'none'#</hide>
58                 <option>
59                         <name>WX GUI</name>
60                         <key>wx_gui</key>
61                 </option>
62                 <option>
63                         <name>No GUI</name>
64                         <key>no_gui</key>
65                 </option>
66                 <option>
67                         <name>Hier Block</name>
68                         <key>hb</key>
69                 </option>
70         </param>
71         <param>
72                 <name>Category</name>
73                 <key>category</key>
74                 <value>Custom</value>
75                 <type>string</type>
76                 <hide>#if $generate_options() == 'hb' then 'none' else 'all'#</hide>
77         </param>
78         <param>
79                 <name>Autostart</name>
80                 <key>autostart</key>
81                 <value>True</value>
82                 <type>bool</type>
83                 <hide>#if $generate_options() == 'wx_gui'
84         #if str($autostart) == 'True'
85 part#slurp
86         #else
87 none#slurp
88         #end if
89 #else
90 all#slurp
91 #end if</hide>
92                 <option>
93                         <name>Yes</name>
94                         <key>True</key>
95                 </option>
96                 <option>
97                         <name>No</name>
98                         <key>False</key>
99                 </option>
100         </param>
101         <param>
102                 <name>Realtime Scheduling</name>
103                 <key>realtime_scheduling</key>
104                 <value></value>
105                 <type>enum</type>
106                 <hide>#if $generate_options() == 'hb'
107 all#slurp
108 #elif $realtime_scheduling()
109 none#slurp
110 #else
111 part#slurp
112 #end if</hide>
113                 <option>
114                         <name>Off</name>
115                         <key></key>
116                 </option>
117                 <option>
118                         <name>On</name>
119                         <key>1</key>
120                 </option>
121         </param>
122         <check>len($window_size) == 2</check>
123         <check>300 &lt;= $(window_size)[0] &lt;= 4096</check>
124         <check>300 &lt;= $(window_size)[1] &lt;= 4096</check>
125         <doc>
126 The options block sets special parameters for the flow graph. \
127 Only one option block is allowed per flow graph.
128
129 Title, author, and description parameters are for identification purposes.
130
131 The window size controls the dimensions of the flow graph editor. \
132 The window size (width, height) must be between (300, 300) and (4096, 4096).
133
134 The generate options controls the type of code generated. \
135 Non-graphical flow graphs should avoid using graphical sinks or graphical variable controls.
136
137 In a graphical application, \
138 autostart can be controlled by a variable to start and stop the flowgraph at runtime.
139
140 The id of this block determines the name of the generated file and the name of the class. \
141 For example, an id of my_block will generate the file my_block.py and class my_block(gr....
142
143 The category parameter determines the placement of the block in the block selection window. \
144 The category only applies when creating hier blocks. \
145 To put hier blocks into the root category, enter / for the category.
146         </doc>
147 </block>