Back to index

lightning-sunbird  0.9+nobinonly
Classes | Defines | Functions
nsSprocketLayout.h File Reference
#include "nsBoxLayout.h"
#include "nsCOMPtr.h"
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  nsBoxSize
class  nsComputedBoxSize
class  nsSprocketLayout

Defines

#define GET_WIDTH(size, isHorizontal)   (isHorizontal ? size.width : size.height)
#define GET_HEIGHT(size, isHorizontal)   (isHorizontal ? size.height : size.width)
#define GET_X(size, isHorizontal)   (isHorizontal ? size.x : size.y)
#define GET_Y(size, isHorizontal)   (isHorizontal ? size.y : size.x)
#define GET_COORD(aX, aY, isHorizontal)   (isHorizontal ? aX : aY)
#define SET_WIDTH(size, coord, isHorizontal)   if (isHorizontal) { (size).width = (coord); } else { (size).height = (coord); }
#define SET_HEIGHT(size, coord, isHorizontal)   if (isHorizontal) { (size).height = (coord); } else { (size).width = (coord); }
#define SET_X(size, coord, isHorizontal)   if (isHorizontal) { (size).x = (coord); } else { (size).y = (coord); }
#define SET_Y(size, coord, isHorizontal)   if (isHorizontal) { (size).y = (coord); } else { (size).x = (coord); }
#define SET_COORD(aX, aY, coord, isHorizontal)   if (isHorizontal) { aX = (coord); } else { aY = (coord); }

Functions

nsresult NS_NewSprocketLayout (nsIPresShell *aPresShell, nsCOMPtr< nsIBoxLayout > &aNewLayout)

Define Documentation

#define GET_COORD (   aX,
  aY,
  isHorizontal 
)    (isHorizontal ? aX : aY)

Definition at line 96 of file nsSprocketLayout.h.

#define GET_HEIGHT (   size,
  isHorizontal 
)    (isHorizontal ? size.height : size.width)

Definition at line 93 of file nsSprocketLayout.h.

#define GET_WIDTH (   size,
  isHorizontal 
)    (isHorizontal ? size.width : size.height)

Definition at line 92 of file nsSprocketLayout.h.

#define GET_X (   size,
  isHorizontal 
)    (isHorizontal ? size.x : size.y)

Definition at line 94 of file nsSprocketLayout.h.

#define GET_Y (   size,
  isHorizontal 
)    (isHorizontal ? size.y : size.x)

Definition at line 95 of file nsSprocketLayout.h.

#define SET_COORD (   aX,
  aY,
  coord,
  isHorizontal 
)    if (isHorizontal) { aX = (coord); } else { aY = (coord); }

Definition at line 103 of file nsSprocketLayout.h.

#define SET_HEIGHT (   size,
  coord,
  isHorizontal 
)    if (isHorizontal) { (size).height = (coord); } else { (size).width = (coord); }

Definition at line 99 of file nsSprocketLayout.h.

#define SET_WIDTH (   size,
  coord,
  isHorizontal 
)    if (isHorizontal) { (size).width = (coord); } else { (size).height = (coord); }

Definition at line 98 of file nsSprocketLayout.h.

#define SET_X (   size,
  coord,
  isHorizontal 
)    if (isHorizontal) { (size).x = (coord); } else { (size).y = (coord); }

Definition at line 100 of file nsSprocketLayout.h.

#define SET_Y (   size,
  coord,
  isHorizontal 
)    if (isHorizontal) { (size).y = (coord); } else { (size).x = (coord); }

Definition at line 101 of file nsSprocketLayout.h.


Function Documentation

nsresult NS_NewSprocketLayout ( nsIPresShell aPresShell,
nsCOMPtr< nsIBoxLayout > &  aNewLayout 
)

Definition at line 71 of file nsSprocketLayout.cpp.

{
  if (!nsSprocketLayout::gInstance) {
    nsSprocketLayout::gInstance = new nsSprocketLayout();
    NS_IF_ADDREF(nsSprocketLayout::gInstance);
  }
  // we have not instance variables so just return our static one.
  aNewLayout = nsSprocketLayout::gInstance;
  return NS_OK;
} 

Here is the caller graph for this function: