Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions | Static Public Member Functions
nsBoxLayout Class Reference

#include <nsBoxLayout.h>

Inheritance diagram for nsBoxLayout:
Inheritance graph
[legend]
Collaboration diagram for nsBoxLayout:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 nsBoxLayout ()
virtual ~nsBoxLayout ()
NS_DECL_ISUPPORTS NS_IMETHOD Layout (nsIBox *aBox, nsBoxLayoutState &aState)
NS_IMETHOD GetPrefSize (nsIBox *aBox, nsBoxLayoutState &aBoxLayoutState, nsSize &aSize)
NS_IMETHOD GetMinSize (nsIBox *aBox, nsBoxLayoutState &aBoxLayoutState, nsSize &aSize)
NS_IMETHOD GetMaxSize (nsIBox *aBox, nsBoxLayoutState &aBoxLayoutState, nsSize &aSize)
NS_IMETHOD GetFlex (nsIBox *aBox, nsBoxLayoutState &aBoxLayoutState, nscoord &aFlex)
NS_IMETHOD GetAscent (nsIBox *aBox, nsBoxLayoutState &aBoxLayoutState, nscoord &aAscent)
NS_IMETHOD IsCollapsed (nsIBox *aBox, nsBoxLayoutState &aBoxLayoutState, PRBool &aCollapsed)
NS_IMETHOD ChildrenInserted (nsIBox *aBox, nsBoxLayoutState &aState, nsIBox *aPrevBox, nsIBox *aChildList)
NS_IMETHOD ChildrenAppended (nsIBox *aBox, nsBoxLayoutState &aState, nsIBox *aChildList)
NS_IMETHOD ChildrenRemoved (nsIBox *aBox, nsBoxLayoutState &aState, nsIBox *aChildList)
NS_IMETHOD ChildrenSet (nsIBox *aBox, nsBoxLayoutState &aState, nsIBox *aChildList)
NS_IMETHOD ChildBecameDirty (nsIBox *aBox, nsBoxLayoutState &aState, nsIBox *aChild)
NS_IMETHOD BecameDirty (nsIBox *aBox, nsBoxLayoutState &aState)
virtual void GetParentLayout (nsIBox *aBox, nsIBoxLayout **aParent)
virtual void AddBorderAndPadding (nsIBox *aBox, nsSize &aSize)
virtual void AddInset (nsIBox *aBox, nsSize &aSize)
virtual void AddMargin (nsIBox *aChild, nsSize &aSize)
virtual void AddMargin (nsSize &aSize, const nsMargin &aMargin)

Static Public Member Functions

static void AddLargestSize (nsSize &aSize, const nsSize &aToAdd)
static void AddSmallestSize (nsSize &aSize, const nsSize &aToAdd)

Detailed Description

Definition at line 43 of file nsBoxLayout.h.


Constructor & Destructor Documentation

Definition at line 57 of file nsBoxLayout.cpp.

{
}
virtual nsBoxLayout::~nsBoxLayout ( ) [inline, virtual]

Definition at line 48 of file nsBoxLayout.h.

{};

Member Function Documentation

void nsBoxLayout::AddBorderAndPadding ( nsIBox *  aBox,
nsSize aSize 
) [virtual]

Definition at line 76 of file nsBoxLayout.cpp.

{
  nsBox::AddBorderAndPadding(aBox, aSize);
}

Here is the caller graph for this function:

void nsBoxLayout::AddInset ( nsIBox *  aBox,
nsSize aSize 
) [virtual]

Definition at line 94 of file nsBoxLayout.cpp.

{
  nsBox::AddInset(aBox, aSize);
}

Here is the caller graph for this function:

void nsBoxLayout::AddLargestSize ( nsSize aSize,
const nsSize aToAdd 
) [static]

Definition at line 159 of file nsBoxLayout.cpp.

{
  if (aSize2.width > aSize.width)
     aSize.width = aSize2.width;

  if (aSize2.height > aSize.height)
     aSize.height = aSize2.height;
}

Here is the caller graph for this function:

void nsBoxLayout::AddMargin ( nsIBox *  aChild,
nsSize aSize 
) [virtual]

Definition at line 82 of file nsBoxLayout.cpp.

{
  nsBox::AddMargin(aBox, aSize);
}

Here is the caller graph for this function:

void nsBoxLayout::AddMargin ( nsSize aSize,
const nsMargin aMargin 
) [virtual]

Definition at line 88 of file nsBoxLayout.cpp.

{
  nsBox::AddMargin(aSize, aMargin);
}

Here is the call graph for this function:

void nsBoxLayout::AddSmallestSize ( nsSize aSize,
const nsSize aToAdd 
) [static]

Definition at line 169 of file nsBoxLayout.cpp.

{
  if (aSize2.width < aSize.width)
     aSize.width = aSize2.width;

  if (aSize2.height < aSize.height)
     aSize.height = aSize2.height;
}

Here is the caller graph for this function:

NS_IMETHODIMP nsBoxLayout::BecameDirty ( nsIBox *  aBox,
nsBoxLayoutState aState 
) [virtual]

Implements nsIBoxLayout.

Reimplemented in nsGridRowLeafLayout.

Definition at line 209 of file nsBoxLayout.cpp.

{
  return NS_OK;
}
NS_IMETHODIMP nsBoxLayout::ChildBecameDirty ( nsIBox *  aBox,
nsBoxLayoutState aState,
nsIBox *  aChild 
) [virtual]

Implements nsIBoxLayout.

Reimplemented in nsGridRowLeafLayout.

Definition at line 203 of file nsBoxLayout.cpp.

{
  return NS_OK;
}
NS_IMETHODIMP nsBoxLayout::ChildrenAppended ( nsIBox *  aBox,
nsBoxLayoutState aState,
nsIBox *  aChildList 
) [virtual]

Implements nsIBoxLayout.

Reimplemented in nsGridLayout2, and nsGridRowLayout.

Definition at line 185 of file nsBoxLayout.cpp.

{
  return NS_OK;
}
NS_IMETHODIMP nsBoxLayout::ChildrenInserted ( nsIBox *  aBox,
nsBoxLayoutState aState,
nsIBox *  aPrevBox,
nsIBox *  aChildList 
) [virtual]

Implements nsIBoxLayout.

Reimplemented in nsGridLayout2, and nsGridRowLayout.

Definition at line 179 of file nsBoxLayout.cpp.

{
  return NS_OK;
}
NS_IMETHODIMP nsBoxLayout::ChildrenRemoved ( nsIBox *  aBox,
nsBoxLayoutState aState,
nsIBox *  aChildList 
) [virtual]

Implements nsIBoxLayout.

Reimplemented in nsGridLayout2, and nsGridRowLayout.

Definition at line 191 of file nsBoxLayout.cpp.

{
  return NS_OK;
}
NS_IMETHODIMP nsBoxLayout::ChildrenSet ( nsIBox *  aBox,
nsBoxLayoutState aState,
nsIBox *  aChildList 
) [virtual]

Implements nsIBoxLayout.

Reimplemented in nsGridLayout2, and nsGridRowLayout.

Definition at line 197 of file nsBoxLayout.cpp.

{
  return NS_OK;
}
NS_IMETHODIMP nsBoxLayout::GetAscent ( nsIBox *  aBox,
nsBoxLayoutState aBoxLayoutState,
nscoord aAscent 
) [virtual]

Implements nsIBoxLayout.

Reimplemented in nsSprocketLayout, and nsStackLayout.

Definition at line 145 of file nsBoxLayout.cpp.

{
  aAscent = 0;
  return NS_OK;
}
NS_IMETHODIMP nsBoxLayout::GetFlex ( nsIBox *  aBox,
nsBoxLayoutState aBoxLayoutState,
nscoord aFlex 
) [virtual]

Implements nsIBoxLayout.

Reimplemented in nsSprocketLayout.

Definition at line 100 of file nsBoxLayout.cpp.

{
  return aBox->GetFlex(aState, aFlex);
}
NS_IMETHODIMP nsBoxLayout::GetMaxSize ( nsIBox *  aBox,
nsBoxLayoutState aBoxLayoutState,
nsSize aSize 
) [virtual]

Implements nsIBoxLayout.

Reimplemented in nsSprocketLayout, nsGridLayout2, nsStackLayout, nsGridRowGroupLayout, nsGridRowLeafLayout, and nsListBoxLayout.

Definition at line 134 of file nsBoxLayout.cpp.

{
  aSize.width = NS_INTRINSICSIZE;
  aSize.height = NS_INTRINSICSIZE;
  AddBorderAndPadding(aBox, aSize);
  AddInset(aBox, aSize);
  return NS_OK;
}

Here is the call graph for this function:

NS_IMETHODIMP nsBoxLayout::GetMinSize ( nsIBox *  aBox,
nsBoxLayoutState aBoxLayoutState,
nsSize aSize 
) [virtual]

Implements nsIBoxLayout.

Reimplemented in nsSprocketLayout, nsGridLayout2, nsStackLayout, nsGridRowLeafLayout, nsGridRowGroupLayout, and nsListBoxLayout.

Definition at line 124 of file nsBoxLayout.cpp.

{
  aSize.width = 0;
  aSize.height = 0;
  AddBorderAndPadding(aBox, aSize);
  AddInset(aBox, aSize);
  return NS_OK;
}

Here is the call graph for this function:

void nsBoxLayout::GetParentLayout ( nsIBox *  aBox,
nsIBoxLayout **  aParent 
) [virtual]

Definition at line 62 of file nsBoxLayout.cpp.

{
  nsIBox* parent = nsnull;
  aBox->GetParentBox(&parent);
  if (parent)
  {
    parent->GetLayoutManager(aParent);
    return;
  }

  *aParent = nsnull;
}
NS_IMETHODIMP nsBoxLayout::GetPrefSize ( nsIBox *  aBox,
nsBoxLayoutState aBoxLayoutState,
nsSize aSize 
) [virtual]

Implements nsIBoxLayout.

Reimplemented in nsSprocketLayout, nsGridLayout2, nsStackLayout, nsGridRowGroupLayout, nsGridRowLeafLayout, and nsListBoxLayout.

Definition at line 113 of file nsBoxLayout.cpp.

{
  aSize.width = 0;
  aSize.height = 0;
  AddBorderAndPadding(aBox, aSize);
  AddInset(aBox, aSize);

  return NS_OK;
}

Here is the call graph for this function:

NS_IMETHODIMP nsBoxLayout::IsCollapsed ( nsIBox *  aBox,
nsBoxLayoutState aBoxLayoutState,
PRBool aCollapsed 
) [virtual]

Implements nsIBoxLayout.

Reimplemented in nsSprocketLayout.

Definition at line 107 of file nsBoxLayout.cpp.

{
  return aBox->IsCollapsed(aState, aCollapsed);
}
NS_IMETHODIMP nsBoxLayout::Layout ( nsIBox *  aBox,
nsBoxLayoutState aState 
) [virtual]

Implements nsIBoxLayout.

Reimplemented in nsSprocketLayout, nsGridLayout2, nsGridRowLeafLayout, nsStackLayout, and nsListBoxLayout.

Definition at line 153 of file nsBoxLayout.cpp.

{
  return NS_OK;
}

The documentation for this class was generated from the following files: