|
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 class nsXULLabelFrame : public nsBlockFrame |
|
19 { |
|
20 public: |
|
21 NS_DECL_FRAMEARENA_HELPERS |
|
22 |
|
23 friend nsIFrame* NS_NewXULLabelFrame(nsIPresShell* aPresShell, |
|
24 nsStyleContext *aContext); |
|
25 |
|
26 // nsIFrame |
|
27 virtual void Init(nsIContent* aContent, |
|
28 nsIFrame* aParent, |
|
29 nsIFrame* aPrevInFlow) MOZ_OVERRIDE; |
|
30 |
|
31 virtual void DestroyFrom(nsIFrame* aDestructRoot) MOZ_OVERRIDE; |
|
32 |
|
33 virtual nsresult AttributeChanged(int32_t aNameSpaceID, |
|
34 nsIAtom* aAttribute, |
|
35 int32_t aModType) MOZ_OVERRIDE; |
|
36 |
|
37 /** |
|
38 * Get the "type" of the frame |
|
39 * |
|
40 * @see nsGkAtoms::XULLabelFrame |
|
41 */ |
|
42 virtual nsIAtom* GetType() const MOZ_OVERRIDE; |
|
43 |
|
44 #ifdef DEBUG_FRAME_DUMP |
|
45 virtual nsresult GetFrameName(nsAString& aResult) const MOZ_OVERRIDE; |
|
46 #endif |
|
47 |
|
48 protected: |
|
49 nsXULLabelFrame(nsStyleContext *aContext) : nsBlockFrame(aContext) {} |
|
50 |
|
51 nsresult RegUnregAccessKey(bool aDoReg); |
|
52 }; |
|
53 |
|
54 nsIFrame* |
|
55 NS_NewXULLabelFrame(nsIPresShell* aPresShell, nsStyleContext* aContext); |
|
56 |
|
57 #endif /* !defined(nsXULLabelFrame_h_) */ |