Back to index

lightning-sunbird  0.9+nobinonly
ComponentsWin.c
Go to the documentation of this file.
00001 /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
00002 /* ***** BEGIN LICENSE BLOCK *****
00003  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
00004  *
00005  * The contents of this file are subject to the Mozilla Public License Version
00006  * 1.1 (the "License"); you may not use this file except in compliance with
00007  * the License. You may obtain a copy of the License at
00008  * http://www.mozilla.org/MPL/
00009  *
00010  * Software distributed under the License is distributed on an "AS IS" basis,
00011  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
00012  * for the specific language governing rights and limitations under the
00013  * License.
00014  *
00015  * The Original Code is Mozilla Communicator client code, released
00016  * March 31, 1998.
00017  *
00018  * The Initial Developer of the Original Code is
00019  * Netscape Communications Corporation.
00020  * Portions created by the Initial Developer are Copyright (C) 1999
00021  * the Initial Developer. All Rights Reserved.
00022  *
00023  * Contributor(s):
00024  *   Samir Gehani <sgehani@netscape.com>
00025  *
00026  * Alternatively, the contents of this file may be used under the terms of
00027  * either of the GNU General Public License Version 2 or later (the "GPL"),
00028  * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
00029  * in which case the provisions of the GPL or the LGPL are applicable instead
00030  * of those above. If you wish to allow use of your version of this file only
00031  * under the terms of either the GPL or the LGPL, and not to allow others to
00032  * use your version of this file under the terms of the MPL, indicate your
00033  * decision by deleting the provisions above and replace them with the notice
00034  * and other provisions required by the GPL or the LGPL. If you do not delete
00035  * the provisions above, a recipient may use your version of this file under
00036  * the terms of any one of the MPL, the GPL or the LGPL.
00037  *
00038  * ***** END LICENSE BLOCK ***** */
00039 
00040 #include "MacInstallWizard.h"
00041 
00042 
00043 /*-----------------------------------------------------------*
00044  *   Components Window
00045  *-----------------------------------------------------------*/
00046                      
00047 static int rowToComp[kMaxComponents];
00048 static int numRows = 0;                   
00049 static Boolean bFirstDraw = true;
00050 
00051 void 
00052 ShowComponentsWin(void)
00053 {
00054        Str255        next, back;
00055        Str255        compDescTitle;
00056        StringPtr     selCompMsg;
00057        Handle        listBoxRect;
00058        Rect          dataBounds, listBoxFrame, viewRect;
00059        short         reserr;
00060        int                  totalRows = 0, i, instChoice;
00061        Point         cSize;
00062        Boolean              bCellSelected;
00063        GrafPtr              oldPort;
00064        GetPort(&oldPort);
00065               
00066        SetPort(gWPtr);
00067        
00068        gCurrWin = kComponentsID; 
00069        /* gControls->cw = (CompWin *) NewPtrClear(sizeof(CompWin)); */
00070        
00071        GetResourcedString(next, rInstList, sNextBtn);
00072        GetResourcedString(back, rInstList, sBackBtn);
00073 
00074        // get controls
00075        listBoxRect = Get1Resource('RECT', rCompListBox);
00076        reserr = ResError(); 
00077        if (reserr == noErr && listBoxRect != NULL)
00078        {
00079               HLock((Handle)listBoxRect);
00080               SetRect(&gControls->cw->compListBox,      ((Rect*)*listBoxRect)->left,
00081                                                                                     ((Rect*)*listBoxRect)->top,
00082                                                                                     ((Rect*)*listBoxRect)->right,
00083                                                                                     ((Rect*)*listBoxRect)->bottom);
00084               HUnlock((Handle)listBoxRect);
00085        }
00086        else
00087        {
00088               ErrorHandler(reserr, nil);
00089               return;
00090        }
00091        gControls->cw->compDescBox = NULL;
00092        gControls->cw->compDescBox = GetNewControl(rCompDescBox, gWPtr);
00093        if (!gControls->cw->compDescBox)
00094        {
00095               ErrorHandler(eMem, nil);
00096               return;
00097        }
00098 
00099        gControls->cw->compListBox.right -= kScrollBarWidth;
00100        instChoice = gControls->opt->instChoice-1;
00101        for (i=0; i<kMaxComponents; i++)
00102        {
00103               if (totalRows >= gControls->cfg->numComps)
00104                      break;
00105               if (!gControls->cfg->comp[i].invisible && !gControls->cfg->comp[i].additional &&
00106                      (gControls->cfg->st[instChoice].comp[i] == kInSetupType))
00107                      totalRows++;
00108        }
00109     
00110        SetRect(&dataBounds, 0, 0, 1, totalRows);
00111        SetPt( &cSize, 0, 0);
00112        gControls->cw->compList = LNew((const Rect*)&gControls->cw->compListBox, (const Rect*)&dataBounds,
00113                                                                cSize, rCheckboxLDEF, gWPtr, true, false, false, true);
00114        (*gControls->cw->compList)->selFlags = lExtendDrag + lUseSense;
00115     
00116        HLock((Handle)gControls->cw->compDescBox);
00117        SetRect(&viewRect, (*gControls->cw->compDescBox)->contrlRect.left,
00118                                       (*gControls->cw->compDescBox)->contrlRect.top,
00119                                       (*gControls->cw->compDescBox)->contrlRect.right,
00120                                       (*gControls->cw->compDescBox)->contrlRect.bottom);
00121        HUnlock((Handle)gControls->cw->compDescBox);
00122        viewRect.top += kInterWidgetPad;
00123        SetRect(&viewRect, viewRect.left + kTxtRectPad,
00124                                           viewRect.top + kTxtRectPad,
00125                                           viewRect.right - kTxtRectPad,
00126                                           viewRect.bottom - kTxtRectPad);
00127        TextFont(applFont);
00128        TextSize(9);
00129        gControls->cw->compDescTxt = TENew(&viewRect, &viewRect);
00130        TextFont(systemFont);
00131        TextSize(12);
00132        
00133        // populate controls
00134        bCellSelected = PopulateCompInfo();
00135        
00136        // show controls
00137        GetResourcedString(compDescTitle, rInstList, sCompDescTitle);
00138        SetControlTitle(gControls->cw->compDescBox, compDescTitle);
00139        
00140        MoveTo( gControls->cw->compListBox.left, gControls->cw->compListBox.top - kInterWidgetPad);
00141        HLock(gControls->cfg->selCompMsg);
00142        selCompMsg = CToPascal(*gControls->cfg->selCompMsg);
00143        if (selCompMsg)
00144               DrawString( selCompMsg );
00145        HUnlock(gControls->cfg->selCompMsg);
00146        SetRect(&listBoxFrame, gControls->cw->compListBox.left, 
00147                                            --gControls->cw->compListBox.top,
00148                                              gControls->cw->compListBox.right + kScrollBarWidth,
00149                                            ++gControls->cw->compListBox.bottom);
00150        FrameRect(&listBoxFrame);
00151        ShowNavButtons( back, next);
00152        if (bCellSelected)
00153               SetOptInfo(true);
00154        else
00155               DrawDiskSpaceMsgs( gControls->opt->vRefNum );
00156 
00157        // default highlight first row
00158        InitRowHighlight(0);
00159 
00160 #if 0         
00161     RGBColor backColorOld;
00162     Rect adjustedRect, *clRect = &gControls->cw->compListBox;
00163     SetRect(&adjustedRect, clRect->left, clRect->top+1, clRect->right, clRect->bottom-1);
00164     GetBackColor(&backColorOld);
00165     BackColor(whiteColor);
00166     EraseRect(&adjustedRect);
00167     RGBBackColor(&backColorOld);
00168 #endif
00169         
00170        SetPort(oldPort);
00171 }
00172 
00173 Boolean
00174 PopulateCompInfo()
00175 {
00176        int    i;
00177        char   *currDesc;
00178        Point  currCell;
00179        Boolean bCellSelected = false;
00180        int           nextRow = 0;
00181        
00182        for (i=0; i<gControls->cfg->numComps; i++)
00183        {
00184               if (!gControls->cfg->comp[i].invisible && !gControls->cfg->comp[i].additional)
00185               {
00186                      HLock(gControls->cfg->comp[i].shortDesc);
00187                      currDesc = *gControls->cfg->comp[i].shortDesc;
00188                      SetPt(&currCell, 0, nextRow);
00189                      rowToComp[nextRow++] = i;
00190                      LSetCell( currDesc, strlen(currDesc), currCell, gControls->cw->compList);
00191                      HUnlock(gControls->cfg->comp[i].shortDesc);
00192                      if (gControls->cfg->comp[i].selected == true)
00193                      {
00194                             LSetSelect(true, currCell, gControls->cw->compList);
00195                             bCellSelected = true;
00196                      }
00197               }
00198        }
00199 
00200        numRows = nextRow;   
00201        return bCellSelected;
00202 }
00203 
00204 void          
00205 UpdateCompWin(void)
00206 {      
00207        Rect          r;
00208        Cell          c;
00209        int                  i;
00210        GrafPtr              oldPort;
00211        GetPort(&oldPort);
00212        
00213        SetPort(gWPtr);
00214        
00215        MoveTo( gControls->cw->compListBox.left, gControls->cw->compListBox.top - kInterWidgetPad + 1);
00216        HLock(gControls->cfg->selCompMsg);
00217        DrawString( CToPascal(*gControls->cfg->selCompMsg));
00218        HUnlock(gControls->cfg->selCompMsg);
00219        
00220 #if 0
00221        RGBColor backColorOld;
00222     Rect adjustedRect, *clRect = &gControls->cw->compListBox;
00223     SetRect(&adjustedRect, clRect->left, clRect->top+1, clRect->right, clRect->bottom-1);
00224     GetBackColor(&backColorOld);
00225     BackColor(whiteColor);
00226     EraseRect(&adjustedRect);
00227     RGBBackColor(&backColorOld);
00228 #endif
00229     
00230        LUpdate( (*gControls->cw->compList)->port->visRgn, gControls->cw->compList);
00231        SetRect(&r, gControls->cw->compListBox.left, gControls->cw->compListBox.top,
00232                    gControls->cw->compListBox.right + 1, gControls->cw->compListBox.bottom); 
00233        FrameRect(&r);       
00234        
00235        SetPt(&c, 0, 0);
00236        if (LGetSelect(true, &c, gControls->cw->compList))
00237        {
00238               HLock((Handle)gControls->cw->compDescTxt);
00239               SetRect(&r, (*gControls->cw->compDescTxt)->viewRect.left,
00240                                    (*gControls->cw->compDescTxt)->viewRect.top,
00241                                    (*gControls->cw->compDescTxt)->viewRect.right,
00242                                    (*gControls->cw->compDescTxt)->viewRect.bottom);
00243               HUnlock((Handle)gControls->cw->compDescTxt);            
00244        }
00245        
00246        DrawDiskSpaceMsgs( gControls->opt->vRefNum );
00247     
00248        for (i = 0; i < numRows; i++)
00249        {
00250               if (gControls->cfg->comp[rowToComp[i]].highlighted)
00251               {
00252                      InitRowHighlight(i);
00253                      break;
00254               }
00255        }
00256 
00257        SetPort(oldPort);
00258 }
00259 
00260 void 
00261 InComponentsContent(EventRecord* evt, WindowPtr wCurrPtr)
00262 {      
00263        Point                localPt;
00264        Rect                 r, currCellRect, checkbox;
00265        ControlPartCode      part;
00266        int                         i;
00267        Cell                 currCell;
00268        UInt8                hiliteVal;
00269        PixPatHandle  ppH;
00270        GrafPtr                     oldPort;
00271        GetPort(&oldPort);
00272        
00273        SetPort(wCurrPtr);
00274        localPt = evt->where;
00275        GlobalToLocal( &localPt);
00276        
00277        /* Mouse Up */
00278        
00279        /* scroll */
00280        SetRect(&r, gControls->cw->compListBox.right, gControls->cw->compListBox.top, 
00281                    gControls->cw->compListBox.right + kScrollBarWidth, gControls->cw->compListBox.bottom);
00282        if ((evt->what == mouseUp) && (PtInRect( localPt, &r)))
00283        {
00284            LClick(localPt, evt->modifiers, gControls->cw->compList);
00285            
00286            SetRect(&r, gControls->cw->compListBox.left, gControls->cw->compListBox.top,
00287                        gControls->cw->compListBox.right + 1, gControls->cw->compListBox.bottom);
00288            FrameRect(&r);
00289        }
00290        
00291        /* or un/check item */
00292        if ((evt->what == mouseUp) && (PtInRect( localPt, &gControls->cw->compListBox)))
00293        {
00294               LClick(localPt, evt->modifiers, gControls->cw->compList);
00295               UpdateRowHighlight(localPt);
00296               
00297               /* invert the checkbox rect */
00298               for (i=0; i<numRows; i++)
00299               {
00300                      SetPt(&currCell, 0, i);
00301                      LRect(&currCellRect, currCell, gControls->cw->compList);
00302                      if (PtInRect(localPt, &currCellRect))
00303                      {
00304                             SetRect(&checkbox, currCellRect.left+4, currCellRect.top+2, 
00305                                                  currCellRect.left+16, currCellRect.top+14);             
00306                             INVERT_HIGHLIGHT(&checkbox);
00307                             break;
00308                      }
00309               }
00310               
00311               SetOptInfo(false);
00312        }
00313        
00314        /* Mouse Down */
00315        if ((evt->what == mouseDown) && (PtInRect( localPt, &gControls->cw->compListBox)))
00316        {
00317               /* show depressed button state */
00318            for (i=0; i<numRows; i++)
00319               {
00320                      SetPt(&currCell, 0, i);
00321                      LRect(&currCellRect, currCell, gControls->cw->compList);
00322                      if (PtInRect(localPt, &currCellRect))
00323                      {
00324                             SetRect(&checkbox, currCellRect.left+4, currCellRect.top+2, 
00325                                                  currCellRect.left+16, currCellRect.top+14);      
00326                             ppH = GetPixPat(rGrayPixPattern);
00327                             FillCRect(&checkbox, ppH);  
00328                             FrameRect(&checkbox);       
00329                             if (gControls->cfg->comp[rowToComp[i]].selected)
00330                             {
00331                                    /* draw check mark */
00332                                    MoveTo(checkbox.left+1, checkbox.top+1);
00333                                    LineTo(checkbox.right-2, checkbox.bottom-2);
00334                                    MoveTo(checkbox.right-2, checkbox.top+1);
00335                                    LineTo(checkbox.left+1, checkbox.bottom-2); 
00336                             }
00337                             /* create 3D depression */
00338                             
00339                             MoveTo(checkbox.left+1, checkbox.top+1);
00340                             LineTo(checkbox.left+1, checkbox.bottom-1);
00341                             MoveTo(checkbox.left+1, checkbox.top+1);
00342                             LineTo(checkbox.right-1, checkbox.top+1);
00343                             
00344                             ForeColor(whiteColor);
00345                             
00346                             MoveTo(checkbox.right-1, checkbox.top+1);
00347                             LineTo(checkbox.right-1, checkbox.bottom-1);
00348                             MoveTo(checkbox.left+1, checkbox.bottom-1);
00349                             LineTo(checkbox.right-1, checkbox.bottom-1);
00350                             
00351                             ForeColor(blackColor);
00352                      
00353                             if (ppH)
00354                                    DisposePixPat(ppH);
00355                             break;
00356                      }
00357               }
00358        }
00359                      
00360        HLock((Handle)gControls->backB);
00361        r = (**(gControls->backB)).contrlRect;
00362        HUnlock((Handle)gControls->backB);
00363        if (PtInRect( localPt, &r))
00364        {
00365               /* reset all rows to be not highlighted */
00366               for (i=1; i<numRows; i++)
00367                      gControls->cfg->comp[rowToComp[i]].highlighted = false;
00368               
00369               part = TrackControl(gControls->backB, evt->where, NULL);
00370               if (part)
00371               { 
00372                      /* extra handling since we used DrawString for static text msg 
00373                       * and framed our own listbox etc. 
00374                       */
00375                      gControls->cw->compListBox.top = 0;
00376                      EraseRect(&gControls->cw->compListBox);
00377                      ClearDiskSpaceMsgs();
00378                      
00379                      KillControls(gWPtr);
00380                      ShowSetupTypeWin();
00381                      return;
00382               }
00383        }
00384                      
00385        HLock((Handle)gControls->nextB);                 
00386        r = (**(gControls->nextB)).contrlRect;
00387        HUnlock((Handle)gControls->nextB);
00388        if (PtInRect( localPt, &r))
00389        {
00390               /* reset all rows to be not highlighted */
00391               for (i=0; i<numRows; i++)
00392                      gControls->cfg->comp[rowToComp[i]].highlighted = false;
00393                      
00394               part = TrackControl(gControls->nextB, evt->where, NULL);
00395               if (part)
00396               {      
00397                   /* if no additions perform disk space check */
00398             if (!gControls->cfg->bAdditionsExist)
00399             {
00400                 if (!VerifyDiskSpace())
00401                     return;
00402             }
00403                                 
00404                      gControls->cw->compListBox.top = 0;
00405                      EraseRect(&gControls->cw->compListBox);
00406                      ClearDiskSpaceMsgs();
00407                                           
00408                      KillControls(gWPtr);
00409                      if (gControls->cfg->bAdditionsExist)
00410                             ShowAdditionsWin();
00411                      else
00412                             ShowTerminalWin();
00413                      return;
00414               }
00415        }
00416        SetPort(oldPort);
00417 }
00418 
00419 void 
00420 InitRowHighlight(int row)
00421 {
00422        Cell hlCell;
00423        Rect hlCellRect;
00424        UInt8 hiliteVal;
00425        int i = 0;
00426        
00427        /* reset all highlighted markers */
00428        for (i=0; i<numRows; i++)
00429        {
00430               gControls->cfg->comp[rowToComp[i]].highlighted = false;
00431        }
00432        
00433        /* highlight and set marker for row to init */
00434        SetPt(&hlCell, 0, row);
00435        LRect(&hlCellRect, hlCell, gControls->cw->compList);
00436        INVERT_HIGHLIGHT(&hlCellRect);     
00437        UpdateLongDesc(row);
00438        gControls->cfg->comp[rowToComp[row]].highlighted = true; 
00439 }
00440 
00441 void
00442 UpdateRowHighlight(Point localPt)
00443 {
00444        int i, j;
00445        Rect currCellRect, oldCellRect;
00446        Cell currCell, oldCell;
00447        UInt8                hiliteVal;
00448        
00449        for (i=0; i<numRows; i++) 
00450        {
00451               /* note: numComps above includes invisible components */
00452               SetPt(&currCell, 0, i);
00453               LRect(&currCellRect, currCell, gControls->cw->compList);
00454                      
00455               /* mouse move landed over this cell */
00456               if (PtInRect( localPt, &currCellRect ))
00457               {
00458                      if (!gControls->cfg->comp[rowToComp[i]].highlighted)
00459                      {      
00460                             /* highlight this cell */
00461                             INVERT_HIGHLIGHT(&currCellRect);   
00462                             UpdateLongDesc(i);
00463                                    
00464                             /* unhighlight old one */
00465                             for (j=0; j<numRows; j++)
00466                             {
00467                                    if (gControls->cfg->comp[rowToComp[j]].highlighted)
00468                                    {
00469                                           SetPt(&oldCell, 0, j);
00470                                           LRect(&oldCellRect, oldCell, gControls->cw->compList);
00471                                                  
00472                                           INVERT_HIGHLIGHT(&oldCellRect);
00473                                           gControls->cfg->comp[rowToComp[j]].highlighted = false;
00474                                    }
00475                             }
00476                                    
00477                             /* mark this row highlighted to prevent incorrect inversion */
00478                             gControls->cfg->comp[rowToComp[i]].highlighted = true; 
00479                      }
00480               }
00481        }
00482 }
00483 
00484 void
00485 ResolveDependees(int compIdx, int beingSelected)
00486 {
00487        int i;
00488        
00489        // assume we are toggling and update this component's ref count
00490        if (beingSelected == kSelected)
00491               gControls->cfg->comp[compIdx].refcnt = 1;
00492        else
00493               gControls->cfg->comp[compIdx].refcnt = 0;
00494        UpdateRefCount(compIdx, beingSelected);
00495        
00496        // resolve selected value based on updated ref counts
00497        gControls->opt->numCompSelected = 0;
00498        for (i = 0; i < gControls->cfg->numComps; i++)
00499        {
00500               if (gControls->cfg->comp[i].refcnt > 0)
00501               {
00502                      gControls->cfg->comp[i].selected = kSelected;
00503                      gControls->opt->numCompSelected++;
00504               }
00505               else
00506               {
00507                      gControls->cfg->comp[i].refcnt = 0;  // prevent sub-zero
00508                      gControls->cfg->comp[i].selected = kNotSelected;
00509               }
00510        }
00511 }
00512 
00513 void
00514 UpdateRefCount(int compIdx, int beingSelected)
00515 {
00516        int i;
00517        
00518        // loop through all components
00519        for (i = 0; i < gControls->cfg->numComps; i++)
00520        {
00521               // if the curr comp has currently toggled comp in its dep list
00522               if (gControls->cfg->comp[i].dep[compIdx] == kDependeeOn)
00523               {
00524                      if (beingSelected == kSelected)
00525                             gControls->cfg->comp[i].refcnt++;
00526                      else
00527                             gControls->cfg->comp[i].refcnt--;
00528               }
00529        }
00530 }
00531 
00532 short
00533 GetCompRow(int compIdx)
00534 {
00535        short i = kInvalidCompIdx;
00536        
00537        for (i=0; i<numRows; i++)
00538        {
00539               if (rowToComp[i] == compIdx)
00540                      break;
00541        }
00542        
00543        return i;
00544 }
00545 
00546 void
00547 SetOptInfo(Boolean bDrawingWindow)
00548 {
00549        Cell          currCell;
00550        int                  row, beingSelected;
00551        Boolean       setSelected;
00552        
00553        // if we are drawing window *and* doing so for the first time
00554        // we need to go through each cell and resolve its dependees
00555        // only turning them on
00556        /*
00557        if (bDrawingWindow && bFirstDraw)
00558        {
00559               for (row = 0; row < numRows; row++)
00560               {
00561                      SetPt(&currCell, 0, row);
00562                      if (LGetSelect(false, &currCell, gControls->cw->compList))
00563                             ResolveDependees(rowToComp[row], kSelected);
00564               }
00565               
00566               bFirstDraw = false;
00567        }
00568        */
00569        
00570        // else we are responding to a click 
00571        // so we must determine the row clicked and resolve its dependees
00572        // bumping up their ref counts if this row is selected
00573        // and down if this row is unselected
00574        if (!bDrawingWindow)
00575        {
00576               currCell = LLastClick(gControls->cw->compList);
00577               row = currCell.v;
00578               
00579               // toggle from on to off or vice versa
00580               if (gControls->cfg->comp[rowToComp[row]].selected)
00581                      beingSelected = kNotSelected;
00582               else
00583                      beingSelected = kSelected;
00584               ResolveDependees(rowToComp[row], beingSelected); 
00585        }
00586        
00587        // then update the UI
00588        for (row = 0; row < numRows; row++)
00589        {
00590               SetPt(&currCell, 0, row);
00591               if (gControls->cfg->comp[rowToComp[row]].selected == kSelected)
00592                      setSelected = true;
00593               else
00594                      setSelected = false;
00595               LSetSelect(setSelected, currCell, gControls->cw->compList);
00596        }
00597        
00598        ClearDiskSpaceMsgs();
00599        DrawDiskSpaceMsgs( gControls->opt->vRefNum );
00600 }
00601 
00602 void
00603 UpdateLongDesc(int row)
00604 {
00605        Rect          viewRect;
00606        
00607        HLock((Handle)gControls->cw->compDescBox);
00608        SetRect(&viewRect, (*gControls->cw->compDescBox)->contrlRect.left,
00609                                       (*gControls->cw->compDescBox)->contrlRect.top,
00610                                       (*gControls->cw->compDescBox)->contrlRect.right,
00611                                       (*gControls->cw->compDescBox)->contrlRect.bottom);
00612        HUnlock((Handle)gControls->cw->compDescBox);
00613        viewRect.top += kInterWidgetPad;
00614        SetRect(&viewRect, viewRect.left + kTxtRectPad,
00615                                           viewRect.top + kTxtRectPad,
00616                                           viewRect.right - kTxtRectPad,
00617                                           viewRect.bottom - kTxtRectPad);
00618        EraseRect(&viewRect);
00619        
00620        HLock(gControls->cfg->comp[rowToComp[row]].longDesc);
00621        TESetText( *gControls->cfg->comp[rowToComp[row]].longDesc, 
00622                             strlen(*gControls->cfg->comp[rowToComp[row]].longDesc), gControls->cw->compDescTxt);
00623     TEUpdate(&viewRect, gControls->cw->compDescTxt);
00624        HUnlock(gControls->cfg->comp[rowToComp[row]].longDesc);
00625 }
00626 
00627 void
00628 EnableComponentsWin(void)
00629 {      
00630        EnableNavButtons();
00631        
00632        // TO DO
00633 }
00634 
00635 
00636 void
00637 DisableComponentsWin(void)
00638 {
00639        DisableNavButtons();
00640        
00641        // TO DO
00642 }