Source code

Revision control

Other Tools

1
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
3
/* This Source Code Form is subject to the terms of the Mozilla Public
4
* License, v. 2.0. If a copy of the MPL was not distributed with this
5
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6
7
#ifndef mozilla_dom_XULMenuElement_h
8
#define mozilla_dom_XULMenuElement_h
9
10
#include "nsXULElement.h"
11
12
namespace mozilla {
13
namespace dom {
14
15
class KeyboardEvent;
16
17
class XULMenuElement final : public nsXULElement {
18
public:
19
explicit XULMenuElement(already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo)
20
: nsXULElement(std::move(aNodeInfo)) {}
21
22
MOZ_CAN_RUN_SCRIPT already_AddRefed<Element> GetActiveChild();
23
MOZ_CAN_RUN_SCRIPT void SetActiveChild(Element* arg);
24
MOZ_CAN_RUN_SCRIPT bool HandleKeyPress(KeyboardEvent& keyEvent);
25
MOZ_CAN_RUN_SCRIPT bool OpenedWithKey();
26
27
private:
28
virtual ~XULMenuElement() {}
29
JSObject* WrapNode(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) final;
30
31
nsIFrame* GetFrame();
32
};
33
34
} // namespace dom
35
} // namespace mozilla
36
37
#endif // XULMenuElement_h