diff options
author | jblum | 2009-07-06 02:28:52 +0000 |
---|---|---|
committer | jblum | 2009-07-06 02:28:52 +0000 |
commit | 25c5d91fb7c4b54f1e7d77fd9af213a3675a8339 (patch) | |
tree | 317d2e623aa9de602197089dab6dcc4fbb17da6f /grc/blocks/variable_slider.xml | |
parent | a6396abe127c504f890d0cd45171c46ebfbb0f3d (diff) | |
download | gnuradio-25c5d91fb7c4b54f1e7d77fd9af213a3675a8339.tar.gz gnuradio-25c5d91fb7c4b54f1e7d77fd9af213a3675a8339.tar.bz2 gnuradio-25c5d91fb7c4b54f1e7d77fd9af213a3675a8339.zip |
Merged r11309:11357 from grc branch.
Adds notebook cabability to grc and its wxgui windows/controls.
git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@11358 221aa14e-8319-0410-a670-987f0aec2ac5
Diffstat (limited to 'grc/blocks/variable_slider.xml')
-rw-r--r-- | grc/blocks/variable_slider.xml | 27 |
1 files changed, 18 insertions, 9 deletions
diff --git a/grc/blocks/variable_slider.xml b/grc/blocks/variable_slider.xml index 875ae74af..c13d20856 100644 --- a/grc/blocks/variable_slider.xml +++ b/grc/blocks/variable_slider.xml @@ -10,10 +10,12 @@ <key>variable_slider</key> <import>from gnuradio.wxgui import forms</import> <var_make>self.$(id) = $(id) = $value</var_make> - <make>_$(id)_sizer = wx.BoxSizer(wx.VERTICAL) + <make>#set $parent = $notebook() and 'self.%s.GetPage(%s)'%$notebook() or 'self' +#set $win = '_%s_sizer'%$id +$win = wx.BoxSizer(wx.VERTICAL) self._$(id)_text_box = forms.text_box( - parent=self.GetWin(), - sizer=_$(id)_sizer, + parent=$(parent).GetWin(), + sizer=$win, value=self.$id, callback=self.set_$(id), #if $label() @@ -25,8 +27,8 @@ self._$(id)_text_box = forms.text_box( proportion=0, ) self._$(id)_slider = forms.slider( - parent=self.GetWin(), - sizer=_$(id)_sizer, + parent=$(parent).GetWin(), + sizer=$win, value=self.$id, callback=self.set_$(id), minimum=$min, @@ -36,11 +38,10 @@ self._$(id)_slider = forms.slider( cast=$(converver.slider_cast), proportion=1, ) -#set $grid_pos = $grid_pos() -#if not grid_pos -self.Add(_$(id)_sizer) +#if not $grid_pos() +$(parent).Add($win) #else -self.GridAdd(_$(id)_sizer, $grid_pos[0], $grid_pos[1], $grid_pos[2], $grid_pos[3]) +$(parent).GridAdd($win, $(', '.join(map(str, $grid_pos())))) #end if</make> <callback>self.set_$(id)($value)</callback> <callback>self._$(id)_slider.set_value($id)</callback> @@ -114,6 +115,12 @@ self.GridAdd(_$(id)_sizer, $grid_pos[0], $grid_pos[1], $grid_pos[2], $grid_pos[3 <value></value> <type>grid_pos</type> </param> + <param> + <name>Notebook</name> + <key>notebook</key> + <value></value> + <type>notebook</type> + </param> <check>$min <= $value <= $max</check> <check>$min < $max</check> <check>0 < $num_steps <= 1000</check> @@ -125,5 +132,7 @@ The value must be between the minimum and the maximum. \ The number of steps must be between 0 and 1000. 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> |