home *** CD-ROM | disk | FTP | other *** search
/ MacWorld 2005 March / Macworld CD March 2005 - Marathon Trilogy.iso / Shareware World / Text Processing / HexEdit Release.sit / HexEdit Release / Project / Source / Menus.h < prev    next >
Encoding:
C/C++ Source or Header  |  2004-10-30  |  2.1 KB  |  70 lines  |  [TEXT/CWIE]

  1. /*
  2.  * The contents of this file are subject to the Mozilla Public
  3.  * License Version 1.1 (the "License"); you may not use this file
  4.  * except in compliance with the License. You may obtain a copy of
  5.  * the License at http://www.mozilla.org/MPL/
  6.  * 
  7.  * Software distributed under the License is distributed on an "AS
  8.  * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
  9.  * implied. See the License for the specific language governing
  10.  * rights and limitations under the License.
  11.  * 
  12.  * The Original Code is Copyright 1993 Jim Bumgardner.
  13.  * 
  14.  * The Initial Developer of the Original Code is Jim Bumgardner
  15.  * Portions created by Lane Roathe (LR) are
  16.  * Copyright (C) Copyright © 1996-2002.
  17.  * All Rights Reserved.
  18.  *
  19.  * Modified: $Date: 2004/09/08 21:54:26 $
  20.  * Revision: $Id: Menus.h,v 1.11 2004/09/08 21:54:26 raving Exp $
  21.  *
  22.  * Contributor(s):
  23.  *        Lane Roathe
  24.  *        Nick Shanks (NS)
  25.  */
  26.  
  27. #include "HexEdit.h"
  28.  
  29. #ifndef _HexEdit_Menus_
  30. #define _HexEdit_Menus_
  31.  
  32. // Menu Resource IDs
  33. #define kMenuBaseID        128
  34. #define kMenuXBaseID    129
  35.  
  36. enum    {kAppleMenu = kMenuBaseID, kFileMenu, kEditMenu, kFindMenu, kOptionsMenu, kColorMenu, kWindowMenu};
  37.  
  38. // Menu Item Numbers
  39. enum    {AM_About=1};
  40.  
  41. enum    {FM_New=1,FM_Open,FM_Close,FM_Sep1,
  42.          FM_OtherFork,FM_CompareFiles,FM_Sep2,    
  43.          FM_Save, FM_SaveAs, FM_Revert,FM_Sep3,
  44.          FM_PageSetup, FM_Print,FM_Sep4,
  45.          FM_Quit};
  46.  
  47. enum     {EM_Undo = 1, EM_Sep1, EM_Cut, EM_Copy,
  48.          EM_Paste, EM_Clear, EM_Sep2, EM_SelectAll};
  49.          
  50. enum    {SM_Find = 1, SM_FindForward, SM_FindBackward, SM_Replace, SM_Sep1, SM_GotoAddress};
  51.  
  52. enum    {OM_HiAscii = 1, OM_DecimalAddr, OM_VertBars, OM_WinSize, OM_Overwrite, OM_NonDestructive, OM_MoveOnlyPaging,
  53.             OM_Unformatted, OM_Sep1, OM_Backups, OM_Sep2, OM_ComparePref};
  54.  
  55. enum    {CM_UseColor = 1, CM_Sep1, CM_FirstColor};
  56.  
  57. // *** Prototypes
  58.  
  59. OSStatus InitMenubar( void );
  60. OSStatus SmartEnableMenuItem( MenuRef menu, short item, short ok );
  61. OSStatus AdjustMenus( void );
  62. short GetColorMenuResID( short menuItem );
  63. short GetWindowMenuItemID( StringPtr title );
  64. OSStatus HandleMenu( long mSelect, short modifiers );
  65.  
  66. #if TARGET_API_MAC_CARBON
  67. void PostPrintingErrors( OSStatus status );    // SEL: 1.7 - carbon printing
  68. #endif
  69.  
  70. #endif