author Benoit Jacob <bjacob@mozilla.com>
Fri, 25 Apr 2014 22:34:03 -0400
changeset 180367 3fbf849caa998a92455583c57d2cce3b6705519b
parent 148454 f2fce6c8e493f9ed6510f1d69291bcf3e8477380
child 252626 91d6e262b662a0b4e47358665e222d3927337af9
permissions -rw-r--r--
Bug 989123 - Add EnumeratedArray class to MFBT for plain static arrays indexed by a typed enum - r=Waldo

/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

#ifndef nsMenuUtilsX_h_
#define nsMenuUtilsX_h_

#include "nscore.h"
#include "nsMenuBaseX.h"

#import <Cocoa/Cocoa.h>

class nsIContent;
class nsString;
class nsMenuBarX;

// Namespace containing utility functions used in our native menu implementation.
namespace nsMenuUtilsX
  void          DispatchCommandTo(nsIContent* aTargetContent);
  NSString*     GetTruncatedCocoaLabel(const nsString& itemLabel);
  uint8_t       GeckoModifiersForNodeAttribute(const nsString& modifiersAttribute);
  unsigned int  MacModifiersForGeckoModifiers(uint8_t geckoModifiers);
  nsMenuBarX*   GetHiddenWindowMenuBar(); // returned object is not retained
  NSMenuItem*   GetStandardEditMenuItem(); // returned object is not retained
  bool          NodeIsHiddenOrCollapsed(nsIContent* inContent);
  int           CalculateNativeInsertionPoint(nsMenuObjectX* aParent, nsMenuObjectX* aChild);

#endif // nsMenuUtilsX_h_