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

📄 01ugl.win32.tcl

📁 zinc60t22.tar.gz:zinc在tornado2.2.x下的补丁
💻 TCL
📖 第 1 页 / 共 5 页
字号:
   if {$uglCurrentPage != -1} {      uglConfigScreenHide $uglCurrentPage 1   }   # Show new screen   set uglCurrentPage [lindex $UglConfigPageList $page]   uglConfigScreenHide $uglCurrentPage 0}###################################################################### uglSetButtonState - change the state of a button on the main#                     configuration window#proc uglSetButtonState {state} {    controlEnable UglConfig.save $state    controlEnable UglConfig.delete $state    controlEnable UglConfig.build $state    controlEnable UglConfig.clean $state}###################################################################### uglInit - call back for starting the WindML config utility#proc uglInit {} {    global env    global uglHome    # Check if dialog already created    if {[controlExists UglConfig.uglFileList] == 1} {       windowShow UglConfig -restore 1       return    }    # Establish the base address of the UGL installation, assume that it is    # installed within the VxWorks directory structure.     regsub -all {\\} $env(WIND_BASE) {/} uglHome        if {![file exists $uglHome\\host\\resource\\ugl\\uglDB.cfg]} {        messageBox "Data Base files not found - Make sure WindML support is installed"        return    }    # make sure the configuration directory is present    file mkdir $uglHome\\target\\h\\ugl\\config\\configTool    beginWaitCursor    # create the configuration dialog    dialogCreate -name UglConfig \                 -init uglConfigPost \                 -modeless -minibox -nocontexthelp \                 -title "UGL  Configuration" \                 -width 300 -height 250}###################################################################### uglConfigPost - set up main dialog window#proc uglConfigPost {} {    global UglConfigControls    global UglConfigPageName    global UglConfigPageList    global UglConfigPageListNoAgfa    global UglConfigPageListWithAgfa    global uglAgfaPresent    global uglConfigChange    global uglConfigModify    global uglArchList    global uglOldArchType    global uglArchType    global uglHome    global uglDBDir    global uglConfigDir    global uglConfigToolDir    global env    global debugFd    # set up location of data files    set uglDBDir $uglHome/host/resource/ugl    set uglConfigDir $uglHome/target/h/ugl/config    set uglConfigToolDir $uglConfigDir/configTool    set debugFd [open $uglConfigToolDir/debug w]    # Build the controls for the window    foreach control $UglConfigControls {        controlCreate UglConfig $control    }    # Read the data base    uglReadUglDB    # clear the config    uglConfigClear    # Set the Browser title    windowTitleSet UglConfig "WindML Configuration"    # Fill in controls    uglSetFileList    controlValuesSet UglConfig.uglArchList $uglArchList    # if agfa present set menu to include Agfa        set tmpFileList [glob -nocomplain $uglHome/target/src/ugl/driver/font/agfa/sys/inc/*.h]    set listLength [llength $tmpFileList]    if {$listLength <= 1} {       set uglAgfaPresent 0    } else {       set uglAgfaPresent 1    }    if {$uglAgfaPresent} {       set UglConfigPageList $UglConfigPageListWithAgfa    } else {       set UglConfigPageList $UglConfigPageListNoAgfa    }    set configPageMenu {}    foreach page $UglConfigPageList {       lappend configPageMenu $UglConfigPageName($page)    }    controlValuesSet UglConfig.uglConfigItem $configPageMenu        # Create individual configuration screens    uglControlInit    # Set the state of the buttons (build, clean, save, etc.)    uglSetButtonState 0    set uglConfigChange  0    set uglConfigModify  1    # set build options as active screen    uglBuildConfigScreen 0    controlSelectionSet UglConfig.uglConfigItem 0    # set configuration    uglFontsConfig    uglAgfaFontsConfig    uglMiscConfig    uglInputConfig    uglGraphicsConfig    uglAudioConfig    endWaitCursor}######################################################################  uglSetConfigItem - launch the graphics definition window#proc uglSetConfigItem {args} {            # get the event    set event [controlEventGet UglConfig.uglConfigItem]    if {$event == "dropdown"} {        return    }    # configuration/processor defined open window    beginWaitCursor    # get the selected item    set configItem [controlSelectionGet UglConfig.uglConfigItem]    # display the new page    uglBuildConfigScreen $configItem        endWaitCursor}###################################################################### uglSelectArch - process a menu pull-down for selection of the#                 processor achitecture#proc uglSelectArch {args} {    global uglLoadNewConfig    global uglArchType    global uglOldArchType    global uglGraphics    global uglConfigInput    global uglConfigChange    set event [controlEventGet UglConfig.uglArchList]    if {$event == "dropdown"} {        return    }    set uglArchType [controlSelectionGet UglConfig.uglArchList -string]    if { [ string compare $uglOldArchType $uglArchType ] == 0} {       return    }    set uglConfigChange 1    uglSetButtonState 1    if {$uglLoadNewConfig == 0} {        set uglGraphics(DEPTH)        "new"        set uglGraphics(RESOLUTION)   "new"        set uglGraphics(REFRESH)      "new"        set uglGraphics(OPTS)         {}          set uglConfigInput(PTR_TYPE)  "new"        set uglConfigInput(KBD_TYPE)  "new"    }    # Update pages    uglInputConfig    uglAudioConfig    uglGraphicsConfig    uglGraphicsDepthSet    uglMiscConfig    set uglOldArchType $uglArchType}###################################################################### uglConfigSelect - process a menu pull-down for selection of the#                   saved configuration of a new configuration#proc uglConfigSelect {args} {    global uglLoadNewConfig    global uglOldArchType    global uglArchType    global uglConfigMisc    global uglBmfConfig    global uglPointerDB    global uglConfigInput    global uglKeyboardDB    global uglGraphics    global uglGraphicsChipDB    global uglBmFontEngineDB    global uglBmFontSelection     global uglAgfaFontEngineDB    global uglAgfaFontSelection     global uglAgfaConfig    global uglConfigAudio    global uglConfigToolDir    global uglConfigChange     global uglConfigModify    # get event    set event [controlEventGet UglConfig.uglFileList]    if {$event == "dropdown"} {       return    }    set configuration [controlSelectionGet UglConfig.uglFileList -string]    if {$event == "editchange"} {        set uglConfigChange 1        if {$uglArchType != ""} {           uglSetButtonState 1        }        return    }    set uglOldArchType   ""    set uglLoadNewConfig 1     # Read in configuration values    if {![file exists $uglConfigToolDir/$configuration.cfg]} {        messageBox "No Such File"        return    }    beginWaitCursor    set fd [open $uglConfigToolDir/$configuration.cfg r]    set line [gets $fd]    set uglGraphics(OPTS) {}    set uglBmFontSelection {}    set bmfCacheSize      ""    set bmfCachePool      ""     set uglAgfaFontSelection {}    set uglAgfaConfig(FONTPATH) ""    set uglAgfaConfig(TYPEPATH) ""    set uglAgfaConfig(FILENAME) ""    set uglAgfaConfig(PLUGINNAME) ""    while {![eof $fd]} {        set index [lsearch $line :]        if {$index >= 0} {            set field [lrange $line 0 [expr $index - 1]]            set arg [lrange $line [expr $index + 1] end]            switch $field {                "ARCHITECTURE"   {set uglArchType                 $arg }                "BUILD_DEBUG"    {set uglConfigMisc(DEBUG_BUILD)  $arg }                "BUILD_UGLO"     {set uglConfigMisc(UGLO_BUILD)   $arg }                "BUILD_UGLE"     {set uglConfigMisc(UGLE_BUILD)   $arg }                "BUILD_TOOL"     {set uglConfigMisc(BUILD_TOOL)   $arg }                "SYS_POOL"       {set uglConfigMisc(VX_POOL)      $arg }                "UGL_POOL"       {set uglConfigMisc(UGL_POOL)     $arg }                "UGL_PSIZE"      {set uglConfigMisc(POOL_SIZE)    $arg }                "PTR_TYPE"       {set uglConfigInput(PTR_TYPE)    $arg }                "PTR_DEVNAME"    {set uglConfigInput(PTR_DEVICE)  $arg }                "KBD_TYPE"       {set uglConfigInput(KBD_TYPE)    $arg }                "KBD_DEVNAME"    {set uglConfigInput(KBD_DEVICE)  $arg }                "KBD_MAP"        {set uglConfigInput(KBD_MAP)     $arg }                "GRAPHICS CHIP"  {set uglGraphics(CHIP)           $arg ; \                                  set uglGraphics(OPTS) {}             }                "GDOPTION"       {lappend uglGraphics(OPTS)       $arg }                "GOUTPUT"        {set uglGraphics(OUTPUT)         $arg }                "GDEPTH"         {set uglGraphics(DEPTH)          $arg }                "GRES"           {set uglGraphics(RESOLUTION)     $arg }                "GREF"           {set uglGraphics(REFRESH)        $arg }                "BMF_FONT"       {lappend uglBmFontSelection      $arg }                "BMF_CSIZE"      {set uglBmfConfig(CACHE_SIZE)    $arg }                "BMF_UNICODE"    {set uglBmfConfig(UNICODE)       $arg }                                 "AF_FONT"        {lappend uglAgfaFontSelection    $arg }                "AF_PATH"        {set uglAgfaConfig(FONTPATH)     $arg }                "AF_TYPEPATH"    {set uglAgfaConfig(TYPEPATH)     $arg }                "AF_FILENAME"    {set uglAgfaConfig(FILENAME)     $arg }                "AF_PLUGINNAME"  {set uglAgfaConfig(PLUGINNAME)   $arg }                "AF_UNICODE"     {set uglAgfaConfig(UNICODE)      $arg }                "AUDIO_TYPE"     {set uglConfigAudio(TYPE)        $arg }                "AUDIO_DEV"      {set uglConfigAudio(DEVNAME)     $arg }                "AUDIO_CHAN"     {set uglConfigAudio(CHANNEL)     $arg }            }        }        set line [gets $fd]    }    close $fd        controlSelectionSet UglConfig.uglArchList -string $uglArchType    # set values for each page    uglMiscConfig    uglInputConfig    uglGraphicsConfig    uglFontsConfig    uglAgfaFontsConfig    uglAudioConfig    set uglConfigChange 0    set uglConfigModify 1    uglSetButtonState 1    set uglLoadNewConfig 0    endWaitCursor}  ###################################################################### uglConfigSave - save a configuration#proc uglConfigSave {} {    global uglConfigList    global uglArchType    global uglPointerDB    global uglKeyboardDB    global uglGraphics

⌨️ 快捷键说明

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