Add USRP2 clock source parameter to GRC blocks.
[debian/gnuradio] / grc / blocks / variable_check_box.xml
index 59ace503b8c4acb2398f507be47bd32b3286e02f..a703703c766ec018c3ad39534c5691d0fb35940b 100644 (file)
        <key>variable_check_box</key>
        <import>from gnuradio.wxgui import forms</import>
        <var_make>self.$(id) = $(id) = $value</var_make>
        <key>variable_check_box</key>
        <import>from gnuradio.wxgui import forms</import>
        <var_make>self.$(id) = $(id) = $value</var_make>
-       <make>self.$(id)_check_box = forms.check_box(
-       parent=self.GetWin(),
+       <make>#set $parent = $notebook() and 'self.%s.GetPage(%s)'%$notebook() or 'self'
+#set $win = 'self._%s_check_box'%$id
+$win = forms.check_box(
+       parent=$(parent).GetWin(),
        value=self.$id,
        callback=self.set_$(id),
        #if $label()
        value=self.$id,
        callback=self.set_$(id),
        #if $label()
        true=$true,
        false=$false,
 )
        true=$true,
        false=$false,
 )
-#set $grid_pos = $grid_pos()
-#if not grid_pos
-self.Add(self.$(id)_check_box)
+#if not $grid_pos()
+$(parent).Add($win)
 #else
 #else
-self.GridAdd(self.$(id)_check_box, $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>
 #end if</make>
        <callback>self.set_$(id)($value)</callback>
-       <callback>self.$(id)_check_box.set_value($id)</callback>
+       <callback>self._$(id)_check_box.set_value($id)</callback>
        <param>
                <name>Label</name>
                <key>label</key>
        <param>
                <name>Label</name>
                <key>label</key>
@@ -61,6 +62,12 @@ self.GridAdd(self.$(id)_check_box, $grid_pos[0], $grid_pos[1], $grid_pos[2], $gr
                <value></value>
                <type>grid_pos</type>
        </param>
                <value></value>
                <type>grid_pos</type>
        </param>
+       <param>
+               <name>Notebook</name>
+               <key>notebook</key>
+               <value></value>
+               <type>notebook</type>
+       </param>
        <check>$value in ($true, $false)</check>
        <doc>
 This block creates a variable with a check box form. \
        <check>$value in ($true, $false)</check>
        <doc>
 This block creates a variable with a check box form. \
@@ -71,5 +78,7 @@ the default being True and False. \
 Override True and False to use alternative states.
 
 Use the Grid Position (row, column, row span, column span) to position the graphical element in the window.
 Override True and False to use alternative states.
 
 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>
        </doc>
 </block>