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/. */
7 /* derived class of nsBlockFrame used for xul:label elements */
9 #ifndef nsXULLabelFrame_h_
10 #define nsXULLabelFrame_h_
12 #include "mozilla/Attributes.h"
13 #include "nsBlockFrame.h"
17 } // namespace mozilla
19 class nsXULLabelFrame final
: public nsBlockFrame
{
21 NS_DECL_FRAMEARENA_HELPERS(nsXULLabelFrame
)
23 friend nsIFrame
* NS_NewXULLabelFrame(mozilla::PresShell
* aPresShell
,
24 ComputedStyle
* aStyle
);
27 virtual void Init(nsIContent
* aContent
, nsContainerFrame
* aParent
,
28 nsIFrame
* aPrevInFlow
) override
;
30 virtual void DestroyFrom(nsIFrame
* aDestructRoot
,
31 PostDestroyData
& aPostDestroyData
) override
;
33 virtual nsresult
AttributeChanged(int32_t aNameSpaceID
, nsAtom
* aAttribute
,
34 int32_t aModType
) override
;
36 #ifdef DEBUG_FRAME_DUMP
37 virtual nsresult
GetFrameName(nsAString
& aResult
) const override
;
41 explicit nsXULLabelFrame(ComputedStyle
* aStyle
, nsPresContext
* aPresContext
)
42 : nsBlockFrame(aStyle
, aPresContext
, kClassID
) {}
44 nsresult
RegUnregAccessKey(bool aDoReg
);
47 nsIFrame
* NS_NewXULLabelFrame(mozilla::PresShell
* aPresShell
,
48 mozilla::ComputedStyle
* aStyle
);
50 #endif /* !defined(nsXULLabelFrame_h_) */