nsListItemFrame.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334
  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/. */
  5. #include "mozilla/Attributes.h"
  6. #include "nsGridRowLeafFrame.h"
  7. nsIFrame* NS_NewListItemFrame(nsIPresShell* aPresShell,
  8. nsStyleContext *aContext);
  9. class nsListItemFrame : public nsGridRowLeafFrame
  10. {
  11. public:
  12. NS_DECL_FRAMEARENA_HELPERS
  13. friend nsIFrame* NS_NewListItemFrame(nsIPresShell* aPresShell,
  14. nsStyleContext *aContext);
  15. // overridden so that children of listitems don't handle mouse events,
  16. // unless allowevents="true" is specified on the listitem
  17. virtual void BuildDisplayListForChildren(nsDisplayListBuilder* aBuilder,
  18. const nsDisplayListSet& aLists) override;
  19. virtual nsSize GetXULPrefSize(nsBoxLayoutState& aState) override;
  20. protected:
  21. explicit nsListItemFrame(nsStyleContext *aContext,
  22. bool aIsRoot = false,
  23. nsBoxLayout* aLayoutManager = nullptr);
  24. virtual ~nsListItemFrame();
  25. }; // class nsListItemFrame