layout/mathml/nsMathMLmactionFrame.h

Thu, 15 Jan 2015 21:03:48 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 21:03:48 +0100
branch
TOR_BUG_9701
changeset 11
deefc01c0e14
permissions
-rw-r--r--

Integrate friendly tips from Tor colleagues to make (or not) 4.5 alpha 3;
This includes removal of overloaded (but unused) methods, and addition of
a overlooked call to DataStruct::SetData(nsISupports, uint32_t, bool.)

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

mercurial