home *** CD-ROM | disk | FTP | other *** search
/ Tools / WinSN5.0Ver.iso / NETSCAP.50 / WIN1998.ZIP / ns / cmd / macfe / central / StBlockingDialogHandler.cp < prev    next >
Encoding:
Text File  |  1998-04-08  |  2.7 KB  |  86 lines

  1. /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
  2.  *
  3.  * The contents of this file are subject to the Netscape Public License
  4.  * Version 1.0 (the "NPL"); you may not use this file except in
  5.  * compliance with the NPL.  You may obtain a copy of the NPL at
  6.  * http://www.mozilla.org/NPL/
  7.  *
  8.  * Software distributed under the NPL is distributed on an "AS IS" basis,
  9.  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
  10.  * for the specific language governing rights and limitations under the
  11.  * NPL.
  12.  *
  13.  * The Initial Developer of this code under the NPL is Netscape
  14.  * Communications Corporation.  Portions created by Netscape are
  15.  * Copyright (C) 1998 Netscape Communications Corporation.  All Rights
  16.  * Reserved.
  17.  */
  18.  
  19. //    StBlockingDialogHandler.cp
  20.  
  21. #include "StBlockingDialogHandler.h"
  22.  
  23. #include <Balloons.h>
  24.  
  25. StBlockingDialogHandler::StBlockingDialogHandler(
  26.     ResIDT             inDialogResID,
  27.     LCommander*        inSuper)
  28.     :    StDialogHandler(inDialogResID, inSuper)
  29. {
  30.     // disable the Help menu while a dialog is in front
  31.     // (to prevent loading of Help URLs)
  32.  
  33.     MenuHandle        balloonMenuH = NULL;
  34.     HMGetHelpMenuHandle( &balloonMenuH );
  35.     if (balloonMenuH)
  36.         DisableItem(balloonMenuH, 0);
  37. }
  38.  
  39. // ╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤
  40. //    Ñ    
  41. // ╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤
  42.  
  43. StBlockingDialogHandler::~StBlockingDialogHandler()
  44. {
  45.     MenuHandle        balloonMenuH = NULL;
  46.     HMGetHelpMenuHandle( &balloonMenuH );
  47.     if (balloonMenuH)
  48.         EnableItem(balloonMenuH, 0);
  49. }
  50.  
  51. // ╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤
  52. //    Ñ    
  53. // ╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤
  54.  
  55. Boolean StBlockingDialogHandler::ExecuteAttachments(
  56.     MessageT        inMessage,
  57.     void            *ioParam)
  58. {
  59.     Boolean    executeHost = true;
  60.     
  61.         // Execute the Attachments for the EventDispatcher that was
  62.         // in control before this one took over
  63.     
  64. //    if (mSaveDispatcher != nil) {
  65. //        executeHost = mSaveDispatcher->ExecuteAttachments(inMessage, ioParam);
  66. //    }
  67.     
  68.         // Inherited function will execute Attachments for this object
  69.     
  70.     return (executeHost && LAttachable::ExecuteAttachments(inMessage, ioParam));
  71. }
  72.  
  73. // ╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤
  74. //    Override to prevent About menu item from being enabled.
  75. // ╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤
  76. void
  77. StBlockingDialogHandler::FindCommandStatus(
  78.     CommandT    inCommand,
  79.     Boolean        &outEnabled,
  80.     Boolean&    /* outUsesMark */,
  81.     Char16&        /* outMark */,
  82.     Str255        /* outName */)
  83. {
  84.     outEnabled = false;
  85. }
  86.