Diff for /np2/macosx/dialog/dialogutils.cpp between versions 1.3 and 1.4

version 1.3, 2003/11/13 20:00:15 version 1.4, 2004/03/15 05:06:02
Line 8 Line 8
   
 #include        "compiler.h"  #include        "compiler.h"
 #include        "dialogutils.h"  #include        "dialogutils.h"
   #include        "bmpdata.h"
   
 enum {kTabMasterSig = 'ScrT',kTabMasterID = 1000,kTabPaneSig= 'ScTb'};  enum {kTabMasterSig = 'ScrT',kTabMasterID = 1000,kTabPaneSig= 'ScTb'};
   
Line 46  short changeTab(WindowRef window, UInt16 Line 47  short changeTab(WindowRef window, UInt16
     if ( controlValue != pane )      if ( controlValue != pane )
     {      {
         ClearKeyboardFocus(window);          ClearKeyboardFocus(window);
         SetControlVisibility( getControlRefByID(  kTabPaneSig,  kTabMasterID+pane, window), false, true );          SetControlVisibility(getControlRefByID( kTabPaneSig, kTabMasterID+pane, window), false, true );
         SetControlVisibility( getControlRefByID(  kTabPaneSig,  kTabMasterID+controlValue, window), true, true );              SetControlVisibility(getControlRefByID( kTabPaneSig, kTabMasterID+controlValue, window), true, true );    
         Draw1Control( getControlRefByID(kTabMasterSig,kTabMasterID,window) );                     Draw1Control( getControlRefByID(kTabMasterSig,kTabMasterID,window) );           
         return(controlValue);              return(controlValue);    
     }      }
Line 107  UINT32 getFieldValue(ControlRef cRef) Line 108  UINT32 getFieldValue(ControlRef cRef)
     return(strtoul(buffer, &retPtr, 10));      return(strtoul(buffer, &retPtr, 10));
 }  }
   
   void setbmp(BYTE* bmp, PicHandle* pict) {
       OSErr               err;
       ComponentInstance   ci=0;
           ComponentResult         result;
           Handle                          bmphandle;
           UINT                            datasize;
           BMPFILE*                        bmpptr;
          
       err = OpenADefaultComponent(GraphicsImporterComponentType, 'BMPf', &ci);
           if (err == noErr) {
                   bmpptr = (BMPFILE*)bmp;
                   datasize = LOADINTELDWORD(bmpptr->bfSize);
                   PtrToHand(bmp, &bmphandle, datasize);
                   result = GraphicsImportSetDataHandle(ci, bmphandle);
                   if (result == noErr) {
                           Rect    natural;
                           GraphicsImportGetNaturalBounds(ci, &natural);
                           GraphicsImportSetBoundsRect(ci, &natural);
                           GraphicsImportGetAsPicture(ci, pict);
                   }
                   err = CloseComponent(ci);
                   DisposeHandle(bmphandle);
           }
           
   }
   

Removed from v.1.3  
changed lines
  Added in v.1.4


RetroPC.NET-CVS <cvs@retropc.net>