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