~ubuntu-branches/ubuntu/trusty/gnuradio/trusty-updates

« back to all changes in this revision

Viewing changes to gr-wxgui/grc/variable_check_box.xml

  • Committer: Package Import Robot
  • Author(s): A. Maitland Bottoms
  • Date: 2012-02-26 21:26:16 UTC
  • mfrom: (1.1.4)
  • Revision ID: package-import@ubuntu.com-20120226212616-vsfkbi1158xshdql
Tags: 3.5.1-1
* new upstream version, re-packaged from scratch with modern tools
    closes: #642716, #645332, #394849, #616832, #590048, #642580,
    #647018, #557050, #559640, #631863
* CMake build

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?xml version="1.0"?>
 
2
<!--
 
3
###################################################
 
4
##Variable Check Box:
 
5
##      a gui check box form
 
6
###################################################
 
7
 -->
 
8
<block>
 
9
        <name>WX GUI Check Box</name>
 
10
        <key>variable_check_box</key>
 
11
        <category>WX GUI Widgets</category>
 
12
        <import>from gnuradio.wxgui import forms</import>
 
13
        <var_make>self.$(id) = $(id) = $value</var_make>
 
14
        <make>#set $parent = $notebook() and 'self.%s.GetPage(%s)'%$notebook() or 'self'
 
15
#set $win = 'self._%s_check_box'%$id
 
16
$win = forms.check_box(
 
17
        parent=$(parent).GetWin(),
 
18
        value=self.$id,
 
19
        callback=self.set_$(id),
 
20
        #if $label()
 
21
        label=$label,
 
22
        #else
 
23
        label='$id',
 
24
        #end if
 
25
        true=$true,
 
26
        false=$false,
 
27
)
 
28
#if not $grid_pos()
 
29
$(parent).Add($win)
 
30
#else
 
31
$(parent).GridAdd($win, $(', '.join(map(str, $grid_pos()))))
 
32
#end if</make>
 
33
        <callback>self.set_$(id)($value)</callback>
 
34
        <callback>self._$(id)_check_box.set_value($id)</callback>
 
35
        <param>
 
36
                <name>Label</name>
 
37
                <key>label</key>
 
38
                <value></value>
 
39
                <type>string</type>
 
40
                <hide>#if $label() then 'none' else 'part'#</hide>
 
41
        </param>
 
42
        <param>
 
43
                <name>Default Value</name>
 
44
                <key>value</key>
 
45
                <value>True</value>
 
46
                <type>raw</type>
 
47
        </param>
 
48
        <param>
 
49
                <name>True</name>
 
50
                <key>true</key>
 
51
                <value>True</value>
 
52
                <type>raw</type>
 
53
        </param>
 
54
        <param>
 
55
                <name>False</name>
 
56
                <key>false</key>
 
57
                <value>False</value>
 
58
                <type>raw</type>
 
59
        </param>
 
60
        <param>
 
61
                <name>Grid Position</name>
 
62
                <key>grid_pos</key>
 
63
                <value></value>
 
64
                <type>grid_pos</type>
 
65
        </param>
 
66
        <param>
 
67
                <name>Notebook</name>
 
68
                <key>notebook</key>
 
69
                <value></value>
 
70
                <type>notebook</type>
 
71
        </param>
 
72
        <check>$value in ($true, $false)</check>
 
73
        <doc>
 
74
This block creates a variable with a check box form. \
 
75
Leave the label blank to use the variable id as the label.
 
76
 
 
77
A check box form can switch between two states; \
 
78
the default being True and False. \
 
79
Override True and False to use alternative states.
 
80
 
 
81
Use the Grid Position (row, column, row span, column span) to position the graphical element in the window.
 
82
 
 
83
Use the Notebook Param (notebook-id, page-index) to place the graphical element inside of a notebook page.
 
84
        </doc>
 
85
</block>