⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 utilw32.tcl

📁 windml3.0.3
💻 TCL
📖 第 1 页 / 共 5 页
字号:
# nextCallback - go to the next wizard page
#
# This procedure will take Setup to the next wizard page as if next button
# is pushed
#
# SYNOPSIS
# .tS
# nextCallback
# .tE
#
# PARAMETERS: N/A
#
# RETURNS: N/A
#
# ERRORS: N/A
#

proc nextCallback {} {
    global ctrlVals
    global setupVals

    if { $setupVals(cmdMode) != "text" } {
        set guimode 1
    } else {
        set guimode 0
    }

    set retVal 0
    if {"$ctrlVals(currPage)" == ""} {  return $retVal }

    set processRetVal [pageProcess($ctrlVals(currPage))]
    if {$processRetVal == "1"} {

        set currPageIndex [lsearch $ctrlVals(pageList) $ctrlVals(currPage)]

        if {"$currPageIndex" != "-1"} {
            set nextPageIndex [expr $currPageIndex + 1]
            set nextPage [lindex $ctrlVals(pageList) $nextPageIndex]

            if {"$nextPage" != ""} {
                set ctrlVals(currPage) $nextPage

                if { $guimode } {  
                    destroyVolatileFrm

                    if {[info exists ctrlVals(restoredDialog)]} {
                        if {$ctrlVals(restoredDialog) == 0} {
                            restoreOriginalDialog
                        }
                    }
                }

                pageCreate($nextPage)
                set retVal 1

            } else {

                if { $guimode } {

                    # temporary workaround for windowClose exit problem
                    set setupVals(cancel) 1

                    # remove setup.log.abort
                    catch {file delete [destDirGet]/setup.log.abort}

                    applicationExit

                } else {

                   # temporary workaround for exit problem

                   if {[uninstHomeDirGet] != "" && ![info exists setupVals(diskfull)]} {
                       uninstStop [getProdInfo name] [getProdInfo version]
                   }
                   set setupVals(cancel) 1

                   # remove setup.log.abort
                   catch {file delete [destDirGet]/setup.log.abort}

                   return 0              
                }
            }
        } else {
            puts "error: page $ctrlVals(currPage) not found!"
        }

    } elseif {$processRetVal != "0"} {
  
        # calculate the current page based on the return value
 
        set currPageIndex [lsearch $ctrlVals(pageList) $ctrlVals(currPage)]
        set currPageIndex [expr $currPageIndex + $processRetVal]
        set maxVal [llength $ctrlVals(pageList)]

        if {"$currPageIndex" != "-1" && $currPageIndex <= $maxVal} {
            set nextPageIndex $currPageIndex
            set nextPage [lindex $ctrlVals(pageList) $nextPageIndex]

            if {"$nextPage" != ""} {
                set ctrlVals(currPage) $nextPage

                if { $guimode } {  destroyVolatileFrm  }
 
                pageCreate($nextPage)
                set retVal 1

            } else {
                if { $guimode } {  
                    applicationExit  
                } else {  
                    return 0 
                }
            }
        } else {
            puts "error: page $ctrlVals(currPage) not found!"
        }
    }
    return $retVal
}


#############################################################################
#
# restoreOriginalDialog - restore the original dialog size
#
# This procedure will restore the original dialog size
#
# SYNOPSIS
# .tS
# restoreOriginalDialog
# .tE
#
# PARAMETERS: N/A
#
# RETURNS: N/A
#
# ERRORS: N/A
#

proc restoreOriginalDialog {} {
    global ctrlVals
    global env

    set ctrlVals(restoredDialog) 1
    windowShow $ctrlVals(mainWindow) -restore 1
    if {![info exists env(SETUP_USEKDE)]} {
       windowPositionSet $ctrlVals(mainWindow) [expr $ctrlVals(dlg_orig_xpos)] \
                                               [expr $ctrlVals(dlg_orig_ypos)]
    }
    controlHide $ctrlVals(mainWindow).bitmap 0

    # hide the "phony" Next button and restore the original button.
    # See the procedure "resizeBbrdDialog".
    controlHide $ctrlVals(mainWindow).phonynextButt 1
    controlHide $ctrlVals(mainWindow).nextButt 0

    controlPropertySet $ctrlVals(mainWindow).nextButt -defaultbutton 1
    controlSizeSet $ctrlVals(mainWindow).frm2 \
                   [lindex $ctrlVals(dlg_orig_frm2_size) 0] \
                   [lindex $ctrlVals(dlg_orig_frm2_size) 1]
    controlPositionSet $ctrlVals(mainWindow).frm2 \
                   [lindex $ctrlVals(dlg_orig_frm2_pos) 0] \
                   [lindex $ctrlVals(dlg_orig_frm2_pos) 1]
    controlPositionSet $ctrlVals(mainWindow).backButt \
                   [lindex $ctrlVals(dlg_orig_back_pos) 0] \
                   [lindex $ctrlVals(dlg_orig_back_pos) 1]
    controlPositionSet $ctrlVals(mainWindow).nextButt \
                   [lindex $ctrlVals(dlg_orig_next_pos) 0] \
                   [lindex $ctrlVals(dlg_orig_next_pos) 1]
    controlPositionSet $ctrlVals(mainWindow).cancelButt \
                   [lindex $ctrlVals(dlg_orig_cancel_pos) 0] \
                   [lindex $ctrlVals(dlg_orig_cancel_pos) 1]
    if {![info exists env(SETUP_USEKDE)]} {
      windowSizeSet $ctrlVals(mainWindow) [lindex $ctrlVals(dlg_orig_size) 0] \
                                          [lindex $ctrlVals(dlg_orig_size) 1]
    }
}

