Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
nsASEApp Class Reference

#include <nsASEApp.h>

List of all members.

Public Member Functions

 nsASEApp ()
 ~nsASEApp ()
OSErr Run ()

Static Public Member Functions

static void SetCompletionStatus (Boolean aVal)
static Boolean GetCompletionStatus (void)
static void FatalError (short aErrID)
static OSErr GotRequiredParams (AppleEvent *appEvent)

Private Member Functions

void InitManagers (void)
void InitAEHandlers (void)
void MakeMenus (void)

Private Attributes

WindowPtr mWindow
AEEventHandlerUPP mEncodeUPP
AEEventHandlerUPP mDecodeUPP
AEEventHandlerUPP mQuitUPP

Detailed Description

Definition at line 49 of file nsASEApp.h.


Constructor & Destructor Documentation

Definition at line 56 of file nsASEApp.cpp.

{
       InitManagers();
       InitAEHandlers();
       mWindow = NULL;
       SetCompletionStatus(false);
       
       OSErr err = NavLoad();
       if (err!= noErr)
              FatalError(navLoadErr);
              
       MakeMenus();
}

Here is the call graph for this function:

Definition at line 70 of file nsASEApp.cpp.

{
       NavUnload();
}

Member Function Documentation

void nsASEApp::FatalError ( short  aErrID) [static]

Definition at line 299 of file nsASEApp.cpp.

{
       ::StopAlert(aErrID, nil);
       SetCompletionStatus(true);
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 291 of file nsASEApp.cpp.

{
       return gDone;
}
OSErr nsASEApp::GotRequiredParams ( AppleEvent *  appEvent) [static]

Definition at line 244 of file nsASEApp.cpp.

{
       OSErr         err = noErr;
       DescType      returnedType;
       Size          actualSize;

       err = AEGetAttributePtr(appEvent, keyMissedKeywordAttr, typeWildCard,
                                                 &returnedType, NULL, 0, &actualSize);

       if (err == errAEDescNotFound)
              err = noErr;
       else if (err == noErr)
              err = errAEParamMissed;
              
       return err;
}

Here is the caller graph for this function:

Definition at line 221 of file nsASEApp.cpp.

{
       OSErr                              err = noErr;
       
       mEncodeUPP = NewAEEventHandlerProc((ProcPtr) EncodeEvent);
       err = AEInstallEventHandler(kASEncoderEventClass, kAEEncode,
                                                        mEncodeUPP, 0L, false);
       if (err != noErr)
              ::CautionAlert(aeInitErr, nil);
       
       mDecodeUPP = NewAEEventHandlerProc((ProcPtr) DecodeEvent);
       err = AEInstallEventHandler(kASEncoderEventClass, kAEDecode,
                                                        mDecodeUPP, 0L, false);
       if (err != noErr)
              ::CautionAlert(aeInitErr, nil);
              
       mQuitUPP = NewAEEventHandlerProc((ProcPtr) QuitEvent);
       err = AEInstallEventHandler(kCoreEventClass, kAEQuitApplication,
                                                        mQuitUPP, 0L, false);
       if (err != noErr)
              ::CautionAlert(aeInitErr, nil);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void nsASEApp::InitManagers ( void  ) [private]

Definition at line 76 of file nsASEApp.cpp.

{
       MaxApplZone();
       MoreMasters(); MoreMasters(); MoreMasters();
       
       InitGraf(&qd.thePort);
       InitFonts();                
       InitWindows();
       InitMenus();
       TEInit();            
       InitDialogs(NULL);
       
       InitCursor();
       FlushEvents(everyEvent, 0); 
}

Here is the caller graph for this function:

void nsASEApp::MakeMenus ( void  ) [private]

Definition at line 262 of file nsASEApp.cpp.

{
    Handle           mbarHdl;
       MenuHandle    menuHdl;

       mbarHdl = ::GetNewMBar(rMenuBar);
       ::SetMenuBar(mbarHdl);
       
       if ((menuHdl = ::GetMenuHandle(rMenuApple))!=nil) 
       {
              ::AppendResMenu(menuHdl, 'DRVR');
       }
              
       if ((menuHdl = GetMenuHandle(rMenuEdit))!=nil)
              ::DisableItem(menuHdl, 0);
       
       ::HMGetHelpMenuHandle(&menuHdl);
       ::DisableItem(menuHdl, 0);

       ::DrawMenuBar();
}

Here is the caller graph for this function:

OSErr nsASEApp::Run ( void  )

Definition at line 306 of file nsASEApp.cpp.

{
       OSErr         err = noErr;
       EventRecord evt;
       nsEventHandler handler;
       
       while (!gDone)
       {
              if (::WaitNextEvent(everyEvent, &evt, 180, NULL))
              {
                     handler.HandleNextEvent(&evt);
              }
       }
              
       return err;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 285 of file nsASEApp.cpp.

{
       gDone = aVal;
}

Here is the caller graph for this function:


Member Data Documentation

AEEventHandlerUPP nsASEApp::mDecodeUPP [private]

Definition at line 70 of file nsASEApp.h.

AEEventHandlerUPP nsASEApp::mEncodeUPP [private]

Definition at line 69 of file nsASEApp.h.

AEEventHandlerUPP nsASEApp::mQuitUPP [private]

Definition at line 71 of file nsASEApp.h.

WindowPtr nsASEApp::mWindow [private]

Definition at line 68 of file nsASEApp.h.


The documentation for this class was generated from the following files: