2007-06-11 23:10:23 -07:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
2012-05-21 04:12:37 -07: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/. */
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
#ifndef nsMathMLmactionFrame_h___
|
|
|
|
#define nsMathMLmactionFrame_h___
|
|
|
|
|
|
|
|
#include "nsCOMPtr.h"
|
2013-05-10 05:40:44 -07:00
|
|
|
#include "nsMathMLSelectedFrame.h"
|
2011-06-28 10:59:14 -07:00
|
|
|
#include "nsIDOMEventListener.h"
|
2012-06-18 20:26:34 -07:00
|
|
|
#include "mozilla/Attributes.h"
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
//
|
|
|
|
// <maction> -- bind actions to a subexpression
|
|
|
|
//
|
|
|
|
|
2013-05-10 05:40:44 -07:00
|
|
|
class nsMathMLmactionFrame : public nsMathMLSelectedFrame {
|
2007-03-22 10:30:00 -07:00
|
|
|
public:
|
2009-09-12 09:49:24 -07:00
|
|
|
NS_DECL_FRAMEARENA_HELPERS
|
|
|
|
|
2007-03-22 10:30:00 -07:00
|
|
|
friend nsIFrame* NS_NewMathMLmactionFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
|
|
|
|
|
2013-03-19 18:47:48 -07:00
|
|
|
virtual void
|
2014-05-24 15:20:40 -07:00
|
|
|
Init(nsIContent* aContent,
|
|
|
|
nsContainerFrame* aParent,
|
|
|
|
nsIFrame* aPrevInFlow) MOZ_OVERRIDE;
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2014-05-28 12:36:58 -07:00
|
|
|
virtual void
|
2011-08-24 13:54:30 -07:00
|
|
|
SetInitialChildList(ChildListID aListID,
|
2013-05-29 12:37:49 -07:00
|
|
|
nsFrameList& aChildList) MOZ_OVERRIDE;
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
virtual nsresult
|
2013-05-29 12:37:49 -07:00
|
|
|
ChildListChanged(int32_t aModType) MOZ_OVERRIDE;
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2014-02-17 23:47:48 -08:00
|
|
|
virtual nsresult
|
2012-08-22 08:56:38 -07:00
|
|
|
AttributeChanged(int32_t aNameSpaceID,
|
2012-05-18 10:35:43 -07:00
|
|
|
nsIAtom* aAttribute,
|
2013-05-29 12:37:49 -07:00
|
|
|
int32_t aModType) MOZ_OVERRIDE;
|
2012-05-18 10:35:43 -07:00
|
|
|
|
2009-11-03 14:43:39 -08:00
|
|
|
private:
|
|
|
|
void MouseClick();
|
|
|
|
void MouseOver();
|
|
|
|
void MouseOut();
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2012-06-18 20:26:34 -07:00
|
|
|
class MouseListener MOZ_FINAL : public nsIDOMEventListener
|
2011-06-28 10:59:14 -07:00
|
|
|
{
|
2014-06-23 15:40:01 -07:00
|
|
|
private:
|
|
|
|
~MouseListener() {}
|
|
|
|
|
|
|
|
public:
|
2009-11-03 14:43:39 -08:00
|
|
|
NS_DECL_ISUPPORTS
|
2011-06-28 10:59:14 -07:00
|
|
|
NS_DECL_NSIDOMEVENTLISTENER
|
2009-11-03 14:43:39 -08:00
|
|
|
|
2012-12-09 09:23:19 -08:00
|
|
|
MouseListener(nsMathMLmactionFrame* aOwner) : mOwner(aOwner) { }
|
2009-11-03 14:43:39 -08:00
|
|
|
|
|
|
|
nsMathMLmactionFrame* mOwner;
|
|
|
|
};
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
protected:
|
2013-05-10 05:40:44 -07:00
|
|
|
nsMathMLmactionFrame(nsStyleContext* aContext) :
|
|
|
|
nsMathMLSelectedFrame(aContext) {}
|
2007-03-22 10:30:00 -07:00
|
|
|
virtual ~nsMathMLmactionFrame();
|
|
|
|
|
|
|
|
private:
|
2012-08-22 08:56:38 -07:00
|
|
|
int32_t mActionType;
|
|
|
|
int32_t mChildCount;
|
|
|
|
int32_t mSelection;
|
2014-03-17 17:23:03 -07:00
|
|
|
nsRefPtr<MouseListener> mListener;
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
// helper to return the frame for the attribute selection="number"
|
|
|
|
nsIFrame*
|
2013-05-29 12:37:49 -07:00
|
|
|
GetSelectedFrame() MOZ_OVERRIDE;
|
2007-03-22 10:30:00 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* nsMathMLmactionFrame_h___ */
|