|
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 // nsSplitterFrame |
|
8 // |
|
9 |
|
10 #ifndef nsSplitterFrame_h__ |
|
11 #define nsSplitterFrame_h__ |
|
12 |
|
13 |
|
14 #include "mozilla/Attributes.h" |
|
15 #include "nsBoxFrame.h" |
|
16 |
|
17 class nsSplitterFrameInner; |
|
18 |
|
19 nsIFrame* NS_NewSplitterFrame(nsIPresShell* aPresShell, nsStyleContext* aContext); |
|
20 |
|
21 class nsSplitterFrame : public nsBoxFrame |
|
22 { |
|
23 public: |
|
24 NS_DECL_FRAMEARENA_HELPERS |
|
25 |
|
26 nsSplitterFrame(nsIPresShell* aPresShell, nsStyleContext* aContext); |
|
27 virtual void DestroyFrom(nsIFrame* aDestructRoot) MOZ_OVERRIDE; |
|
28 |
|
29 #ifdef DEBUG_FRAME_DUMP |
|
30 virtual nsresult GetFrameName(nsAString& aResult) const MOZ_OVERRIDE { |
|
31 return MakeFrameName(NS_LITERAL_STRING("SplitterFrame"), aResult); |
|
32 } |
|
33 #endif |
|
34 |
|
35 // nsIFrame overrides |
|
36 virtual nsresult AttributeChanged(int32_t aNameSpaceID, |
|
37 nsIAtom* aAttribute, |
|
38 int32_t aModType) MOZ_OVERRIDE; |
|
39 |
|
40 virtual void Init(nsIContent* aContent, |
|
41 nsIFrame* aParent, |
|
42 nsIFrame* aPrevInFlow) MOZ_OVERRIDE; |
|
43 |
|
44 virtual nsresult GetCursor(const nsPoint& aPoint, |
|
45 nsIFrame::Cursor& aCursor) MOZ_OVERRIDE; |
|
46 |
|
47 NS_IMETHOD DoLayout(nsBoxLayoutState& aBoxLayoutState) MOZ_OVERRIDE; |
|
48 |
|
49 NS_IMETHOD HandlePress(nsPresContext* aPresContext, |
|
50 mozilla::WidgetGUIEvent* aEvent, |
|
51 nsEventStatus* aEventStatus) MOZ_OVERRIDE; |
|
52 |
|
53 NS_IMETHOD HandleMultiplePress(nsPresContext* aPresContext, |
|
54 mozilla::WidgetGUIEvent* aEvent, |
|
55 nsEventStatus* aEventStatus, |
|
56 bool aControlHeld) MOZ_OVERRIDE; |
|
57 |
|
58 NS_IMETHOD HandleDrag(nsPresContext* aPresContext, |
|
59 mozilla::WidgetGUIEvent* aEvent, |
|
60 nsEventStatus* aEventStatus) MOZ_OVERRIDE; |
|
61 |
|
62 NS_IMETHOD HandleRelease(nsPresContext* aPresContext, |
|
63 mozilla::WidgetGUIEvent* aEvent, |
|
64 nsEventStatus* aEventStatus) MOZ_OVERRIDE; |
|
65 |
|
66 virtual nsresult HandleEvent(nsPresContext* aPresContext, |
|
67 mozilla::WidgetGUIEvent* aEvent, |
|
68 nsEventStatus* aEventStatus) MOZ_OVERRIDE; |
|
69 |
|
70 virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder, |
|
71 const nsRect& aDirtyRect, |
|
72 const nsDisplayListSet& aLists) MOZ_OVERRIDE; |
|
73 |
|
74 virtual void GetInitialOrientation(bool& aIsHorizontal) MOZ_OVERRIDE; |
|
75 |
|
76 private: |
|
77 |
|
78 friend class nsSplitterFrameInner; |
|
79 nsSplitterFrameInner* mInner; |
|
80 |
|
81 }; // class nsSplitterFrame |
|
82 |
|
83 #endif |