source: CPL/oasis3-mct/branches/OASIS3-MCT_2.0_branch/util/oasisgui/opentea/create_switch.tcl @ 4775

Last change on this file since 4775 was 4775, checked in by aclsce, 5 years ago
  • Imported oasis3-mct from Cerfacs svn server (not suppotred anymore).

The version has been extracted from https://oasis3mct.cerfacs.fr/svn/branches/OASIS3-MCT_2.0_branch/oasis3-mct@1818

File size: 2.5 KB
Line 
1#  This program is under CECILL_B licence. See footer for details.
2
3proc switch_create { args } {
4    set mandatory_arguments { path_father address }
5    initWidget
6   
7    ttk::frame $win -height 30p
8    eval $widgetInfo(packme-$win)
9    smartpacker_setup_label $win $address
10   
11    ttk::checkbutton $win.cb -variable widgetInfo($address-variable) -command [ subst {
12        eval \$widgetInfo($address-check)
13    }]
14 
15   
16    place $win.cb -relx 0.5
17   
18    append widgetInfo($address-refreshStatus) [ subst { switch_refreshStatus $win $address}]
19    finishWidget
20   
21    #always valid
22    set widgetInfo($address-status) 1
23   
24    # clean the widget callBack on dstruction
25    bind $win <Destroy> [ subst {widget_destroy $win $address}]
26
27   
28    return $win
29}
30
31proc switch_refreshStatus {win address} {
32    smartpacker_update_visibility $win $address
33}
34
35
36
37#  Copyright CERFACS 2014
38#   
39#  antoine.dauptain@cerfacs.fr
40#   
41#  This software is a computer program whose purpose is to ensure technology
42#  transfer between academia and industry.
43#   
44#  This software is governed by the CeCILL-B license under French law and
45#  abiding by the rules of distribution of free software.  You can  use,
46#  modify and/ or redistribute the software under the terms of the CeCILL-B
47#  license as circulated by CEA, CNRS and INRIA at the following URL
48#  "http://www.cecill.info".
49#   
50#  As a counterpart to the access to the source code and  rights to copy,
51#  modify and redistribute granted by the license, users are provided only
52#  with a limited warranty  and the software's author,  the holder of the
53#  economic rights,  and the successive licensors  have only  limited
54#  liability.
55#   
56#  In this respect, the user's attention is drawn to the risks associated
57#  with loading,  using,  modifying and/or developing or reproducing the
58#  software by the user in light of its specific status of free software,
59#  that may mean  that it is complicated to manipulate,  and  that  also
60#  therefore means  that it is reserved for developers  and  experienced
61#  professionals having in-depth computer knowledge. Users are therefore
62#  encouraged to load and test the software's suitability as regards their
63#  requirements in conditions enabling the security of their systems and/or
64#  data to be ensured and,  more generally, to use and operate it in the
65#  same conditions as regards security.
66#   
67#  The fact that you are presently reading this means that you have had
68#  knowledge of the CeCILL-B license and that you accept its terms.
Note: See TracBrowser for help on using the repository browser.