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/. */
10 #ifndef nsSplitterFrame_h__
11 #define nsSplitterFrame_h__
14 #include "mozilla/Attributes.h"
15 #include "nsBoxFrame.h"
17 class nsSplitterFrameInner
;
19 nsIFrame
* NS_NewSplitterFrame(nsIPresShell
* aPresShell
, nsStyleContext
* aContext
);
21 class nsSplitterFrame
: public nsBoxFrame
24 NS_DECL_FRAMEARENA_HELPERS
26 nsSplitterFrame(nsIPresShell
* aPresShell
, nsStyleContext
* aContext
);
27 virtual void DestroyFrom(nsIFrame
* aDestructRoot
) MOZ_OVERRIDE
;
29 #ifdef DEBUG_FRAME_DUMP
30 virtual nsresult
GetFrameName(nsAString
& aResult
) const MOZ_OVERRIDE
{
31 return MakeFrameName(NS_LITERAL_STRING("SplitterFrame"), aResult
);
36 virtual nsresult
AttributeChanged(int32_t aNameSpaceID
,
38 int32_t aModType
) MOZ_OVERRIDE
;
40 virtual void Init(nsIContent
* aContent
,
41 nsContainerFrame
* aParent
,
42 nsIFrame
* aPrevInFlow
) MOZ_OVERRIDE
;
44 virtual nsresult
GetCursor(const nsPoint
& aPoint
,
45 nsIFrame::Cursor
& aCursor
) MOZ_OVERRIDE
;
47 NS_IMETHOD
DoLayout(nsBoxLayoutState
& aBoxLayoutState
) MOZ_OVERRIDE
;
49 NS_IMETHOD
HandlePress(nsPresContext
* aPresContext
,
50 mozilla::WidgetGUIEvent
* aEvent
,
51 nsEventStatus
* aEventStatus
) MOZ_OVERRIDE
;
53 NS_IMETHOD
HandleMultiplePress(nsPresContext
* aPresContext
,
54 mozilla::WidgetGUIEvent
* aEvent
,
55 nsEventStatus
* aEventStatus
,
56 bool aControlHeld
) MOZ_OVERRIDE
;
58 NS_IMETHOD
HandleDrag(nsPresContext
* aPresContext
,
59 mozilla::WidgetGUIEvent
* aEvent
,
60 nsEventStatus
* aEventStatus
) MOZ_OVERRIDE
;
62 NS_IMETHOD
HandleRelease(nsPresContext
* aPresContext
,
63 mozilla::WidgetGUIEvent
* aEvent
,
64 nsEventStatus
* aEventStatus
) MOZ_OVERRIDE
;
66 virtual nsresult
HandleEvent(nsPresContext
* aPresContext
,
67 mozilla::WidgetGUIEvent
* aEvent
,
68 nsEventStatus
* aEventStatus
) MOZ_OVERRIDE
;
70 virtual void BuildDisplayList(nsDisplayListBuilder
* aBuilder
,
71 const nsRect
& aDirtyRect
,
72 const nsDisplayListSet
& aLists
) MOZ_OVERRIDE
;
74 virtual void GetInitialOrientation(bool& aIsHorizontal
) MOZ_OVERRIDE
;
78 friend class nsSplitterFrameInner
;
79 nsSplitterFrameInner
* mInner
;
81 }; // class nsSplitterFrame