2017-10-27 20:33:53 +03: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 15:12:37 +04: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-12 03:37:00 +04:00
|
|
|
#ifndef nsTitleBarFrame_h___
|
|
|
|
#define nsTitleBarFrame_h___
|
|
|
|
|
2012-09-14 20:10:08 +04:00
|
|
|
#include "mozilla/Attributes.h"
|
2013-10-28 13:03:19 +04:00
|
|
|
#include "mozilla/EventForwards.h"
|
2000-07-12 03:37:00 +04:00
|
|
|
#include "nsBoxFrame.h"
|
|
|
|
|
2019-04-16 10:24:49 +03:00
|
|
|
namespace mozilla {
|
|
|
|
class PresShell;
|
|
|
|
} // namespace mozilla
|
|
|
|
|
2017-07-06 15:00:35 +03:00
|
|
|
class nsTitleBarFrame : public nsBoxFrame {
|
2000-07-12 03:37:00 +04:00
|
|
|
public:
|
2017-05-26 13:11:11 +03:00
|
|
|
NS_DECL_FRAMEARENA_HELPERS(nsTitleBarFrame)
|
2009-09-12 20:49:24 +04:00
|
|
|
|
2019-04-16 10:24:49 +03:00
|
|
|
friend nsIFrame* NS_NewTitleBarFrame(mozilla::PresShell* aPresShell,
|
2018-03-22 21:20:41 +03:00
|
|
|
ComputedStyle* aStyle);
|
2000-07-12 03:37:00 +04:00
|
|
|
|
2019-02-05 19:45:54 +03:00
|
|
|
explicit nsTitleBarFrame(ComputedStyle* aStyle, nsPresContext* aPresContext,
|
|
|
|
ClassID = kClassID);
|
2000-07-12 03:37:00 +04:00
|
|
|
|
2013-02-14 15:12:27 +04:00
|
|
|
virtual void BuildDisplayListForChildren(
|
2015-03-21 19:28:04 +03:00
|
|
|
nsDisplayListBuilder* aBuilder, const nsDisplayListSet& aLists) override;
|
2000-07-12 03:37:00 +04:00
|
|
|
|
2014-02-18 11:47:48 +04:00
|
|
|
virtual nsresult HandleEvent(nsPresContext* aPresContext,
|
2014-02-18 12:36:33 +04:00
|
|
|
mozilla::WidgetGUIEvent* aEvent,
|
2015-03-21 19:28:04 +03:00
|
|
|
nsEventStatus* aEventStatus) override;
|
2000-07-12 03:37:00 +04:00
|
|
|
|
2015-12-08 02:30:05 +03:00
|
|
|
virtual void MouseClicked(mozilla::WidgetMouseEvent* aEvent);
|
2000-07-12 03:37:00 +04:00
|
|
|
|
2015-03-21 19:28:04 +03:00
|
|
|
void UpdateMouseThrough() override {
|
|
|
|
AddStateBits(NS_FRAME_MOUSE_THROUGH_NEVER);
|
|
|
|
}
|
2010-11-30 17:59:46 +03:00
|
|
|
|
2000-07-12 03:37:00 +04:00
|
|
|
protected:
|
2015-02-04 23:21:03 +03:00
|
|
|
bool mTrackingMouseMove;
|
|
|
|
mozilla::LayoutDeviceIntPoint mLastPoint;
|
2000-07-12 03:37:00 +04:00
|
|
|
|
|
|
|
}; // class nsTitleBarFrame
|
|
|
|
|
|
|
|
#endif /* nsTitleBarFrame_h___ */
|