MenuBoxObject.h 968 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  2. /* vim:set ts=2 sw=2 sts=2 et cindent: */
  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. #ifndef mozilla_dom_MenuBoxObject_h
  7. #define mozilla_dom_MenuBoxObject_h
  8. #include "mozilla/dom/BoxObject.h"
  9. namespace mozilla {
  10. namespace dom {
  11. class KeyboardEvent;
  12. class MenuBoxObject final : public BoxObject
  13. {
  14. public:
  15. MenuBoxObject();
  16. virtual JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
  17. void OpenMenu(bool aOpenFlag);
  18. already_AddRefed<Element> GetActiveChild();
  19. void SetActiveChild(Element* arg);
  20. bool HandleKeyPress(KeyboardEvent& keyEvent);
  21. bool OpenedWithKey();
  22. private:
  23. ~MenuBoxObject();
  24. };
  25. } // namespace dom
  26. } // namespace mozilla
  27. #endif // mozilla_dom_MenuBoxObject_h