#############################################################################
#
# fileExistsNewerWarnExit - exit procedure for fileExistsNewerExit dialog box
#
# This procedure is a exit procedure for fileExistsNewerExit dialog box
#
# SYNOPSIS
# .tS
# fileExistsNewerWarnExit
# .tE
#
# PARAMETERS: N/A
#
# RETURNS: N/A
#
# ERRORS: N/A
#

proc fileExistsNewerWarnExit {} {
    global retvalNew

    if {[controlChecked file_exists_newer_warn.overwriteFile]} {
        set retvalNew 0
    }
    if {[controlChecked file_exists_newer_warn.no_overwriteFile]} {
        set retvalNew 1
    }
    if {[controlChecked file_exists_newer_warn.overwriteAll]} {
        set retvalNew 2
    }
    if {[controlChecked file_exists_newer_warn.no_overwriteAny]} {
        set retvalNew 3
    }
}

#############################################################################
#
# fileExistsNewerWarnInit - Init procedure for fileExistsNewerWarn dialog box
#
# This procedure is a init procedure for fileExistsNewerWarn dialog box
#
# SYNOPSIS
# .tS
# fileExistsNewerWarnInit
# .tE
#
# PARAMETERS: N/A
#
# RETURNS: N/A
#
# ERRORS: N/A
#

proc fileExistsNewerWarnInit {} {
    global retvalNew

    set retvalNew 2
    windowExitCallbackSet file_exists_newer_warn fileExistsNewerWarnExit
    controlCheckSet file_exists_newer_warn.overwriteAll 1
    controlFocusSet file_exists_newer_warn.overwriteAll
}

#############################################################################
#
# fileExistsOlderWarnExit - exit procedure for fileExistsOlderExit dialog box
#
# This procedure is a exit procedure for fileExistsOlderExit dialog box
#
# SYNOPSIS
# .tS
# fileExistsOlderWarnExit
# .tE
#
# PARAMETERS: N/A
#
# RETURNS: N/A
#
# ERRORS: N/A
#

proc fileExistsOlderWarnExit {} {
    global retvalOld

    if {[controlChecked file_exists_older_warn.no_overwriteFile]} {
        set retvalOld 0
    }
    if {[controlChecked file_exists_older_warn.overwriteFile]} {
        set retvalOld 1
    }
    if {[controlChecked file_exists_older_warn.overwriteAll]} {
        set retvalOld 2
    }
    if {[controlChecked file_exists_newer_warn.no_overwriteAny]} {
        set retvalNew 3
    }
}

#############################################################################
#
# fileExistsOlderWarnInit - init procedure for fileExistsOlderInit dialog box
#
# This procedure is a init procedure for fileExistsOlderInit dialog box
#
# SYNOPSIS
# .tS
# fileExistsOlderWarnInit
# .tE
#
# PARAMETERS: N/A
#
# RETURNS: N/A
#
# ERRORS: N/A
#

proc fileExistsOlderWarnInit {} {
    global retvalNew

    set retvalNew 2
    windowExitCallbackSet file_exists_older_warn fileExistsOlderWarnExit
    controlCheckSet file_exists_older_warn.overwriteAll 1
    controlFocusSet file_exists_older_warn.overwriteAll
}

#############################################################################
#
# onBaseInstallWarnContinue - callback procedure when continue button is
#                             pushed
#
# This procedure is a callback procedure when continue button is
# pushed and it closes the base_install_warn dialog box
#
# SYNOPSIS
# .tS
# onBaseInstallWarnContinue
# .tE
#
# PARAMETERS: N/A
#
# RETURNS: N/A
#
# ERRORS: N/A
#

proc onBaseInstallWarnContinue {} {
    global returnval

    set returnval 0
    windowClose base_install_warn
}

#############################################################################
#
# onBaseInstallWarnReturn - callback procedure when return button is
#                           pushed
#
# This procedure is a  callback procedure when return button is
# pushed and it closes the base_install_warn dialog box
#
# SYNOPSIS
# .tS
# onBaseInstallWarnReturn
# .tE
#
# PARAMETERS: N/A
#
# RETURNS: N/A
#
# ERRORS: N/A
#

proc onBaseInstallWarnReturn {} {
    global returnval

    set returnval 1
    windowClose base_install_warn
}

#############################################################################
#
# dialog - create a dialog box with buttons and messages based on
#          passed in arguments
#
# This procedure will create a dialog box with buttons and messages based on
# passed in arguments
#
# SYNOPSIS
# .tS
# dialog <dialogType> <title> <message> <args>
# .tE
#
# PARAMETERS:
# dialogType - stop                   -- dialog box with stop button
#              retry_cancel           -- dialog box with retry and cancel
#                                        buttons
#              yes_no                 -- dialog box with yes and no buttons
#              ok_proceed_exit        -- dialog box with ok, proceed and
#                                        exit buttons
#              yes_exit               -- dialog box with yes and exit buttons
#              resume_exit            -- dialog box with resume and
#                                        exit buttons
#              re_ig_cancel           -- dialog box with retry, ignore and
#                                        cancel buttons
#              re_ig_cancel_old       -- dialog box with retry, ignore and
#                                        cancel buttons (old version)
#              base_install_warn      -- dialog box with install and
#                                        "select path" buttons
#              file_exists_older_warn -- dialog box with yes and exit buttons
#              file_exists_newer_warn -- dialog box with ok button
#              ok                     -- dialog box with ok button
#              ok_cancel              -- dialog box with ok and cancel buttons
#              proceed_cancel         -- dialog box with proceed and cancel buttons
#
# title      - title for the dialog box
# message    - message displayed for the dialog box
# args       - XXX not used XXX
#
# RETURNS: 1 if successful
#          0 if failed

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -