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/. */
6 #ifndef nsTitleBarFrame_h___
7 #define nsTitleBarFrame_h___
9 #include "mozilla/Attributes.h"
10 #include "mozilla/EventForwards.h"
11 #include "nsBoxFrame.h"
13 class nsTitleBarFrame
: public nsBoxFrame
{
15 NS_DECL_FRAMEARENA_HELPERS(nsTitleBarFrame
)
17 friend nsIFrame
* NS_NewTitleBarFrame(nsIPresShell
* aPresShell
,
18 ComputedStyle
* aStyle
);
20 explicit nsTitleBarFrame(ComputedStyle
* aStyle
, nsPresContext
* aPresContext
,
23 virtual void BuildDisplayListForChildren(
24 nsDisplayListBuilder
* aBuilder
, const nsDisplayListSet
& aLists
) override
;
26 virtual nsresult
HandleEvent(nsPresContext
* aPresContext
,
27 mozilla::WidgetGUIEvent
* aEvent
,
28 nsEventStatus
* aEventStatus
) override
;
30 virtual void MouseClicked(mozilla::WidgetMouseEvent
* aEvent
);
32 void UpdateMouseThrough() override
{
33 AddStateBits(NS_FRAME_MOUSE_THROUGH_NEVER
);
37 bool mTrackingMouseMove
;
38 mozilla::LayoutDeviceIntPoint mLastPoint
;
40 }; // class nsTitleBarFrame
42 #endif /* nsTitleBarFrame_h___ */