|
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 /** |
|
7 |
|
8 Eric D Vaughan |
|
9 A frame that can have multiple children. Only one child may be displayed at one time. So the |
|
10 can be flipped though like a deck of cards. |
|
11 |
|
12 **/ |
|
13 |
|
14 #ifndef nsGridRowLeafFrame_h___ |
|
15 #define nsGridRowLeafFrame_h___ |
|
16 |
|
17 #include "mozilla/Attributes.h" |
|
18 #include "nsBoxFrame.h" |
|
19 |
|
20 /** |
|
21 * A frame representing a grid row (or column). Grid row (and column) |
|
22 * elements are the children of row group (or column group) elements, |
|
23 * and their children are placed one to a cell. |
|
24 */ |
|
25 // XXXldb This needs a better name that indicates that it's for any grid |
|
26 // row. |
|
27 class nsGridRowLeafFrame : public nsBoxFrame |
|
28 { |
|
29 public: |
|
30 NS_DECL_FRAMEARENA_HELPERS |
|
31 |
|
32 friend nsIFrame* NS_NewGridRowLeafFrame(nsIPresShell* aPresShell, |
|
33 nsStyleContext* aContext); |
|
34 |
|
35 #ifdef DEBUG_FRAME_DUMP |
|
36 virtual nsresult GetFrameName(nsAString& aResult) const MOZ_OVERRIDE |
|
37 { |
|
38 return MakeFrameName(NS_LITERAL_STRING("nsGridRowLeaf"), aResult); |
|
39 } |
|
40 #endif |
|
41 |
|
42 nsGridRowLeafFrame(nsIPresShell* aPresShell, |
|
43 nsStyleContext* aContext, |
|
44 bool aIsRoot, |
|
45 nsBoxLayout* aLayoutManager): |
|
46 nsBoxFrame(aPresShell, aContext, aIsRoot, aLayoutManager) {} |
|
47 |
|
48 virtual nsresult GetBorderAndPadding(nsMargin& aBorderAndPadding) MOZ_OVERRIDE; |
|
49 |
|
50 }; // class nsGridRowLeafFrame |
|
51 |
|
52 |
|
53 |
|
54 #endif |
|
55 |