gecko-dev/layout/xul/nsBoxObject.h

56 lines
1.6 KiB
C
Raw Normal View History

/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
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/. */
#ifndef nsBoxObject_h_
#define nsBoxObject_h_
#include "mozilla/Attributes.h"
2000-05-30 07:59:13 +00:00
#include "nsCOMPtr.h"
#include "nsIBoxObject.h"
#include "nsPIBoxObject.h"
#include "nsPoint.h"
#include "nsAutoPtr.h"
#include "nsHashKeys.h"
#include "nsInterfaceHashtable.h"
#include "nsCycleCollectionParticipant.h"
2000-05-30 07:59:13 +00:00
class nsIFrame;
class nsIDocShell;
struct nsIntRect;
class nsIPresShell;
2000-05-30 07:59:13 +00:00
class nsBoxObject : public nsPIBoxObject
2000-05-30 07:59:13 +00:00
{
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
NS_DECL_CYCLE_COLLECTION_CLASS(nsBoxObject)
2000-05-30 07:59:13 +00:00
NS_DECL_NSIBOXOBJECT
public:
nsBoxObject();
// nsPIBoxObject
virtual nsresult Init(nsIContent* aContent) MOZ_OVERRIDE;
virtual void Clear() MOZ_OVERRIDE;
virtual void ClearCachedValues() MOZ_OVERRIDE;
2000-05-30 07:59:13 +00:00
nsIFrame* GetFrame(bool aFlushLayout);
nsIPresShell* GetPresShell(bool aFlushLayout);
nsresult GetOffsetRect(nsIntRect& aRect);
nsresult GetScreenPosition(nsIntPoint& aPoint);
// Given a parent frame and a child frame, find the frame whose
// next sibling is the given child frame and return its element
static nsresult GetPreviousSibling(nsIFrame* aParentFrame, nsIFrame* aFrame,
nsIDOMElement** aResult);
2000-05-30 07:59:13 +00:00
protected:
virtual ~nsBoxObject();
nsAutoPtr<nsInterfaceHashtable<nsStringHashKey,nsISupports> > mPropertyTable; //[OWNER]
2000-10-02 23:23:55 +00:00
2000-05-30 07:59:13 +00:00
nsIContent* mContent; // [WEAK]
};
#endif