Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions | Public Attributes
nsMargin Struct Reference

#include <nsMargin.h>

List of all members.

Public Member Functions

 nsMargin ()
 nsMargin (const nsMargin &aMargin)
 nsMargin (nscoord aLeft, nscoord aTop, nscoord aRight, nscoord aBottom)
void SizeTo (nscoord aLeft, nscoord aTop, nscoord aRight, nscoord aBottom)
void SizeBy (nscoord aLeft, nscoord aTop, nscoord aRight, nscoord aBottom)
nscoord LeftRight () const
nscoord TopBottom () const
nscoordside (PRUint8 aSide)
nscoord side (PRUint8 aSide) const
PRBool operator== (const nsMargin &aMargin) const
PRBool operator!= (const nsMargin &aMargin) const
nsMargin operator+ (const nsMargin &aMargin) const
nsMargin operator- (const nsMargin &aMargin) const
nsMarginoperator+= (const nsMargin &aMargin)
nsMarginoperator-= (const nsMargin &aMargin)

Public Attributes

nscoord top
nscoord right
nscoord bottom
nscoord left

Detailed Description

Definition at line 44 of file nsMargin.h.


Constructor & Destructor Documentation

nsMargin::nsMargin ( ) [inline]

Definition at line 48 of file nsMargin.h.

{}

Here is the caller graph for this function:

nsMargin::nsMargin ( const nsMargin aMargin) [inline]

Definition at line 49 of file nsMargin.h.

{*this = aMargin;}
nsMargin::nsMargin ( nscoord  aLeft,
nscoord  aTop,
nscoord  aRight,
nscoord  aBottom 
) [inline]

Definition at line 50 of file nsMargin.h.

                                            {left = aLeft; top = aTop;
                                             right = aRight; bottom = aBottom;}

Member Function Documentation

nscoord nsMargin::LeftRight ( ) const [inline]

Definition at line 61 of file nsMargin.h.

{ return left + right; }

Here is the caller graph for this function:

PRBool nsMargin::operator!= ( const nsMargin aMargin) const [inline]

Definition at line 84 of file nsMargin.h.

                                                   {
    return (PRBool) ((left != aMargin.left) || (top != aMargin.top) ||
                     (right != aMargin.right) || (bottom != aMargin.bottom));
  }
nsMargin nsMargin::operator+ ( const nsMargin aMargin) const [inline]

Definition at line 88 of file nsMargin.h.

                                                    {
    return nsMargin(left + aMargin.left, top + aMargin.top,
                    right + aMargin.right, bottom + aMargin.bottom);
  }

Here is the call graph for this function:

nsMargin& nsMargin::operator+= ( const nsMargin aMargin) [inline]

Definition at line 96 of file nsMargin.h.

                                                {left += aMargin.left;
                                                 top += aMargin.top;
                                                 right += aMargin.right;
                                                 bottom += aMargin.bottom;
                                                 return *this;}
nsMargin nsMargin::operator- ( const nsMargin aMargin) const [inline]

Definition at line 92 of file nsMargin.h.

                                                    {
    return nsMargin(left - aMargin.left, top - aMargin.top,
                    right - aMargin.right, bottom - aMargin.bottom);
  }

Here is the call graph for this function:

nsMargin& nsMargin::operator-= ( const nsMargin aMargin) [inline]

Definition at line 101 of file nsMargin.h.

                                                {left -= aMargin.left;
                                                 top -= aMargin.top;
                                                 right -= aMargin.right;
                                                 bottom -= aMargin.bottom;
                                                 return *this;}
PRBool nsMargin::operator== ( const nsMargin aMargin) const [inline]

Definition at line 80 of file nsMargin.h.

                                                   {
    return (PRBool) ((left == aMargin.left) && (top == aMargin.top) &&
                     (right == aMargin.right) && (bottom == aMargin.bottom));
  }
nscoord& nsMargin::side ( PRUint8  aSide) [inline]

Definition at line 65 of file nsMargin.h.

                               {
    NS_PRECONDITION(aSide <= NS_SIDE_LEFT, "Out of range side");
    return *(&top + aSide);
  }    

Here is the caller graph for this function:

nscoord nsMargin::side ( PRUint8  aSide) const [inline]

Definition at line 70 of file nsMargin.h.

                                    {
    NS_PRECONDITION(aSide <= NS_SIDE_LEFT, "Out of range side");
    return *(&top + aSide);
  }    
void nsMargin::SizeBy ( nscoord  aLeft,
nscoord  aTop,
nscoord  aRight,
nscoord  aBottom 
) [inline]

Definition at line 57 of file nsMargin.h.

                                               {left += aLeft; top += aTop;
                                                right += aRight; bottom += aBottom;}
void nsMargin::SizeTo ( nscoord  aLeft,
nscoord  aTop,
nscoord  aRight,
nscoord  aBottom 
) [inline]

Definition at line 54 of file nsMargin.h.

                                               {left = aLeft; top = aTop;
                                                right = aRight; bottom = aBottom;}

Here is the caller graph for this function:

nscoord nsMargin::TopBottom ( ) const [inline]

Definition at line 62 of file nsMargin.h.

{ return top + bottom; }

Here is the caller graph for this function:


Member Data Documentation

Definition at line 45 of file nsMargin.h.

Definition at line 45 of file nsMargin.h.

Definition at line 45 of file nsMargin.h.

Definition at line 45 of file nsMargin.h.


The documentation for this struct was generated from the following file: