nsTitleBarFrame.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839
  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. #ifndef nsTitleBarFrame_h___
  6. #define nsTitleBarFrame_h___
  7. #include "mozilla/Attributes.h"
  8. #include "mozilla/EventForwards.h"
  9. #include "nsBoxFrame.h"
  10. class nsTitleBarFrame : public nsBoxFrame
  11. {
  12. public:
  13. NS_DECL_FRAMEARENA_HELPERS
  14. friend nsIFrame* NS_NewTitleBarFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
  15. explicit nsTitleBarFrame(nsStyleContext* aContext);
  16. virtual void BuildDisplayListForChildren(nsDisplayListBuilder* aBuilder,
  17. const nsDisplayListSet& aLists) override;
  18. virtual nsresult HandleEvent(nsPresContext* aPresContext,
  19. mozilla::WidgetGUIEvent* aEvent,
  20. nsEventStatus* aEventStatus) override;
  21. virtual void MouseClicked(mozilla::WidgetMouseEvent* aEvent);
  22. void UpdateMouseThrough() override { AddStateBits(NS_FRAME_MOUSE_THROUGH_NEVER); }
  23. protected:
  24. bool mTrackingMouseMove;
  25. mozilla::LayoutDeviceIntPoint mLastPoint;
  26. }; // class nsTitleBarFrame
  27. #endif /* nsTitleBarFrame_h___ */