1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
11 #ifndef nsSplitterFrame_h__
12 #define nsSplitterFrame_h__
14 #include "mozilla/Attributes.h"
15 #include "nsBoxFrame.h"
17 class nsSplitterFrameInner
;
19 nsIFrame
* NS_NewSplitterFrame(nsIPresShell
* aPresShell
,
20 mozilla::ComputedStyle
* aStyle
);
22 class nsSplitterFrame final
: public nsBoxFrame
{
24 NS_DECL_FRAMEARENA_HELPERS(nsSplitterFrame
)
26 explicit nsSplitterFrame(ComputedStyle
* aStyle
, nsPresContext
* aPresContext
);
27 virtual void DestroyFrom(nsIFrame
* aDestructRoot
,
28 PostDestroyData
& aPostDestroyData
) override
;
30 #ifdef DEBUG_FRAME_DUMP
31 virtual nsresult
GetFrameName(nsAString
& aResult
) const override
{
32 return MakeFrameName(NS_LITERAL_STRING("SplitterFrame"), aResult
);
37 virtual nsresult
AttributeChanged(int32_t aNameSpaceID
, nsAtom
* aAttribute
,
38 int32_t aModType
) override
;
40 virtual void Init(nsIContent
* aContent
, nsContainerFrame
* aParent
,
41 nsIFrame
* aPrevInFlow
) override
;
43 NS_IMETHOD
DoXULLayout(nsBoxLayoutState
& aBoxLayoutState
) override
;
45 NS_IMETHOD
HandlePress(nsPresContext
* aPresContext
,
46 mozilla::WidgetGUIEvent
* aEvent
,
47 nsEventStatus
* aEventStatus
) override
;
49 NS_IMETHOD
HandleMultiplePress(nsPresContext
* aPresContext
,
50 mozilla::WidgetGUIEvent
* aEvent
,
51 nsEventStatus
* aEventStatus
,
52 bool aControlHeld
) override
;
54 NS_IMETHOD
HandleDrag(nsPresContext
* aPresContext
,
55 mozilla::WidgetGUIEvent
* aEvent
,
56 nsEventStatus
* aEventStatus
) override
;
58 NS_IMETHOD
HandleRelease(nsPresContext
* aPresContext
,
59 mozilla::WidgetGUIEvent
* aEvent
,
60 nsEventStatus
* aEventStatus
) override
;
62 virtual nsresult
HandleEvent(nsPresContext
* aPresContext
,
63 mozilla::WidgetGUIEvent
* aEvent
,
64 nsEventStatus
* aEventStatus
) override
;
66 virtual void BuildDisplayList(nsDisplayListBuilder
* aBuilder
,
67 const nsDisplayListSet
& aLists
) override
;
69 virtual void GetInitialOrientation(bool& aIsHorizontal
) override
;
72 friend class nsSplitterFrameInner
;
73 nsSplitterFrameInner
* mInner
;
75 }; // class nsSplitterFrame