summaryrefslogtreecommitdiff
path: root/gr-wxgui/grc/variable_chooser.xml
diff options
context:
space:
mode:
authorJohnathan Corgan2011-03-16 08:18:30 -0700
committerJohnathan Corgan2011-03-16 08:18:30 -0700
commit4cd06fadac972d4cac559c15488bc39823063afe (patch)
tree6fe57896bc216d8c9e672194f2e4e0e75aedb645 /gr-wxgui/grc/variable_chooser.xml
parent4ad736e21f45f64fd616bb53f54e45e1c63e7330 (diff)
parent1d70ed2bd928d52a383e688949cc7f747dd584fa (diff)
downloadgnuradio-4cd06fadac972d4cac559c15488bc39823063afe.tar.gz
gnuradio-4cd06fadac972d4cac559c15488bc39823063afe.tar.bz2
gnuradio-4cd06fadac972d4cac559c15488bc39823063afe.zip
Merge remote branch 'gnuradio/next'
* gnuradio/next: (806 commits) gruel: added missing ignores gruel: fixed swig interface file to dereference pmt_t. qtgui: fix distcheck error gruel: fixing structure. Passes make check. gruel: SWIGing Gruel into Python to access PMTs. gnuradio-examples: add C++ audio examples using new gr-audio created gruel/attributes.h to house compiler specific attribute macros audio: remove obsoleted individual top-level components gr-audio: added README and default config fix volk: simplify the get new method for the aligned pool grc: moved all usrp1 and usrp2 stuff out of grc and into gr-usrp*/grc grc: swap store the subprocess object rather than the pid when executing qtgui: removed python directory that was added, never used uhd: use %ignore to hide warnings and fix errors Added/updated ignore files. Fixing gr_filter_design program to import from gnuradio Python package. audio: high prio for platform specific audio osx audio: added windows and osx audio source files audio: added config checks for other audios, added jack and port audio: make prefs look like old audio, removed old audio.py ...
Diffstat (limited to 'gr-wxgui/grc/variable_chooser.xml')
-rw-r--r--gr-wxgui/grc/variable_chooser.xml123
1 files changed, 123 insertions, 0 deletions
diff --git a/gr-wxgui/grc/variable_chooser.xml b/gr-wxgui/grc/variable_chooser.xml
new file mode 100644
index 000000000..e16e88c5d
--- /dev/null
+++ b/gr-wxgui/grc/variable_chooser.xml
@@ -0,0 +1,123 @@
+<?xml version="1.0"?>
+<!--
+###################################################
+##Variable Chooser:
+## a gui form with enumerated choices
+## radio buttons, drop down, or button
+###################################################
+ -->
+<block>
+ <name>WX GUI Chooser</name>
+ <key>variable_chooser</key>
+ <category>WX GUI Widgets</category>
+ <import>from gnuradio.wxgui import forms</import>
+ <var_make>self.$(id) = $(id) = $value</var_make>
+ <make>#set $parent = $notebook() and 'self.%s.GetPage(%s)'%$notebook() or 'self'
+#set $win = 'self._%s_chooser'%$id
+$win = forms.$(type)(
+ parent=$(parent).GetWin(),
+ value=self.$id,
+ callback=self.set_$(id),
+ #if $label()
+ label=$label,
+ #else
+ label='$id',
+ #end if
+ choices=$choices,
+ labels=$labels,
+#if $type() == 'radio_buttons'
+ style=$style,
+#end if
+)
+#if not $grid_pos()
+$(parent).Add($win)
+#else
+$(parent).GridAdd($win, $(', '.join(map(str, $grid_pos()))))
+#end if</make>
+ <callback>self.set_$(id)($value)</callback>
+ <callback>self._$(id)_chooser.set_value($id)</callback>
+ <param>
+ <name>Label</name>
+ <key>label</key>
+ <value></value>
+ <type>string</type>
+ <hide>#if $label() then 'none' else 'part'#</hide>
+ </param>
+ <param>
+ <name>Default Value</name>
+ <key>value</key>
+ <value>1</value>
+ <type>raw</type>
+ </param>
+ <param>
+ <name>Choices</name>
+ <key>choices</key>
+ <value>[1, 2, 3]</value>
+ <type>raw</type>
+ </param>
+ <param>
+ <name>Labels</name>
+ <key>labels</key>
+ <value>[]</value>
+ <type>raw</type>
+ </param>
+ <param>
+ <name>Type</name>
+ <key>type</key>
+ <value>drop_down</value>
+ <type>enum</type>
+ <option>
+ <name>Drop Down</name>
+ <key>drop_down</key>
+ </option>
+ <option>
+ <name>Radio Buttons</name>
+ <key>radio_buttons</key>
+ </option>
+ <option>
+ <name>Button</name>
+ <key>button</key>
+ </option>
+ </param>
+ <param>
+ <name>Style</name>
+ <key>style</key>
+ <value>wx.RA_HORIZONTAL</value>
+ <type>enum</type>
+ <hide>#if $type() == 'radio_buttons' then 'part' else 'all'#</hide>
+ <option>
+ <name>Horizontal</name>
+ <key>wx.RA_HORIZONTAL</key>
+ </option>
+ <option>
+ <name>Vertical</name>
+ <key>wx.RA_VERTICAL</key>
+ </option>
+ </param>
+ <param>
+ <name>Grid Position</name>
+ <key>grid_pos</key>
+ <value></value>
+ <type>grid_pos</type>
+ </param>
+ <param>
+ <name>Notebook</name>
+ <key>notebook</key>
+ <value></value>
+ <type>notebook</type>
+ </param>
+ <check>$value in $choices</check>
+ <check>not $labels or len($labels) == len($choices)</check>
+ <doc>
+This block creates a variable with a drop down, radio buttons, or a button. \
+Leave the label blank to use the variable id as the label. \
+The value index is the index of a particular choice, \
+which defines the default choice when the flow graph starts. \
+The choices must be a list of possible values. \
+Leave labels empty to use the choices as the labels.
+
+Use the Grid Position (row, column, row span, column span) to position the graphical element in the window.
+
+Use the Notebook Param (notebook-id, page-index) to place the graphical element inside of a notebook page.
+ </doc>
+</block>