Bumping manifests a=b2g-bump
[gecko.git] / layout / mathml / nsMathMLmactionFrame.h
blob90b7c956e77e0e4966d530ed16201cf11744352b
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 #ifndef nsMathMLmactionFrame_h___
7 #define nsMathMLmactionFrame_h___
9 #include "nsCOMPtr.h"
10 #include "nsMathMLSelectedFrame.h"
11 #include "nsIDOMEventListener.h"
12 #include "mozilla/Attributes.h"
15 // <maction> -- bind actions to a subexpression
18 class nsMathMLmactionFrame : public nsMathMLSelectedFrame {
19 public:
20 NS_DECL_FRAMEARENA_HELPERS
22 friend nsIFrame* NS_NewMathMLmactionFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
24 virtual void
25 Init(nsIContent* aContent,
26 nsContainerFrame* aParent,
27 nsIFrame* aPrevInFlow) MOZ_OVERRIDE;
29 virtual void
30 SetInitialChildList(ChildListID aListID,
31 nsFrameList& aChildList) MOZ_OVERRIDE;
33 virtual nsresult
34 ChildListChanged(int32_t aModType) MOZ_OVERRIDE;
36 virtual nsresult
37 AttributeChanged(int32_t aNameSpaceID,
38 nsIAtom* aAttribute,
39 int32_t aModType) MOZ_OVERRIDE;
41 private:
42 void MouseClick();
43 void MouseOver();
44 void MouseOut();
46 class MouseListener MOZ_FINAL : public nsIDOMEventListener
48 private:
49 ~MouseListener() {}
51 public:
52 NS_DECL_ISUPPORTS
53 NS_DECL_NSIDOMEVENTLISTENER
55 explicit MouseListener(nsMathMLmactionFrame* aOwner) : mOwner(aOwner) { }
57 nsMathMLmactionFrame* mOwner;
60 protected:
61 explicit nsMathMLmactionFrame(nsStyleContext* aContext) :
62 nsMathMLSelectedFrame(aContext) {}
63 virtual ~nsMathMLmactionFrame();
65 private:
66 int32_t mActionType;
67 int32_t mChildCount;
68 int32_t mSelection;
69 nsRefPtr<MouseListener> mListener;
71 // helper to return the frame for the attribute selection="number"
72 nsIFrame*
73 GetSelectedFrame() MOZ_OVERRIDE;
76 #endif /* nsMathMLmactionFrame_h___ */