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-02-07 08:47:48 +00:00
|
|
|
|
|
|
|
#ifndef nsMathMLmactionFrame_h___
|
|
|
|
#define nsMathMLmactionFrame_h___
|
|
|
|
|
|
|
|
#include "nsCOMPtr.h"
|
2013-05-10 12:40:44 +00:00
|
|
|
#include "nsMathMLSelectedFrame.h"
|
2011-06-28 17:59:14 +00:00
|
|
|
#include "nsIDOMEventListener.h"
|
2012-06-19 03:26:34 +00:00
|
|
|
#include "mozilla/Attributes.h"
|
2000-02-07 08:47:48 +00:00
|
|
|
|
2019-04-16 07:24:49 +00:00
|
|
|
namespace mozilla {
|
|
|
|
class PresShell;
|
|
|
|
} // namespace mozilla
|
|
|
|
|
2000-02-07 08:47:48 +00:00
|
|
|
//
|
|
|
|
// <maction> -- bind actions to a subexpression
|
|
|
|
//
|
|
|
|
|
2018-09-06 01:23:14 +00:00
|
|
|
class nsMathMLmactionFrame final : public nsMathMLSelectedFrame {
|
2000-02-07 08:47:48 +00:00
|
|
|
public:
|
2017-05-26 10:11:11 +00:00
|
|
|
NS_DECL_FRAMEARENA_HELPERS(nsMathMLmactionFrame)
|
2009-09-12 16:49:24 +00:00
|
|
|
|
2019-04-16 07:24:49 +00:00
|
|
|
friend nsIFrame* NS_NewMathMLmactionFrame(mozilla::PresShell* aPresShell,
|
2018-03-22 18:20:41 +00:00
|
|
|
ComputedStyle* aStyle);
|
2000-02-07 08:47:48 +00:00
|
|
|
|
2014-05-24 22:20:40 +00:00
|
|
|
virtual void Init(nsIContent* aContent, nsContainerFrame* aParent,
|
2015-03-21 16:28:04 +00:00
|
|
|
nsIFrame* aPrevInFlow) override;
|
2000-02-07 08:47:48 +00:00
|
|
|
|
2011-08-24 20:54:30 +00:00
|
|
|
virtual void SetInitialChildList(ChildListID aListID,
|
2015-03-21 16:28:04 +00:00
|
|
|
nsFrameList& aChildList) override;
|
2000-02-07 08:47:48 +00:00
|
|
|
|
2015-03-21 16:28:04 +00:00
|
|
|
virtual nsresult ChildListChanged(int32_t aModType) override;
|
2001-05-19 12:09:41 +00:00
|
|
|
|
2012-08-22 15:56:38 +00:00
|
|
|
virtual nsresult AttributeChanged(int32_t aNameSpaceID, nsAtom* aAttribute,
|
2015-03-21 16:28:04 +00:00
|
|
|
int32_t aModType) override;
|
2012-05-18 17:35:43 +00:00
|
|
|
|
2009-11-03 22:43:39 +00:00
|
|
|
private:
|
|
|
|
void MouseClick();
|
|
|
|
void MouseOver();
|
|
|
|
void MouseOut();
|
2000-02-07 08:47:48 +00:00
|
|
|
|
2015-03-21 16:28:04 +00:00
|
|
|
class MouseListener final : public nsIDOMEventListener {
|
2014-06-23 22:40:01 +00:00
|
|
|
private:
|
|
|
|
~MouseListener() {}
|
|
|
|
|
|
|
|
public:
|
2009-11-03 22:43:39 +00:00
|
|
|
NS_DECL_ISUPPORTS
|
2011-06-28 17:59:14 +00:00
|
|
|
NS_DECL_NSIDOMEVENTLISTENER
|
2009-11-03 22:43:39 +00:00
|
|
|
|
2014-09-01 03:36:37 +00:00
|
|
|
explicit MouseListener(nsMathMLmactionFrame* aOwner) : mOwner(aOwner) {}
|
2009-11-03 22:43:39 +00:00
|
|
|
|
|
|
|
nsMathMLmactionFrame* mOwner;
|
|
|
|
};
|
2000-02-07 08:47:48 +00:00
|
|
|
|
|
|
|
protected:
|
2019-02-05 16:45:54 +00:00
|
|
|
explicit nsMathMLmactionFrame(ComputedStyle* aStyle,
|
|
|
|
nsPresContext* aPresContext)
|
|
|
|
: nsMathMLSelectedFrame(aStyle, aPresContext, kClassID) {}
|
2000-02-07 08:47:48 +00:00
|
|
|
virtual ~nsMathMLmactionFrame();
|
2017-07-06 12:00:35 +00:00
|
|
|
|
2000-02-07 08:47:48 +00:00
|
|
|
private:
|
2012-08-22 15:56:38 +00:00
|
|
|
int32_t mActionType;
|
|
|
|
int32_t mChildCount;
|
|
|
|
int32_t mSelection;
|
2015-10-18 05:24:48 +00:00
|
|
|
RefPtr<MouseListener> mListener;
|
2000-02-07 08:47:48 +00:00
|
|
|
|
|
|
|
// helper to return the frame for the attribute selection="number"
|
2015-03-21 16:28:04 +00:00
|
|
|
nsIFrame* GetSelectedFrame() override;
|
2000-02-07 08:47:48 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* nsMathMLmactionFrame_h___ */
|