Fri, 16 Jan 2015 18:13:44 +0100
Integrate suggestion from review to improve consistency with existing code.
michael@0 | 1 | /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
michael@0 | 2 | /* This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 3 | * License, v. 2.0. If a copy of the MPL was not distributed with this |
michael@0 | 4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
michael@0 | 5 | |
michael@0 | 6 | // |
michael@0 | 7 | // nsSplitterFrame |
michael@0 | 8 | // |
michael@0 | 9 | |
michael@0 | 10 | #ifndef nsSplitterFrame_h__ |
michael@0 | 11 | #define nsSplitterFrame_h__ |
michael@0 | 12 | |
michael@0 | 13 | |
michael@0 | 14 | #include "mozilla/Attributes.h" |
michael@0 | 15 | #include "nsBoxFrame.h" |
michael@0 | 16 | |
michael@0 | 17 | class nsSplitterFrameInner; |
michael@0 | 18 | |
michael@0 | 19 | nsIFrame* NS_NewSplitterFrame(nsIPresShell* aPresShell, nsStyleContext* aContext); |
michael@0 | 20 | |
michael@0 | 21 | class nsSplitterFrame : public nsBoxFrame |
michael@0 | 22 | { |
michael@0 | 23 | public: |
michael@0 | 24 | NS_DECL_FRAMEARENA_HELPERS |
michael@0 | 25 | |
michael@0 | 26 | nsSplitterFrame(nsIPresShell* aPresShell, nsStyleContext* aContext); |
michael@0 | 27 | virtual void DestroyFrom(nsIFrame* aDestructRoot) MOZ_OVERRIDE; |
michael@0 | 28 | |
michael@0 | 29 | #ifdef DEBUG_FRAME_DUMP |
michael@0 | 30 | virtual nsresult GetFrameName(nsAString& aResult) const MOZ_OVERRIDE { |
michael@0 | 31 | return MakeFrameName(NS_LITERAL_STRING("SplitterFrame"), aResult); |
michael@0 | 32 | } |
michael@0 | 33 | #endif |
michael@0 | 34 | |
michael@0 | 35 | // nsIFrame overrides |
michael@0 | 36 | virtual nsresult AttributeChanged(int32_t aNameSpaceID, |
michael@0 | 37 | nsIAtom* aAttribute, |
michael@0 | 38 | int32_t aModType) MOZ_OVERRIDE; |
michael@0 | 39 | |
michael@0 | 40 | virtual void Init(nsIContent* aContent, |
michael@0 | 41 | nsIFrame* aParent, |
michael@0 | 42 | nsIFrame* aPrevInFlow) MOZ_OVERRIDE; |
michael@0 | 43 | |
michael@0 | 44 | virtual nsresult GetCursor(const nsPoint& aPoint, |
michael@0 | 45 | nsIFrame::Cursor& aCursor) MOZ_OVERRIDE; |
michael@0 | 46 | |
michael@0 | 47 | NS_IMETHOD DoLayout(nsBoxLayoutState& aBoxLayoutState) MOZ_OVERRIDE; |
michael@0 | 48 | |
michael@0 | 49 | NS_IMETHOD HandlePress(nsPresContext* aPresContext, |
michael@0 | 50 | mozilla::WidgetGUIEvent* aEvent, |
michael@0 | 51 | nsEventStatus* aEventStatus) MOZ_OVERRIDE; |
michael@0 | 52 | |
michael@0 | 53 | NS_IMETHOD HandleMultiplePress(nsPresContext* aPresContext, |
michael@0 | 54 | mozilla::WidgetGUIEvent* aEvent, |
michael@0 | 55 | nsEventStatus* aEventStatus, |
michael@0 | 56 | bool aControlHeld) MOZ_OVERRIDE; |
michael@0 | 57 | |
michael@0 | 58 | NS_IMETHOD HandleDrag(nsPresContext* aPresContext, |
michael@0 | 59 | mozilla::WidgetGUIEvent* aEvent, |
michael@0 | 60 | nsEventStatus* aEventStatus) MOZ_OVERRIDE; |
michael@0 | 61 | |
michael@0 | 62 | NS_IMETHOD HandleRelease(nsPresContext* aPresContext, |
michael@0 | 63 | mozilla::WidgetGUIEvent* aEvent, |
michael@0 | 64 | nsEventStatus* aEventStatus) MOZ_OVERRIDE; |
michael@0 | 65 | |
michael@0 | 66 | virtual nsresult HandleEvent(nsPresContext* aPresContext, |
michael@0 | 67 | mozilla::WidgetGUIEvent* aEvent, |
michael@0 | 68 | nsEventStatus* aEventStatus) MOZ_OVERRIDE; |
michael@0 | 69 | |
michael@0 | 70 | virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder, |
michael@0 | 71 | const nsRect& aDirtyRect, |
michael@0 | 72 | const nsDisplayListSet& aLists) MOZ_OVERRIDE; |
michael@0 | 73 | |
michael@0 | 74 | virtual void GetInitialOrientation(bool& aIsHorizontal) MOZ_OVERRIDE; |
michael@0 | 75 | |
michael@0 | 76 | private: |
michael@0 | 77 | |
michael@0 | 78 | friend class nsSplitterFrameInner; |
michael@0 | 79 | nsSplitterFrameInner* mInner; |
michael@0 | 80 | |
michael@0 | 81 | }; // class nsSplitterFrame |
michael@0 | 82 | |
michael@0 | 83 | #endif |