nsXULLabelFrame.h 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  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. /* derived class of nsBlockFrame used for xul:label elements */
  6. #ifndef nsXULLabelFrame_h_
  7. #define nsXULLabelFrame_h_
  8. #include "mozilla/Attributes.h"
  9. #include "nsBlockFrame.h"
  10. #ifndef MOZ_XUL
  11. #error "This file should not be included"
  12. #endif
  13. class nsXULLabelFrame : public nsBlockFrame
  14. {
  15. public:
  16. NS_DECL_FRAMEARENA_HELPERS
  17. friend nsIFrame* NS_NewXULLabelFrame(nsIPresShell* aPresShell,
  18. nsStyleContext *aContext);
  19. // nsIFrame
  20. virtual void Init(nsIContent* aContent,
  21. nsContainerFrame* aParent,
  22. nsIFrame* aPrevInFlow) override;
  23. virtual void DestroyFrom(nsIFrame* aDestructRoot) override;
  24. virtual nsresult AttributeChanged(int32_t aNameSpaceID,
  25. nsIAtom* aAttribute,
  26. int32_t aModType) override;
  27. /**
  28. * Get the "type" of the frame
  29. *
  30. * @see nsGkAtoms::XULLabelFrame
  31. */
  32. virtual nsIAtom* GetType() const override;
  33. #ifdef DEBUG_FRAME_DUMP
  34. virtual nsresult GetFrameName(nsAString& aResult) const override;
  35. #endif
  36. protected:
  37. explicit nsXULLabelFrame(nsStyleContext *aContext) : nsBlockFrame(aContext) {}
  38. nsresult RegUnregAccessKey(bool aDoReg);
  39. };
  40. nsIFrame*
  41. NS_NewXULLabelFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
  42. #endif /* !defined(nsXULLabelFrame_h_) */