nsSplitterFrame.h 2.7 KB

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