Back to index

lightning-sunbird  0.9+nobinonly
Public Types | Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Static Protected Attributes
nsMenuBarX Class Reference

Native Mac MenuBar wrapper. More...

#include <nsMenuBarX.h>

Inheritance diagram for nsMenuBarX:
Inheritance graph
[legend]
Collaboration diagram for nsMenuBarX:
Collaboration graph
[legend]

List of all members.

Public Types

enum  { kAppleMenuID = 1 }
enum  { kAppleMenuID = 1 }

Public Member Functions

 nsMenuBarX ()
virtual ~nsMenuBarX ()
NS_DECL_ISUPPORTS
NS_DECL_NSICHANGEMANAGER
NS_DECL_NSIMENUCOMMANDDISPATCHER
nsEventStatus 
MenuItemSelected (const nsMenuEvent &aMenuEvent)
 Processes a menu item selected event.
nsEventStatus MenuSelected (const nsMenuEvent &aMenuEvent)
 Processes a menu selected event.
nsEventStatus MenuDeselected (const nsMenuEvent &aMenuEvent)
 Processes a menu deselect event.
nsEventStatus MenuConstruct (const nsMenuEvent &aMenuEvent, nsIWidget *aParentWindow, void *menuNode, void *aDocShell)
nsEventStatus MenuDestruct (const nsMenuEvent &aMenuEvent)
nsEventStatus CheckRebuild (PRBool &aMenuEvent)
nsEventStatus SetRebuild (PRBool aMenuEvent)
NS_DECL_NSIDOCUMENTOBSERVER
NS_IMETHOD 
Create (nsIWidget *aParent)
 Creates the MenuBar.
NS_IMETHOD GetParent (nsIWidget *&aParent)
 Get the MenuBar's Parent.
NS_IMETHOD SetParent (nsIWidget *aParent)
 Set the MenuBar's Parent.
NS_IMETHOD AddMenu (nsIMenu *aMenu)
 Adds the Menu.
NS_IMETHOD GetMenuCount (PRUint32 &aCount)
 Returns the number of menus.
NS_IMETHOD GetMenuAt (const PRUint32 aCount, nsIMenu *&aMenu)
 Returns a Menu Item at a specified Index.
NS_IMETHOD InsertMenuAt (const PRUint32 aCount, nsIMenu *&aMenu)
 Inserts a Menu at a specified Index.
NS_IMETHOD RemoveMenu (const PRUint32 aCount)
 Removes an Menu from a specified Index.
NS_IMETHOD RemoveAll ()
 Removes all the Menus.
NS_IMETHOD GetNativeData (void *&aData)
 Gets Native MenuHandle.
NS_IMETHOD Paint ()
 Draw the menubar.
NS_IMETHOD SetNativeData (void *aData)
 Sets Native MenuHandle.
 nsMenuBarX ()
virtual ~nsMenuBarX ()
NS_DECL_ISUPPORTS
NS_DECL_NSICHANGEMANAGER
NS_DECL_NSIMENUCOMMANDDISPATCHER
nsEventStatus 
MenuItemSelected (const nsMenuEvent &aMenuEvent)
 Processes a menu item selected event.
nsEventStatus MenuSelected (const nsMenuEvent &aMenuEvent)
 Processes a menu selected event.
nsEventStatus MenuDeselected (const nsMenuEvent &aMenuEvent)
 Processes a menu deselect event.
nsEventStatus MenuConstruct (const nsMenuEvent &aMenuEvent, nsIWidget *aParentWindow, void *menuNode, void *aDocShell)
nsEventStatus MenuDestruct (const nsMenuEvent &aMenuEvent)
nsEventStatus CheckRebuild (PRBool &aMenuEvent)
nsEventStatus SetRebuild (PRBool aMenuEvent)
NS_DECL_NSIDOCUMENTOBSERVER
NS_IMETHOD 
Create (nsIWidget *aParent)
 Creates the MenuBar.
NS_IMETHOD GetParent (nsIWidget *&aParent)
 Get the MenuBar's Parent.
NS_IMETHOD SetParent (nsIWidget *aParent)
 Set the MenuBar's Parent.
NS_IMETHOD AddMenu (nsIMenu *aMenu)
 Adds the Menu.
NS_IMETHOD GetMenuCount (PRUint32 &aCount)
 Returns the number of menus.
NS_IMETHOD GetMenuAt (const PRUint32 aCount, nsIMenu *&aMenu)
 Returns a Menu Item at a specified Index.
NS_IMETHOD InsertMenuAt (const PRUint32 aCount, nsIMenu *&aMenu)
 Inserts a Menu at a specified Index.
NS_IMETHOD RemoveMenu (const PRUint32 aCount)
 Removes an Menu from a specified Index.
NS_IMETHOD RemoveAll ()
 Removes all the Menus.
NS_IMETHOD GetNativeData (void *&aData)
 Gets Native MenuHandle.
NS_IMETHOD Paint ()
 Draw the menubar.
NS_IMETHOD SetNativeData (void *aData)
 Sets Native MenuHandle.
virtual void BeginUpdate (nsIDocument *aDocument, nsUpdateType aUpdateType)=0
 Notify that a content model update is beginning.
virtual void EndUpdate (nsIDocument *aDocument, nsUpdateType aUpdateType)=0
 Notify that a content model update is finished.
virtual void BeginLoad (nsIDocument *aDocument)=0
 Notify the observer that a document load is beginning.
virtual void EndLoad (nsIDocument *aDocument)=0
 Notify the observer that a document load has finished.
virtual void BeginReflow (nsIDocument *aDocument, nsIPresShell *aShell)=0
 Notify the observer that the document is being reflowed in the given presentation shell.
virtual void EndReflow (nsIDocument *aDocument, nsIPresShell *aShell)=0
 Notify the observer that the document is done being reflowed in the given presentation shell.
virtual void CharacterDataChanged (nsIDocument *aDocument, nsIContent *aContent, PRBool aAppend)=0
 Notification that the content model has changed.
virtual void ContentStatesChanged (nsIDocument *aDocument, nsIContent *aContent1, nsIContent *aContent2, PRInt32 aStateMask)=0
 Notification that the state of a content node has changed.
virtual void AttributeChanged (nsIDocument *aDocument, nsIContent *aContent, PRInt32 aNameSpaceID, nsIAtom *aAttribute, PRInt32 aModType)=0
 Notification that the content model has changed.
virtual void ContentAppended (nsIDocument *aDocument, nsIContent *aContainer, PRInt32 aNewIndexInContainer)=0
 Notifcation that the content model has had data appended to the given content object.
