# welcome.tcl
# Copyright (c) 2003 Digi International Inc., All Rights Reserved
# 
# This software contains proprietary and confidential information of Digi
# International Inc.  By accepting transfer of this copy, Recipient agrees
# to retain this software in confidence, to prevent disclosure to others,
# and to make no use of this software other than that for which it was
# delivered.  This is an unpublished copyrighted work of Digi International
# Inc.  Except as permitted by federal law, 17 USC 117, copying is strictly
# prohibited.
# 
# Restricted Rights Legend
#
# Use, duplication, or disclosure by the Government is subject to
# restrictions set forth in sub-paragraph (c)(1)(ii) of The Rights in
# Technical Data and Computer Software clause at DFARS 252.227-7031 or
# subparagraphs (c)(1) and (2) of the Commercial Computer Software -
# Restricted Rights at 48 CFR 52.227-19, as applicable.
#
# Digi International Inc. 11001 Bren Road East, Minnetonka, MN 55343
#
# ***************************************************************************

namespace eval Welcome {}

proc Welcome::MainGuts {w} {
    variable Tab1st
    set frmMain $w.frmwelcome
    if {![winfo exists $frmMain]} {
        frame $frmMain
        BuildPage $frmMain
        grid $frmMain -row 0 -column 0 -sticky news \
         -padx [expr $::numTitleBoldXPad + $::numBorderWidth] -pady 5
    }
    raise $frmMain
    set ::Tab1st $Tab1st
    bind $::Tab1st <<ShiftTab>> {focus $::btnHelp;break}
}

proc Welcome::BuildPage {w} {
    variable Tab1st
    set numlblWarningPadx 15
    set numlblWarningWidth [expr (2 * $numlblWarningPadx) + 5]
    set numBulletWidth 11
    set numWraplength [expr $::numGutsHeadingWraplength - $numlblWarningWidth - $numBulletWidth]
    set lblHeading $w.lblheading
    ::LabelHeading $lblHeading [mc welcome.body.heading] 
    set lblWarning [label $w.lblwarn -bitmap warning]
    set lblBHeading [label $w.lblbheading -text [mc welcome.body.bheading]]
    set lblBullet1 [label $w.lblbull1 -image bmap]
    set lblBullet2 [label $w.lblbull2 -image bmap]
    set lblTextBullet1 [label $w.lbltbull1 -text [mc welcome.body.bullet1] \
     -wraplength $numWraplength -justify left]
    set lblTextBullet2 [label $w.lbltbull2 -text [mc welcome.body.bullet2] \
     -wraplength $numWraplength -justify left]
    set lblContinue [label $w.lblcont -text [mc guts.tocontinue] -font fontRegularBold]
    grid $lblHeading -row 0 -column 0 -sticky nw -columnspan 3
    grid $lblWarning -row 1 -column 0 -sticky nw -rowspan 3 -padx $numlblWarningPadx -pady 2
    grid $lblBHeading -row 1 -column 1 -sticky nw -columnspan 2
    grid $lblBullet1 -row 2 -column 1 -sticky nw -pady 2
    grid $lblTextBullet1 -row 2 -column 2 -sticky nw
    set numYBPad 2
    set numYPad 6
    grid $lblBullet2 -row 3 -column 1 -sticky nw -pady [expr $numYBPad + $numYPad]
    grid $lblTextBullet2 -row 3 -column 2 -sticky nw -pady $numYPad
    grid $lblContinue -row 4 -column 0 -sticky sw -columnspan 3

    grid rowconfigure $w 0 -weight 1
    grid rowconfigure $w 3 -weight 2
    grid columnconfigure $w 2 -weight 1
    set Tab1st $::btnNext
}
