From 25c5d91fb7c4b54f1e7d77fd9af213a3675a8339 Mon Sep 17 00:00:00 2001 From: jblum Date: Mon, 6 Jul 2009 02:28:52 +0000 Subject: 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 --- grc/blocks/variable_slider.xml | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) (limited to 'grc/blocks/variable_slider.xml') 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 @@ variable_slider from gnuradio.wxgui import forms self.$(id) = $(id) = $value - _$(id)_sizer = wx.BoxSizer(wx.VERTICAL) + #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 self.set_$(id)($value) self._$(id)_slider.set_value($id) @@ -114,6 +115,12 @@ self.GridAdd(_$(id)_sizer, $grid_pos[0], $grid_pos[1], $grid_pos[2], $grid_pos[3 grid_pos + + Notebook + notebook + + notebook + $min <= $value <= $max $min < $max 0 < $num_steps <= 1000 @@ -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. -- cgit