virtual void ContentInserted (nsIDocument *aDocument, nsIContent *aContainer, nsIContent *aChild, PRInt32 aIndexInContainer)=0
 Notification that content has been inserted.
virtual void ContentRemoved (nsIDocument *aDocument, nsIContent *aContainer, nsIContent *aChild, PRInt32 aIndexInContainer)=0
 Content has just been removed.
virtual void StyleSheetAdded (nsIDocument *aDocument, nsIStyleSheet *aStyleSheet, PRBool aDocumentSheet)=0
 A StyleSheet has just been added to the document.
virtual void StyleSheetRemoved (nsIDocument *aDocument, nsIStyleSheet *aStyleSheet, PRBool aDocumentSheet)=0
 A StyleSheet has just been removed from the document.
virtual void StyleSheetApplicableStateChanged (nsIDocument *aDocument, nsIStyleSheet *aStyleSheet, PRBool aApplicable)=0
 A StyleSheet has just changed its applicable state.
virtual void StyleRuleChanged (nsIDocument *aDocument, nsIStyleSheet *aStyleSheet, nsIStyleRule *aOldStyleRule, nsIStyleRule *aNewStyleRule)=0
 A StyleRule has just been modified within a style sheet.
virtual void StyleRuleAdded (nsIDocument *aDocument, nsIStyleSheet *aStyleSheet, nsIStyleRule *aStyleRule)=0
 A StyleRule has just been added to a style sheet.
virtual void StyleRuleRemoved (nsIDocument *aDocument, nsIStyleSheet *aStyleSheet, nsIStyleRule *aStyleRule)=0
 A StyleRule has just been removed from a style sheet.
virtual void DocumentWillBeDestroyed (nsIDocument *aDocument)=0
 The document is in the process of being destroyed.
void Register (in nsIContent aContent, in nsIChangeObserver aMenuObject)
void Register (in nsIContent aContent, in nsIChangeObserver aMenuObject)
void Unregister (in nsIContent aContent)
void Unregister (in nsIContent aContent)
nsIChangeObserver Lookup (in nsIContent aContent)
nsIChangeObserver Lookup (in nsIContent aContent)
unsigned long Register (in nsIMenuItem aItem)
void Unregister (in unsigned long aCommandID)

Protected Member Functions

void GetDocument (nsIDocShell *inDocShell, nsIDocument **outDocument)
void RegisterAsDocumentObserver (nsIDocShell *inDocShell)
void AquifyMenuBar ()
void HideItem (nsIDOMDocument *inDoc, const nsAString &inID, nsIContent **outHiddenNode)
OSStatus InstallCommandEventHandler ()
nsEventStatus ExecuteCommand (nsIContent *inDispatchTo)
nsresult CreateAppleMenu (nsIMenu *inMenu)
void GetDocument (nsIDocShell *inDocShell, nsIDocument **outDocument)
void RegisterAsDocumentObserver (nsIDocShell *inDocShell)
void AquifyMenuBar ()
void HideItem (nsIDOMDocument *inDoc, const nsAString &inID, nsIContent **outHiddenNode)
OSStatus InstallCommandEventHandler ()
nsEventStatus ExecuteCommand (nsIContent *inDispatchTo)
nsresult CreateAppleMenu (nsIMenu *inMenu)

Static Protected Member Functions

static pascal OSStatus CommandEventHandler (EventHandlerCallRef inHandlerChain, EventRef inEvent, void *userData)
static pascal OSStatus CommandEventHandler (EventHandlerCallRef inHandlerChain, EventRef inEvent, void *userData)

Protected Attributes

nsHashtable mObserverTable
nsHashtable mCommandMapTable
PRUint32 mCurrentCommandID
PRUint32 mNumMenus
nsSupportsArray mMenusArray
nsCOMPtr< nsIContentmMenuBarContent
nsCOMPtr< nsIContentmPrefItemContent
nsCOMPtr< nsIContentmQuitItemContent
nsIWidgetmParent
PRBool mIsMenuBarAdded
nsWeakPtr mDocShellWeakRef
nsIDocumentmDocument
MenuRef mRootMenu

Static Protected Attributes

static MenuRef sAppleMenu
static EventHandlerUPP sCommandEventHandler

Detailed Description

Native Mac MenuBar wrapper.

Definition at line 75 of file nsMenuBarX.h.


Member Enumeration Documentation

anonymous enum
Enumerator:
kAppleMenuID 

Definition at line 86 of file nsMenuBarX.h.

{ kAppleMenuID = 1 } ;
anonymous enum
Enumerator:
kAppleMenuID 

Definition at line 88 of file nsMenuBarX.h.

{ kAppleMenuID = 1 } ;

Constructor & Destructor Documentation

Definition at line 85 of file nsMenuBarX.cpp.

  : mCurrentCommandID(1),
    mNumMenus(0),
    mParent(nsnull),
    mIsMenuBarAdded(PR_FALSE),
    mDocument(nsnull)
{
  OSStatus status = ::CreateNewMenu(0, 0, &mRootMenu);
  NS_ASSERTION(status == noErr, "nsMenuBarX::nsMenuBarX:  creation of root menu failed.");
  
  // create our global carbon event command handler shared by all windows
  if ( !sCommandEventHandler )
    sCommandEventHandler = ::NewEventHandlerUPP(CommandEventHandler);
}

Here is the call graph for this function:

nsMenuBarX::~nsMenuBarX ( ) [virtual]

Definition at line 103 of file nsMenuBarX.cpp.

{
  mMenusArray.Clear();    // release all menus

  // make sure we unregister ourselves as a document observer
  if ( mDocument ) {
    nsCOMPtr<nsIDocumentObserver> observer ( do_QueryInterface(NS_STATIC_CAST(nsIMenuBar*,this)) );
    mDocument->RemoveObserver(observer);
  }

  if ( mRootMenu )
    ::ReleaseMenu(mRootMenu);
}

Here is the call graph for this function:

virtual nsMenuBarX::~nsMenuBarX ( ) [virtual]

Member Function Documentation

NS_METHOD nsMenuBarX::AddMenu ( nsIMenu aMenu) [virtual]

Adds the Menu.

 

Implements nsIMenuBar.

Definition at line 545 of file nsMenuBarX.cpp.

{
  // keep track of all added menus.
  mMenusArray.AppendElement(aMenu);    // owner

  if (mNumMenus == 0) {
    // if apple menu hasn't been created, create it.
    if ( !sAppleMenu ) {
      nsresult rv = CreateAppleMenu(aMenu);
      NS_ASSERTION ( NS_SUCCEEDED(rv), "Can't create Apple menu" );
    }
    
    // add shared Apple menu to our menubar
    if ( sAppleMenu ) {
      // InsertMenuItem() is 1-based, so the apple/application menu needs to
      // be at index 1. |mNumMenus| will be incremented below, so the following menu (File)
      // won't overwrite the apple menu by reusing the ID.
      mNumMenus = 1;
      ::InsertMenuItem(mRootMenu, "\pA", mNumMenus);
      ::SetMenuItemHierarchicalMenu(mRootMenu, 1, sAppleMenu);
    }
  }

  MenuRef menuRef = nsnull;
  aMenu->GetNativeData((void**)&menuRef);

  nsCOMPtr<nsIContent> menu;
  aMenu->GetMenuContent(getter_AddRefs(menu));
  nsAutoString menuHidden;
  menu->GetAttr(kNameSpaceID_None, nsWidgetAtoms::hidden, menuHidden);
  if (!menuHidden.EqualsLiteral("true")) {
    // make sure we only increment |mNumMenus| if the menu is visible, since
    // we use it as an index of where to insert the next menu.
    mNumMenus++;
    
    ::InsertMenuItem(mRootMenu, "\pPlaceholder", mNumMenus);
    OSStatus status = ::SetMenuItemHierarchicalMenu(mRootMenu, mNumMenus, menuRef);
    NS_ASSERTION(status == noErr, "nsMenuBarX::AddMenu: SetMenuItemHierarchicalMenu failed.");
  }

  return NS_OK;
}

Here is the call graph for this function:

Here is the caller graph for this function:

NS_IMETHOD nsMenuBarX::AddMenu ( nsIMenu aMenu) [virtual]

Adds the Menu.

 

Implements nsIMenuBar.

Definition at line 252 of file nsMenuBarX.cpp.

{
  nsCOMPtr<nsIDOMDocument> domDoc ( do_QueryInterface(mMenuBarContent->GetDocument()) );
  if ( domDoc ) {
    // remove quit item and its separator
    HideItem ( domDoc, NS_LITERAL_STRING("menu_FileQuitSeparator"), nsnull );
    HideItem ( domDoc, NS_LITERAL_STRING("menu_FileQuitItem"), getter_AddRefs(mQuitItemContent) );
  
    // remove prefs item and its separator, but save off the pref content node
    // so we can invoke its command later.
    HideItem ( domDoc, NS_LITERAL_STRING("menu_PrefsSeparator"), nsnull );
    HideItem ( domDoc, NS_LITERAL_STRING("menu_preferences"), getter_AddRefs(mPrefItemContent) );
  }
      
} // AquifyMenuBar

Here is the call graph for this function:

Here is the caller graph for this function:

virtual void nsIDocumentObserver::AttributeChanged ( nsIDocument aDocument,
nsIContent aContent,
PRInt32  aNameSpaceID,
nsIAtom aAttribute,
PRInt32  aModType 
) [pure virtual, inherited]

Notification that the content model has changed.

This method is called automatically by content objects when an attribute's value has changed (therefore there is normally no need to invoke this method directly). The notification is passed to any IDocumentObservers document observers.

Parameters:
aDocumentThe document being observed
aContentthe piece of content whose attribute changed
aAttributethe atom name of the attribute
aModTypeWhether or not the attribute was added, changed, or removed. The constants are defined in nsIDOMMutationEvent.h.

Implemented in PresShell, nsContentList, nsXULContentBuilder, nsXULTemplateBuilder, nsImageMap, nsTreeContentView, and nsXMLPrettyPrinter.

virtual void nsIDocumentObserver::BeginLoad ( nsIDocument aDocument) [pure virtual, inherited]

Notify the observer that a document load is beginning.

Implemented in PresShell.

virtual void nsIDocumentObserver::BeginReflow ( nsIDocument aDocument,
nsIPresShell aShell 
) [pure virtual, inherited]

Notify the observer that the document is being reflowed in the given presentation shell.

virtual void nsIDocumentObserver::BeginUpdate ( nsIDocument aDocument,
nsUpdateType  aUpdateType 
) [pure virtual, inherited]

Notify that a content model update is beginning.

This call can be nested.

Implemented in nsFragmentObserver, PresShell, HTMLContentSink, and nsXMLPrettyPrinter.

virtual void nsIDocumentObserver::CharacterDataChanged ( nsIDocument aDocument,
nsIContent aContent,
PRBool  aAppend 
) [pure virtual, inherited]

Notification that the content model has changed.

This method is called automatically by content objects when their state is changed (therefore there is normally no need to invoke this method directly). The notification is passed to any IDocumentObservers. The notification is passed on to all of the document observers.

This notification is not sent when a piece of content is added/removed from the document (the other notifications are used for that).

Parameters:
aDocumentThe document being observed
aContentthe piece of content that changed
aAppendWhether the change was an append

Implemented in PresShell.

nsEventStatus nsMenuBarX::CheckRebuild ( PRBool aMenuEvent) [virtual]

Implements nsIMenuListener.

Definition at line 191 of file nsMenuBarX.cpp.

{
  aNeedsRebuild = PR_TRUE;
  return nsEventStatus_eIgnore;
}
nsEventStatus nsMenuBarX::CheckRebuild ( PRBool aMenuEvent) [virtual]

Implements nsIMenuListener.

pascal OSStatus nsMenuBarX::CommandEventHandler ( EventHandlerCallRef  inHandlerChain,
EventRef  inEvent,
void userData 
) [static, protected]

Definition at line 301 of file nsMenuBarX.cpp.

{
  OSStatus handled = eventNotHandledErr;

  HICommand command;
  OSErr err1 = ::GetEventParameter ( inEvent, kEventParamDirectObject, typeHICommand,
                                        NULL, sizeof(HICommand), NULL, &command );  
  if ( err1 )
    return handled;
    
  nsMenuBarX* self = NS_REINTERPRET_CAST(nsMenuBarX*, userData);
  switch ( ::GetEventKind(inEvent) ) {
    // user selected a menu item. See if it's one we handle.
    case kEventCommandProcess:
    {
      switch ( command.commandID ) {
        case kHICommandPreferences:
        {
          nsEventStatus status = self->ExecuteCommand(self->mPrefItemContent);
          if ( status == nsEventStatus_eConsumeNoDefault )    // event handled, no other processing
            handled = noErr;
          break;
        }
        
        case kHICommandQuit:
        {
          nsEventStatus status = self->ExecuteCommand(self->mQuitItemContent);
          if ( status == nsEventStatus_eConsumeNoDefault )    // event handled, no other processing
            handled = noErr;
          break;
        }
        
        case kHICommandAbout:
        {
          // the 'about' command is special because we don't have a nsIMenu or nsIMenuItem
          // for the apple menu. Grovel for the content node with an id of "aboutName" 
          // and call it directly.
          nsCOMPtr<nsIDOMDocument> domDoc = do_QueryInterface(self->mDocument);
               if ( domDoc ) {
           nsCOMPtr<nsIDOMElement> domElement;
           domDoc->GetElementById(NS_LITERAL_STRING("aboutName"), getter_AddRefs(domElement));
           nsCOMPtr<nsIContent> aboutContent ( do_QueryInterface(domElement) );
           self->ExecuteCommand(aboutContent);
          }
          handled = noErr;
          break;
        }

        default:
        {
          // given the commandID, look it up in our hashtable and dispatch to
          // that content node. Recall that we store weak pointers to the content
          // nodes in the hash table.
          nsPRUint32Key key ( command.commandID );
          nsIMenuItem* content = NS_REINTERPRET_CAST(nsIMenuItem*, self->mObserverTable.Get(&key));
          if ( content )
            content->DoCommand();
          handled = noErr;          
          break; 
        }        

      } // switch on commandID
      break;
    }
    
    // enable/disable menu id's
    case kEventCommandUpdateStatus:
    {
      // only enable the preferences item in the app menu if we found a pref
      // item DOM node in this menubar.
      if ( command.commandID == kHICommandPreferences ) {
        if ( self->mPrefItemContent )
          ::EnableMenuCommand ( nsnull, kHICommandPreferences );
        else
          ::DisableMenuCommand ( nsnull, kHICommandPreferences );
        handled = noErr;
      }
      break;
    }
  } // switch on event type
  
  return handled;
  
} // CommandEventHandler

Here is the call graph for this function:

static pascal OSStatus nsMenuBarX::CommandEventHandler ( EventHandlerCallRef  inHandlerChain,
EventRef  inEvent,
void userData 
) [static, protected]
virtual void nsIDocumentObserver::ContentAppended ( nsIDocument aDocument,
nsIContent aContainer,
PRInt32  aNewIndexInContainer 
) [pure virtual, inherited]

Notifcation that the content model has had data appended to the given content object.

This method is called automatically by the content container objects when a new content object is appended to the container (therefore there is normally no need to invoke this method directly). The notification is passed on to all of the document observers.

Parameters:
aDocumentThe document being observed
aContainerthe container that had a new child appended
aNewIndexInContainerthe index in the container of the first new child

Implemented in PresShell, nsContentList, nsBindingManager, nsImageMap, nsTreeContentView, and nsXMLPrettyPrinter.

virtual void nsIDocumentObserver::ContentInserted ( nsIDocument aDocument,
nsIContent aContainer,
nsIContent aChild,
PRInt32  aIndexInContainer 
) [pure virtual, inherited]

Notification that content has been inserted.

This method is called automatically by the content container objects when a new content object is inserted in the container (therefore there is normally no need to invoke this method directly). The notification is passed on to all of the document observers.

Parameters:
aDocumentThe document being observed
aContainerthe container that now contains aChild
aChildthe child that was inserted
aIndexInContainerthe index of the child in the container

Implemented in PresShell, nsContentList, nsBindingManager, nsImageMap, nsTreeContentView, and nsXMLPrettyPrinter.

virtual void nsIDocumentObserver::ContentRemoved ( nsIDocument aDocument,
nsIContent aContainer,
nsIContent aChild,
PRInt32  aIndexInContainer 
) [pure virtual, inherited]

Content has just been removed.

This method is called automatically by content container objects when a content object has just been removed from the container (therefore there is normally no need to invoke this method directly). The notification is passed on to all of the document observers.

Parameters:
aDocumentThe document being observed
aContainerthe container that had a child removed
aChildthe child that was just removed
aIndexInContainerthe index of the child in the container before it was removed

Implemented in PresShell, nsContentList, nsBindingManager, nsImageMap, nsTreeContentView, and nsXMLPrettyPrinter.

virtual void nsIDocumentObserver::ContentStatesChanged ( nsIDocument aDocument,
nsIContent aContent1,
nsIContent aContent2,
PRInt32  aStateMask 
) [pure virtual, inherited]

Notification that the state of a content node has changed.

(ie: gained or lost focus, became active or hovered over) This method is called automatically by content objects when their state is changed (therefore there is normally no need to invoke this method directly). The notification is passed to any IDocumentObservers. The notification is passed on to all of the document observers.

This notification is not sent when a piece of content is added/removed from the document or the content itself changed (the other notifications are used for that).

The optional second content node is to allow optimization of the case where state moves from one node to another (as is likely for :focus and :hover)

Either content node may be nsnull, but not both

Parameters:
aDocumentThe document being observed
aContent1the piece of content that changed
aContent2optional second piece of content that changed

Implemented in PresShell, and nsTreeContentView.

NS_METHOD nsMenuBarX::Create ( nsIWidget aParent) [virtual]

Creates the MenuBar.

 

Implements nsIMenuBar.

Definition at line 523 of file nsMenuBarX.cpp.

{
  SetParent(aParent);
  return NS_OK;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Creates the MenuBar.

 

Implements nsIMenuBar.

nsresult nsMenuBarX::CreateAppleMenu ( nsIMenu inMenu) [protected]

Definition at line 595 of file nsMenuBarX.cpp.

{
  Str32 menuStr = { 1, kMenuAppleLogoFilledGlyph };
  OSStatus s = ::CreateNewMenu(kAppleMenuID, 0, &sAppleMenu);

  if ( s == noErr && sAppleMenu )  {
    ::SetMenuTitle(sAppleMenu, menuStr);
    
    // this code reads the "label" attribute from the <menuitem/> with
    // id="aboutName" and puts its label in the Apple Menu
    nsAutoString label;
    nsCOMPtr<nsIContent> menu;
    inMenu->GetMenuContent(getter_AddRefs(menu));
    if (menu) {
      nsCOMPtr<nsIDocument> doc = menu->GetDocument();
      if (doc) {
        nsCOMPtr<nsIDOMDocument> domdoc ( do_QueryInterface(doc) );
        if ( domdoc ) {
          nsCOMPtr<nsIDOMElement> aboutMenuItem;
          domdoc->GetElementById(NS_LITERAL_STRING("aboutName"), getter_AddRefs(aboutMenuItem));
          if (aboutMenuItem)
            aboutMenuItem->GetAttribute(NS_LITERAL_STRING("label"), label);
        }
      }
    }

    CFStringRef labelRef = ::CFStringCreateWithCharacters(kCFAllocatorDefault, (UniChar*)label.get(), label.Length());
    if ( labelRef ) {
      ::InsertMenuItemTextWithCFString(sAppleMenu, labelRef, 1, 0, 0);
      ::CFRelease(labelRef);
    }
    
    ::SetMenuItemCommandID(sAppleMenu, 1, kHICommandAbout);

    ::AppendMenu(sAppleMenu, "\p-");
  }

  return (s == noErr && sAppleMenu) ? NS_OK : NS_ERROR_FAILURE;
}

Here is the call graph for this function:

Here is the caller graph for this function:

nsresult nsMenuBarX::CreateAppleMenu ( nsIMenu inMenu) [protected]
virtual void nsIDocumentObserver::DocumentWillBeDestroyed ( nsIDocument aDocument) [pure virtual, inherited]

The document is in the process of being destroyed.

This method is called automatically during document destruction.

Parameters:
aDocumentThe document being observed

Implemented in nsFragmentObserver, nsDOMStyleSheetList, nsContentList, nsBindingManager, nsXULContentBuilder, nsXULTreeBuilder, nsXULTemplateBuilder, nsTreeContentView, and nsXMLPrettyPrinter.

virtual void nsIDocumentObserver::EndLoad ( nsIDocument aDocument) [pure virtual, inherited]

Notify the observer that a document load has finished.

Note that the associated reflow of the document will be done before EndLoad is invoked, not after.

Implemented in PresShell.

virtual void nsIDocumentObserver::EndReflow ( nsIDocument aDocument,
nsIPresShell aShell 
) [pure virtual, inherited]

Notify the observer that the document is done being reflowed in the given presentation shell.

virtual void nsIDocumentObserver::EndUpdate ( nsIDocument aDocument,
nsUpdateType  aUpdateType 
) [pure virtual, inherited]

Notify that a content model update is finished.

This call can be nested.

Implemented in PresShell, HTMLContentSink, and nsXMLPrettyPrinter.

nsEventStatus nsMenuBarX::ExecuteCommand ( nsIContent inDispatchTo) [protected]

Definition at line 394 of file nsMenuBarX.cpp.

{
  nsEventStatus status = nsEventStatus_eIgnore;
  if ( inDispatchTo ) {
    nsCOMPtr<nsIDocShell> docShell = do_QueryReferent(mDocShellWeakRef);
    if (!docShell)
      return nsEventStatus_eConsumeNoDefault;
    nsCOMPtr<nsPresContext> presContext;
    MenuHelpersX::DocShellToPresContext(docShell, getter_AddRefs(presContext));

    nsXULCommandEvent event(PR_TRUE, NS_XUL_COMMAND, nsnull);

    inDispatchTo->HandleDOMEvent(presContext, &event, nsnull, NS_EVENT_FLAG_INIT, &status);
       }
       
       return status;
} // ExecuteCommand

Here is the call graph for this function:

nsEventStatus nsMenuBarX::ExecuteCommand ( nsIContent inDispatchTo) [protected]
void nsMenuBarX::GetDocument ( nsIDocShell inDocShell,
nsIDocument **  outDocument 
) [protected]

Definition at line 204 of file nsMenuBarX.cpp.

{
  *outDocument = nsnull;
  
  if ( inDocShell ) {
    nsCOMPtr<nsIContentViewer> cv;
    inDocShell->GetContentViewer(getter_AddRefs(cv));
    if (cv) {
      // get the document
      nsCOMPtr<nsIDocumentViewer> docv(do_QueryInterface(cv));
      if (!docv)
        return;
      docv->GetDocument(outDocument);    // addrefs
    }
  }
}

Here is the call graph for this function:

Here is the caller graph for this function:

void nsMenuBarX::GetDocument ( nsIDocShell inDocShell,
nsIDocument **  outDocument 
) [protected]
NS_METHOD nsMenuBarX::GetMenuAt ( const PRUint32  aCount,
nsIMenu *&  aMenu 
) [virtual]

Returns a Menu Item at a specified Index.

 

Implements nsIMenuBar.

Definition at line 644 of file nsMenuBarX.cpp.

{ 
  aMenu = NULL;
  nsCOMPtr<nsISupports> supports = getter_AddRefs(mMenusArray.ElementAt(aCount));
  if (!supports) return NS_OK;
  
  return CallQueryInterface(supports, &aMenu); // addref
}

Here is the call graph for this function:

NS_IMETHOD nsMenuBarX::GetMenuAt ( const PRUint32  aCount,
nsIMenu *&  aMenu 
) [virtual]

Returns a Menu Item at a specified Index.

 

Implements nsIMenuBar.

NS_METHOD nsMenuBarX::GetMenuCount ( PRUint32 aCount) [virtual]

Returns the number of menus.

 

Implements nsIMenuBar.

Definition at line 637 of file nsMenuBarX.cpp.

{
  aCount = mNumMenus;
  return NS_OK;
}
NS_IMETHOD nsMenuBarX::GetMenuCount ( PRUint32 aCount) [virtual]

Returns the number of menus.

 

Implements nsIMenuBar.

NS_METHOD nsMenuBarX::GetNativeData ( void *&  aData) [virtual]

Gets Native MenuHandle.

 

Implements nsIMenuBar.

Definition at line 677 of file nsMenuBarX.cpp.

{
    aData = (void *) mRootMenu;
    return NS_OK;
}
NS_IMETHOD nsMenuBarX::GetNativeData ( void *&  aData) [virtual]

Gets Native MenuHandle.

 

Implements nsIMenuBar.

NS_METHOD nsMenuBarX::GetParent ( nsIWidget *&  aParent) [virtual]

Get the MenuBar's Parent.

 

Implements nsIMenuBar.

Definition at line 530 of file nsMenuBarX.cpp.

{
  NS_IF_ADDREF(aParent = mParent);
  return NS_OK;
}
NS_IMETHOD nsMenuBarX::GetParent ( nsIWidget *&  aParent) [virtual]

Get the MenuBar's Parent.

 

Implements nsIMenuBar.

void nsMenuBarX::HideItem ( nsIDOMDocument inDoc,
const nsAString &  inID,
nsIContent **  outHiddenNode 
) [protected]

Definition at line 421 of file nsMenuBarX.cpp.

{
  nsCOMPtr<nsIDOMElement> menuItem;
  inDoc->GetElementById(inID, getter_AddRefs(menuItem));  
  nsCOMPtr<nsIContent> menuContent ( do_QueryInterface(menuItem) );
  if ( menuContent ) {
    menuContent->SetAttr ( kNameSpaceID_None, nsWidgetAtoms::hidden, NS_LITERAL_STRING("true"), PR_FALSE );
    if ( outHiddenNode ) {
      *outHiddenNode = menuContent.get();
      NS_IF_ADDREF(*outHiddenNode);
    }
  }

} // HideItem

Here is the call graph for this function:

Here is the caller graph for this function:

void nsMenuBarX::HideItem ( nsIDOMDocument inDoc,
const nsAString &  inID,
nsIContent **  outHiddenNode 
) [protected]
NS_METHOD nsMenuBarX::InsertMenuAt ( const PRUint32  aCount,
nsIMenu *&  aMenu 
) [virtual]

Inserts a Menu at a specified Index.

 

Implements nsIMenuBar.

Definition at line 654 of file nsMenuBarX.cpp.

{
  return NS_OK;
}
NS_IMETHOD nsMenuBarX::InsertMenuAt ( const PRUint32  aCount,
nsIMenu *&  aMenu 
) [virtual]

Inserts a Menu at a specified Index.

 

Implements nsIMenuBar.

Definition at line 277 of file nsMenuBarX.cpp.

{
  OSStatus err = noErr;
  
  WindowRef myWindow = NS_REINTERPRET_CAST(WindowRef, mParent->GetNativeData(NS_NATIVE_DISPLAY));
  NS_ASSERTION ( myWindow, "Can't get WindowRef to install command handler!" );
  if ( myWindow && sCommandEventHandler ) {
    const EventTypeSpec commandEventList[] = { {kEventClassCommand, kEventCommandProcess},
                                               {kEventClassCommand, kEventCommandUpdateStatus} };
    err = ::InstallWindowEventHandler ( myWindow, sCommandEventHandler, 2, commandEventList, this, NULL );
    NS_ASSERTION ( err == noErr, "Uh oh, command handler not installed" );
  }

  return err;
  
} // InstallCommandEventHandler

Here is the call graph for this function:

Here is the caller graph for this function:

nsEventStatus nsMenuBarX::MenuConstruct ( const nsMenuEvent aMenuEvent,
nsIWidget aParentWindow,
void menuNode,
void aDocShell 
) [virtual]

Implements nsIMenuListener.

Definition at line 438 of file nsMenuBarX.cpp.

{
  mDocShellWeakRef = do_GetWeakReference(NS_STATIC_CAST(nsIDocShell*, aDocShell));
  nsIDOMNode* aDOMNode  = NS_STATIC_CAST(nsIDOMNode*, menubarNode);
  mMenuBarContent = do_QueryInterface(aDOMNode);           // strong ref
  NS_ASSERTION ( mMenuBarContent, "No content specified for this menubar" );
  if ( !mMenuBarContent )
    return nsEventStatus_eIgnore;
    
  Create(aParentWindow);
  
  // if we're on X (using aqua UI guidelines for menus), remove quit and prefs
  // from our menubar.
  SInt32 result = 0L;
  OSStatus err = ::Gestalt ( gestaltMenuMgrAttr, &result );
  if ( !err && (result & gestaltMenuMgrAquaLayoutMask) )
    AquifyMenuBar();
  err = InstallCommandEventHandler();
  if ( err )
    return nsEventStatus_eIgnore;

  nsCOMPtr<nsIDocShell> docShell = do_QueryReferent(mDocShellWeakRef);
  if (docShell) RegisterAsDocumentObserver(docShell);

  // set this as a nsMenuListener on aParentWindow
  aParentWindow->AddMenuListener((nsIMenuListener *)this);

  PRUint32 count = mMenuBarContent->GetChildCount();
  for ( PRUint32 i = 0; i < count; ++i ) { 
    nsIContent *menu = mMenuBarContent->GetChildAt(i);
    if ( menu ) {
      if (menu->Tag() == nsWidgetAtoms::menu &&
          menu->IsContentOfType(nsIContent::eXUL)) {
        nsAutoString menuName;
        nsAutoString menuAccessKey(NS_LITERAL_STRING(" "));
        menu->GetAttr(kNameSpaceID_None, nsWidgetAtoms::label, menuName);
        menu->GetAttr(kNameSpaceID_None, nsWidgetAtoms::accesskey, menuAccessKey);
                       
        // Don't create the whole menu yet, just add in the top level names
              
        // Create nsMenu, the menubar will own it
        nsCOMPtr<nsIMenu> pnsMenu ( do_CreateInstance(kMenuCID) );
        if ( pnsMenu ) {
          pnsMenu->Create(NS_STATIC_CAST(nsIMenuBar*, this), menuName, menuAccessKey, 
                          NS_STATIC_CAST(nsIChangeManager *, this), 
                          NS_REINTERPRET_CAST(nsIDocShell*, aDocShell), menu);

          // Make nsMenu a child of nsMenuBar. nsMenuBar takes ownership
          AddMenu(pnsMenu); 
                  
          nsAutoString menuIDstring;
          menu->GetAttr(kNameSpaceID_None, nsWidgetAtoms::id, menuIDstring);
          if ( menuIDstring.EqualsLiteral("menu_Help") ) {
            nsMenuEvent event(PR_TRUE, 0, nsnull);
            MenuHandle handle = nsnull;
            event.mCommand = (unsigned int) handle;
            nsCOMPtr<nsIMenuListener> listener(do_QueryInterface(pnsMenu));
            listener->MenuSelected(event);
          }          
        }
      } 
    }
  } // for each menu

  // Give the aParentWindow this nsMenuBarX to hold onto.
  // The parent takes ownership
  aParentWindow->SetMenuBar(this);

  return nsEventStatus_eIgnore;
}

Here is the call graph for this function:

nsEventStatus nsMenuBarX::MenuConstruct ( const nsMenuEvent aMenuEvent,
nsIWidget aParentWindow,
void menuNode,
void aDocShell 
) [virtual]

Implements nsIMenuListener.

Processes a menu deselect event.

Parameters:
aMenuEventSee nsGUIEvent.h
Returns:
whether the event was consumed or ignored. See nsEventStatus

Implements nsIMenuListener.

Definition at line 185 of file nsMenuBarX.cpp.

Processes a menu deselect event.

Parameters:
aMenuEventSee nsGUIEvent.h
Returns:
whether the event was consumed or ignored. See nsEventStatus

Implements nsIMenuListener.

Implements nsIMenuListener.

Definition at line 512 of file nsMenuBarX.cpp.

Implements nsIMenuListener.

Processes a menu item selected event.

Parameters:
aMenuEventSee nsGUIEvent.h
Returns:
whether the event was consumed or ignored. See nsEventStatus

Implements nsIMenuListener.

Definition at line 118 of file nsMenuBarX.cpp.

{
  // Dispatch menu event
  nsEventStatus eventStatus = nsEventStatus_eIgnore;

  PRUint32  numItems;
  mMenusArray.Count(&numItems);
  
  for (PRUint32 i = numItems; i > 0; --i)
  {
    nsCOMPtr<nsISupports>     menuSupports = getter_AddRefs(mMenusArray.ElementAt(i - 1));
    nsCOMPtr<nsIMenuListener> menuListener = do_QueryInterface(menuSupports);
    if(menuListener)
    {
      eventStatus = menuListener->MenuItemSelected(aMenuEvent);
      if (nsEventStatus_eIgnore != eventStatus)
        return eventStatus;
    }
  }
  return eventStatus;
}

Here is the call graph for this function:

NS_DECL_ISUPPORTS NS_DECL_NSICHANGEMANAGER NS_DECL_NSIMENUCOMMANDDISPATCHER nsEventStatus nsMenuBarX::MenuItemSelected ( const nsMenuEvent aMenuEvent) [virtual]

Processes a menu item selected event.

Parameters:
aMenuEventSee nsGUIEvent.h
Returns:
whether the event was consumed or ignored. See nsEventStatus

Implements nsIMenuListener.

Processes a menu selected event.

Parameters:
aMenuEventSee nsGUIEvent.h
Returns:
whether the event was consumed or ignored. See nsEventStatus

Implements nsIMenuListener.

Definition at line 142 of file nsMenuBarX.cpp.

{
  // Dispatch event
  nsEventStatus eventStatus = nsEventStatus_eIgnore;

  nsCOMPtr<nsIMenuListener> menuListener;
  //((nsISupports*)mMenuVoidArray[i-1])->QueryInterface(NS_GET_IID(nsIMenuListener), (void**)&menuListener);
  //printf("gPreviousMenuStack.Count() = %d \n", gPreviousMenuStack.Count());
#if !TARGET_CARBON
  nsCOMPtr<nsIMenu> theMenu;
  gPreviousMenuStack.GetMenuAt(gPreviousMenuStack.Count() - 1, getter_AddRefs(theMenu));
  menuListener = do_QueryInterface(theMenu);
#endif
  if (menuListener) {
    //TODO: MenuSelected is the right thing to call...
    //eventStatus = menuListener->MenuSelected(aMenuEvent);
    eventStatus = menuListener->MenuItemSelected(aMenuEvent);
    if (nsEventStatus_eIgnore != eventStatus)
      return eventStatus;
  } else {
    // If it's the help menu, gPreviousMenuStack won't be accurate so we need to get the listener a different way 
    // We'll do it the old fashioned way of looping through and finding it
    PRUint32  numItems;
    mMenusArray.Count(&numItems);
    for (PRUint32 i = numItems; i > 0; --i)
    {
      nsCOMPtr<nsISupports>     menuSupports = getter_AddRefs(mMenusArray.ElementAt(i - 1));
      nsCOMPtr<nsIMenuListener> thisListener = do_QueryInterface(menuSupports);
           if (thisListener)
           {
        //TODO: MenuSelected is the right thing to call...
           //eventStatus = menuListener->MenuSelected(aMenuEvent);
           eventStatus = thisListener->MenuItemSelected(aMenuEvent);
           if(nsEventStatus_eIgnore != eventStatus)
             return eventStatus;
      }
    }
  }
  return eventStatus;
}

Here is the call graph for this function:

Processes a menu selected event.

Parameters:
aMenuEventSee nsGUIEvent.h
Returns:
whether the event was consumed or ignored. See nsEventStatus

Implements nsIMenuListener.

Draw the menubar.

 

Implements nsIMenuBar.

Definition at line 696 of file nsMenuBarX.cpp.

{
    // hack to correctly swap menu bars.
    // hopefully this is fast enough.
    ::SetRootMenu(mRootMenu);
    ::DrawMenuBar();
    return NS_OK;
}

Draw the menubar.

 

Implements nsIMenuBar.

unsigned long nsIMenuCommandDispatcher::Register ( in nsIMenuItem  aItem) [inherited]
void nsIChangeManager::Register ( in nsIContent  aContent,
in nsIChangeObserver  aMenuObject 
) [inherited]

Here is the caller graph for this function:

void nsIChangeManager::Register ( in nsIContent  aContent,
in nsIChangeObserver  aMenuObject 
) [inherited]

Definition at line 228 of file nsMenuBarX.cpp.

{
  nsCOMPtr<nsIDocument> doc;
  GetDocument(inDocShell, getter_AddRefs(doc));
  if (!doc)
    return;

  // register ourselves
  nsCOMPtr<nsIDocumentObserver> observer ( do_QueryInterface(NS_STATIC_CAST(nsIMenuBar*,this)) );
  doc->AddObserver(observer);
  // also get pointer to doc, just in case docshell goes away
  // we can still remove ourself as doc observer directly from doc
  mDocument = doc;
} // RegisterAsDocumentObesrver

Here is the call graph for this function:

Here is the caller graph for this function:

Removes all the Menus.

 

Implements nsIMenuBar.

Definition at line 669 of file nsMenuBarX.cpp.

{
  NS_ASSERTION(0, "Not implemented!");
  // mMenusArray.Clear();    // maybe?
  return NS_OK;
}

Removes all the Menus.

 

Implements nsIMenuBar.

Removes an Menu from a specified Index.

 

Implements nsIMenuBar.

Definition at line 660 of file nsMenuBarX.cpp.

{
  mMenusArray.RemoveElementAt(aCount);
  ::DeleteMenuItem(mRootMenu, aCount + 1);    // MenuManager is 1-based
  ::DrawMenuBar();
  return NS_OK;
}

Removes an Menu from a specified Index.

 

Implements nsIMenuBar.

NS_METHOD nsMenuBarX::SetNativeData ( void aData) [virtual]

Sets Native MenuHandle.

Temporary hack for mac until nsMenuBar does it's own construction

Implements nsIMenuBar.

Definition at line 684 of file nsMenuBarX.cpp.

{
#if 0
    Handle menubarHandle = (Handle)aData;
    if (mMacMBarHandle && mMacMBarHandle != menubarHandle)
        ::DisposeHandle(mMacMBarHandle);
    mMacMBarHandle = menubarHandle;
#endif
    return NS_OK;
}
NS_IMETHOD nsMenuBarX::SetNativeData ( void aData) [virtual]

Sets Native MenuHandle.

Temporary hack for mac until nsMenuBar does it's own construction

Implements nsIMenuBar.

NS_METHOD nsMenuBarX::SetParent ( nsIWidget aParent) [virtual]

Set the MenuBar's Parent.

 

Implements nsIMenuBar.

Definition at line 538 of file nsMenuBarX.cpp.

{
  mParent = aParent;    // weak ref  
  return NS_OK;
}

Here is the caller graph for this function:

NS_IMETHOD nsMenuBarX::SetParent ( nsIWidget aParent) [virtual]

Set the MenuBar's Parent.

 

Implements nsIMenuBar.

nsEventStatus nsMenuBarX::SetRebuild ( PRBool  aMenuEvent) [virtual]

Implements nsIMenuListener.

Definition at line 198 of file nsMenuBarX.cpp.

nsEventStatus nsMenuBarX::SetRebuild ( PRBool  aMenuEvent) [virtual]

Implements nsIMenuListener.

virtual void nsIDocumentObserver::StyleRuleAdded ( nsIDocument aDocument,
nsIStyleSheet aStyleSheet,
nsIStyleRule aStyleRule 
) [pure virtual, inherited]

A StyleRule has just been added to a style sheet.

This method is called automatically when the rule gets added to the sheet. The style sheet passes this notification to the document. The notification is passed on to all of the document observers.

Parameters:
aDocumentThe document being observed
aStyleSheetthe StyleSheet that has been modified
aStyleRulethe rule that was added

Implemented in PresShell.

virtual void nsIDocumentObserver::StyleRuleChanged ( nsIDocument aDocument,
nsIStyleSheet aStyleSheet,
nsIStyleRule aOldStyleRule,
nsIStyleRule aNewStyleRule 
) [pure virtual, inherited]

A StyleRule has just been modified within a style sheet.

This method is called automatically when the rule gets modified. The style sheet passes this notification to the document. The notification is passed on to all of the document observers.

Since nsIStyleRule objects are immutable, there is a new object replacing the old one. However, the use of this method (rather than StyleRuleAdded and StyleRuleRemoved) implies that the new rule matches the same elements and has the same priority (weight, origin, specificity) as the old one. (However, if it is a CSS style rule, there may be a change in whether it has an important rule.)

Parameters:
aDocumentThe document being observed
aStyleSheetthe StyleSheet that contians the rule
aOldStyleRuleThe rule being removed. This rule may not be fully valid anymore -- however, it can still be used for pointer comparison and |QueryInterface|.
aNewStyleRuleThe rule being added.

Implemented in PresShell.

virtual void nsIDocumentObserver::StyleRuleRemoved ( nsIDocument aDocument,
nsIStyleSheet aStyleSheet,
nsIStyleRule aStyleRule 
) [pure virtual, inherited]

A StyleRule has just been removed from a style sheet.

This method is called automatically when the rule gets removed from the sheet. The style sheet passes this notification to the document. The notification is passed on to all of the document observers.

Parameters:
aDocumentThe document being observed
aStyleSheetthe StyleSheet that has been modified
aStyleRulethe rule that was removed

Implemented in PresShell.

virtual void nsIDocumentObserver::StyleSheetAdded ( nsIDocument aDocument,
nsIStyleSheet aStyleSheet,
PRBool  aDocumentSheet 
) [pure virtual, inherited]

A StyleSheet has just been added to the document.

This method is called automatically when a StyleSheet gets added to the document, even if the stylesheet is not applicable. The notification is passed on to all of the document observers.

Parameters:
aDocumentThe document being observed
aStyleSheetthe StyleSheet that has been added
aDocumentSheetTrue if sheet is in document's style sheet list, false if sheet is not (i.e., UA or user sheet)

Implemented in PresShell, and nsDOMStyleSheetList.

virtual void nsIDocumentObserver::StyleSheetApplicableStateChanged ( nsIDocument aDocument,
nsIStyleSheet aStyleSheet,
PRBool  aApplicable 
) [pure virtual, inherited]

A StyleSheet has just changed its applicable state.

This method is called automatically when the applicable state of a StyleSheet gets changed. The style sheet passes this notification to the document. The notification is passed on to all of the document observers.

Parameters:
aDocumentThe document being observed
aStyleSheetthe StyleSheet that has changed state
aApplicablePR_TRUE if the sheet is applicable, PR_FALSE if it is not applicable

Implemented in PresShell.

virtual void nsIDocumentObserver::StyleSheetRemoved ( nsIDocument aDocument,
nsIStyleSheet aStyleSheet,
PRBool  aDocumentSheet 
) [pure virtual, inherited]

A StyleSheet has just been removed from the document.

This method is called automatically when a StyleSheet gets removed from the document, even if the stylesheet is not applicable. The notification is passed on to all of the document observers.

Parameters:
aDocumentThe document being observed
aStyleSheetthe StyleSheet that has been removed
aDocumentSheetTrue if sheet is in document's style sheet list, false if sheet is not (i.e., UA or user sheet)

Implemented in PresShell, and nsDOMStyleSheetList.

void nsIMenuCommandDispatcher::Unregister ( in unsigned long  aCommandID) [inherited]
void nsIChangeManager::Unregister ( in nsIContent  aContent) [inherited]

Here is the caller graph for this function:

void nsIChangeManager::Unregister ( in nsIContent  aContent) [inherited]

Member Data Documentation

nsHashtable nsMenuBarX::mCommandMapTable [protected]

Definition at line 139 of file nsMenuBarX.h.

Definition at line 140 of file nsMenuBarX.h.

Definition at line 152 of file nsMenuBarX.h.

Definition at line 153 of file nsMenuBarX.h.

Definition at line 150 of file nsMenuBarX.h.

Definition at line 144 of file nsMenuBarX.h.

nsSupportsArray nsMenuBarX::mMenusArray [protected]

Definition at line 143 of file nsMenuBarX.h.

Definition at line 142 of file nsMenuBarX.h.

nsHashtable nsMenuBarX::mObserverTable [protected]

Definition at line 138 of file nsMenuBarX.h.

Definition at line 148 of file nsMenuBarX.h.

Definition at line 145 of file nsMenuBarX.h.

Definition at line 147 of file nsMenuBarX.h.

MenuRef nsMenuBarX::mRootMenu [protected]

Definition at line 155 of file nsMenuBarX.h.

static MenuRef nsMenuBarX::sAppleMenu [static, protected]

Definition at line 157 of file nsMenuBarX.h.

static EventHandlerUPP nsMenuBarX::sCommandEventHandler [static, protected]

Definition at line 159 of file nsMenuBarX.h.


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