Bug 1793629 - Implement attention indicator for the unified extensions button, r...
[gecko.git] / layout / xul / nsSplitterFrame.h
blob75af7cd83c4124828e14a05cf68141755cb5adeb
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/. */
7 //
8 // nsSplitterFrame
9 //
11 #ifndef nsSplitterFrame_h__
12 #define nsSplitterFrame_h__
14 #include "mozilla/Attributes.h"
15 #include "mozilla/RefPtr.h"
16 #include "nsBoxFrame.h"
18 class nsSplitterFrameInner;
20 namespace mozilla {
21 class PresShell;
22 } // namespace mozilla
24 nsIFrame* NS_NewSplitterFrame(mozilla::PresShell* aPresShell,
25 mozilla::ComputedStyle* aStyle);
27 class nsSplitterFrame final : public nsBoxFrame {
28 public:
29 NS_DECL_FRAMEARENA_HELPERS(nsSplitterFrame)
31 explicit nsSplitterFrame(ComputedStyle* aStyle, nsPresContext* aPresContext);
32 virtual void DestroyFrom(nsIFrame* aDestructRoot,
33 PostDestroyData& aPostDestroyData) override;
35 #ifdef DEBUG_FRAME_DUMP
36 virtual nsresult GetFrameName(nsAString& aResult) const override {
37 return MakeFrameName(u"SplitterFrame"_ns, aResult);
39 #endif
41 // nsIFrame overrides
42 virtual nsresult AttributeChanged(int32_t aNameSpaceID, nsAtom* aAttribute,
43 int32_t aModType) override;
45 virtual void Init(nsIContent* aContent, nsContainerFrame* aParent,
46 nsIFrame* aPrevInFlow) override;
48 NS_IMETHOD DoXULLayout(nsBoxLayoutState& aBoxLayoutState) override;
50 NS_IMETHOD HandlePress(nsPresContext* aPresContext,
51 mozilla::WidgetGUIEvent* aEvent,
52 nsEventStatus* aEventStatus) override;
54 NS_IMETHOD HandleMultiplePress(nsPresContext* aPresContext,
55 mozilla::WidgetGUIEvent* aEvent,
56 nsEventStatus* aEventStatus,
57 bool aControlHeld) override;
59 MOZ_CAN_RUN_SCRIPT
60 NS_IMETHOD HandleDrag(nsPresContext* aPresContext,
61 mozilla::WidgetGUIEvent* aEvent,
62 nsEventStatus* aEventStatus) override;
64 NS_IMETHOD HandleRelease(nsPresContext* aPresContext,
65 mozilla::WidgetGUIEvent* aEvent,
66 nsEventStatus* aEventStatus) override;
68 virtual nsresult HandleEvent(nsPresContext* aPresContext,
69 mozilla::WidgetGUIEvent* aEvent,
70 nsEventStatus* aEventStatus) override;
72 virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
73 const nsDisplayListSet& aLists) override;
75 virtual void GetInitialOrientation(bool& aIsHorizontal) override;
77 private:
78 friend class nsSplitterFrameInner;
79 RefPtr<nsSplitterFrameInner> mInner;
81 }; // class nsSplitterFrame
83 #endif