Back to index

lightning-sunbird  0.9+nobinonly
Classes | Functions
UNavServicesDialogs Namespace Reference

Classes

class  LCustomFileDesignator

Functions

pascal void NavCustomEventProc (NavEventCallbackMessage inSelector, NavCBRecPtr ioParams, NavCallBackUserData ioUserData)

Function Documentation

pascal void UNavServicesDialogs::NavCustomEventProc ( NavEventCallbackMessage  inSelector,
NavCBRecPtr  ioParams,
NavCallBackUserData  ioUserData 
)

Definition at line 150 of file UCustomNavServicesDialogs.cpp.

{
  CNavCustomPutFileCallbackData *callbackData = reinterpret_cast<CNavCustomPutFileCallbackData*>(ioUserData);
  OSErr err = noErr;
  
       try                  // Can't throw back through the Toolbox
       {
    switch (inSelector)
    {
      case kNavCBStart:
        if (callbackData)
        {
          err = ::NavCustomControl(ioParams->context, kNavCtlAddControlList, callbackData->GetDITLHandle());
          ThrowIfOSErr_(err);
          
          short firstControlID;
          err = ::NavCustomControl(ioParams->context, kNavCtlGetFirstControlID, &firstControlID);
          ThrowIfOSErr_(err);
          
          callbackData->SetFirstControlID(firstControlID);
          
          callbackData->InitControls(ioParams);
        }
        break;

      case kNavCBCustomize:
        if (callbackData)
        {
          callbackData->NegotiatePanelBounds(ioParams);
        }
        break;
        
      case kNavCBTerminate:
        if (callbackData)
        {
          callbackData->SaveControlValues(ioParams);
        }
        break;  
    
      case kNavCBEvent:
        {
          short itemHit = ioParams->eventData.itemHit;
        
          if (itemHit == eSaveFormatPanelFormatPopupID)
          {
            // process control click?
            break;
          }
                       UModalAlerts::ProcessModalEvent(*(ioParams->eventData.eventDataParms.event));
                     }
        break;
    }
  }
  catch (...)
  {
    Assert_(0); // error
  }  
}

Here is the call graph for this function:

Here is the caller graph for this function: