1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 #ifndef nsMenuParentX_h_
7 #define nsMenuParentX_h_
9 #include "mozilla/RefPtr.h"
10 #include "mozilla/Variant.h"
16 // A base class for objects that can be the parent of an nsMenuX or nsMenuItemX.
19 using MenuChild
= mozilla::Variant
<RefPtr
<nsMenuX
>, RefPtr
<nsMenuItemX
>>;
21 // XXXmstange double-check that this is still needed
22 virtual nsMenuBarX
* AsMenuBar() { return nullptr; }
24 // Called when aChild becomes visible or hidden, so that the parent can insert
25 // or remove the child's native menu item from its NSMenu and update its state
27 virtual void MenuChildChangedVisibility(const MenuChild
& aChild
,
31 #endif // nsMenuParentX_h_