layout/xul/nsBoxObject.h

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/layout/xul/nsBoxObject.h	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,55 @@
     1.4 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
     1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public
     1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     1.8 +#ifndef nsBoxObject_h_
     1.9 +#define nsBoxObject_h_
    1.10 +
    1.11 +#include "mozilla/Attributes.h"
    1.12 +#include "nsCOMPtr.h"
    1.13 +#include "nsIBoxObject.h"
    1.14 +#include "nsPIBoxObject.h"
    1.15 +#include "nsPoint.h"
    1.16 +#include "nsAutoPtr.h"
    1.17 +#include "nsHashKeys.h"
    1.18 +#include "nsInterfaceHashtable.h"
    1.19 +#include "nsCycleCollectionParticipant.h"
    1.20 +
    1.21 +class nsIFrame;
    1.22 +class nsIDocShell;
    1.23 +struct nsIntRect;
    1.24 +class nsIPresShell;
    1.25 +
    1.26 +class nsBoxObject : public nsPIBoxObject
    1.27 +{
    1.28 +  NS_DECL_CYCLE_COLLECTING_ISUPPORTS
    1.29 +  NS_DECL_CYCLE_COLLECTION_CLASS(nsBoxObject)
    1.30 +  NS_DECL_NSIBOXOBJECT
    1.31 +
    1.32 +public:
    1.33 +  nsBoxObject();
    1.34 +  virtual ~nsBoxObject();
    1.35 +
    1.36 +  // nsPIBoxObject
    1.37 +  virtual nsresult Init(nsIContent* aContent) MOZ_OVERRIDE;
    1.38 +  virtual void Clear() MOZ_OVERRIDE;
    1.39 +  virtual void ClearCachedValues() MOZ_OVERRIDE;
    1.40 +
    1.41 +  nsIFrame* GetFrame(bool aFlushLayout);
    1.42 +  nsIPresShell* GetPresShell(bool aFlushLayout);
    1.43 +  nsresult GetOffsetRect(nsIntRect& aRect);
    1.44 +  nsresult GetScreenPosition(nsIntPoint& aPoint);
    1.45 +
    1.46 +  // Given a parent frame and a child frame, find the frame whose
    1.47 +  // next sibling is the given child frame and return its element
    1.48 +  static nsresult GetPreviousSibling(nsIFrame* aParentFrame, nsIFrame* aFrame,
    1.49 +                                     nsIDOMElement** aResult);
    1.50 +
    1.51 +protected:
    1.52 +
    1.53 +  nsAutoPtr<nsInterfaceHashtable<nsStringHashKey,nsISupports> > mPropertyTable; //[OWNER]
    1.54 +
    1.55 +  nsIContent* mContent; // [WEAK]
    1.56 +};
    1.57 +
    1.58 +#endif

mercurial