2017-10-27 17:33:53 +00:00
|
|
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
2012-05-21 11:12:37 +00:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
2000-07-11 23:37:00 +00:00
|
|
|
#ifndef nsTitleBarFrame_h___
|
|
|
|
#define nsTitleBarFrame_h___
|
|
|
|
|
2012-09-14 16:10:08 +00:00
|
|
|
#include "mozilla/Attributes.h"
|
2013-10-28 09:03:19 +00:00
|
|
|
#include "mozilla/EventForwards.h"
|
2000-07-11 23:37:00 +00:00
|
|
|
#include "nsBoxFrame.h"
|
|
|
|
|
2017-07-06 12:00:35 +00:00
|
|
|
class nsTitleBarFrame : public nsBoxFrame {
|
2000-07-11 23:37:00 +00:00
|
|
|
public:
|
2017-05-26 10:11:11 +00:00
|
|
|
NS_DECL_FRAMEARENA_HELPERS(nsTitleBarFrame)
|
2009-09-12 16:49:24 +00:00
|
|
|
|
2018-03-22 18:20:41 +00:00
|
|
|
friend nsIFrame* NS_NewTitleBarFrame(nsIPresShell* aPresShell,
|
|
|
|
ComputedStyle* aStyle);
|
2000-07-11 23:37:00 +00:00
|
|
|
|
2019-02-05 16:45:54 +00:00
|
|
|
explicit nsTitleBarFrame(ComputedStyle* aStyle, nsPresContext* aPresContext,
|
|
|
|
ClassID = kClassID);
|
2000-07-11 23:37:00 +00:00
|
|
|
|
2013-02-14 11:12:27 +00:00
|
|
|
virtual void BuildDisplayListForChildren(
|
2015-03-21 16:28:04 +00:00
|
|
|
nsDisplayListBuilder* aBuilder, const nsDisplayListSet& aLists) override;
|
2000-07-11 23:37:00 +00:00
|
|
|
|
2014-02-18 07:47:48 +00:00
|
|
|
virtual nsresult HandleEvent(nsPresContext* aPresContext,
|
2014-02-18 08:36:33 +00:00
|
|
|
mozilla::WidgetGUIEvent* aEvent,
|
2015-03-21 16:28:04 +00:00
|
|
|
nsEventStatus* aEventStatus) override;
|
2000-07-11 23:37:00 +00:00
|
|
|
|
2015-12-07 23:30:05 +00:00
|
|
|
virtual void MouseClicked(mozilla::WidgetMouseEvent* aEvent);
|
2000-07-11 23:37:00 +00:00
|
|
|
|
2015-03-21 16:28:04 +00:00
|
|
|
void UpdateMouseThrough() override {
|
|
|
|
AddStateBits(NS_FRAME_MOUSE_THROUGH_NEVER);
|
|
|
|
}
|
2010-11-30 14:59:46 +00:00
|
|
|
|
2000-07-11 23:37:00 +00:00
|
|
|
protected:
|
2015-02-04 20:21:03 +00:00
|
|
|
bool mTrackingMouseMove;
|
|
|
|
mozilla::LayoutDeviceIntPoint mLastPoint;
|
2000-07-11 23:37:00 +00:00
|
|
|
|
|
|
|
}; // class nsTitleBarFrame
|
|
|
|
|
|
|
|
#endif /* nsTitleBarFrame_h___ */
|