Back to index

lightning-sunbird  0.9+nobinonly
Classes | Defines | Typedefs | Enumerations
nsIFrame.h File Reference
#include <stdio.h>
#include "nsISupports.h"
#include "nsEvent.h"
#include "nsStyleStruct.h"
#include "nsStyleContext.h"
#include "nsIContent.h"
#include "nsHTMLReflowMetrics.h"
#include "nsStyleStructList.h"

Go to the source code of this file.

Classes

class  nsIFrame
 A frame in the layout model. More...
struct  nsIFrame::Cursor
 This structure holds information about a cursor. More...
class  nsWeakFrame
 nsWeakFrame can be used to keep a reference to a nsIFrame in a safe way. More...

Defines

#define NS_IFRAME_IID
#define NS_FRAME_NOT_SPLITTABLE   0
#define NS_FRAME_SPLITTABLE   0x1
#define NS_FRAME_SPLITTABLE_NON_RECTANGULAR   0x3
#define NS_FRAME_IS_SPLITTABLE(type)   (0 != ((type) & NS_FRAME_SPLITTABLE))
#define NS_FRAME_IS_NOT_SPLITTABLE(type)   (0 == ((type) & NS_FRAME_SPLITTABLE))
#define NS_FRAME_IN_REFLOW   0x00000001
#define NS_FRAME_FIRST_REFLOW   0x00000002
#define NS_FRAME_OUTSIDE_CHILDREN   0x00000008
#define NS_FRAME_EXTERNAL_REFERENCE   0x00000010
#define NS_FRAME_REPLACED_ELEMENT   0x00000020
#define NS_FRAME_GENERATED_CONTENT   0x00000040
#define NS_FRAME_IS_BOX   0x00000080
#define NS_FRAME_OUT_OF_FLOW   0x00000100
#define NS_FRAME_SELECTED_CONTENT   0x00000200
#define NS_FRAME_IS_DIRTY   0x00000400
#define NS_FRAME_IS_UNFLOWABLE   0x00000800
#define NS_FRAME_HAS_DIRTY_CHILDREN   0x00001000
#define NS_FRAME_HAS_VIEW   0x00002000
#define NS_FRAME_INDEPENDENT_SELECTION   0x00004000
#define NS_FRAME_IS_SPECIAL   0x00008000
#define NS_FRAME_EXCLUDE_IGNORABLE_WHITESPACE   0x00010000
#define NS_FRAME_HAS_CHILD_WITH_VIEW   0x00040000
#define NS_FRAME_REFLOW_ROOT   0x00080000
#define NS_FRAME_RESERVED   0x000FFFFF
#define NS_FRAME_IMPL_RESERVED   0xFFF00000
#define NS_STATE_IS_HORIZONTAL   0x00400000
#define NS_STATE_IS_DIRECTION_NORMAL   0x80000000
#define NS_CARRIED_TOP_MARGIN_IS_AUTO   0x1
#define NS_CARRIED_BOTTOM_MARGIN_IS_AUTO   0x2
#define NS_FRAME_PAINT_LAYER_BACKGROUND   eFramePaintLayer_Underlay
#define NS_FRAME_PAINT_LAYER_FLOATS   eFramePaintLayer_Content
#define NS_FRAME_PAINT_LAYER_FOREGROUND   eFramePaintLayer_Overlay
#define NS_FRAME_PAINT_LAYER_DEBUG   eFramePaintLayer_Overlay
#define NS_FRAME_PAINT_LAYER_ALL
#define NS_FRAME_COMPLETE   0
#define NS_FRAME_NOT_COMPLETE   0x1
#define NS_FRAME_REFLOW_NEXTINFLOW   0x2
#define NS_FRAME_IS_COMPLETE(status)   (0 == ((status) & NS_FRAME_NOT_COMPLETE))
#define NS_FRAME_IS_NOT_COMPLETE(status)   (0 != ((status) & NS_FRAME_NOT_COMPLETE))
#define NS_IS_REFLOW_ERROR(_status)   (PRInt32(_status) < 0)
#define NS_INLINE_BREAK   0x0100
 Extensions to the reflow status bits defined by nsIFrameReflow.
#define NS_INLINE_BREAK_BEFORE   0x0000
#define NS_INLINE_BREAK_AFTER   0x0200
#define NS_INLINE_BREAK_TYPE_MASK   0xF000
#define NS_INLINE_IS_BREAK(_status)   (0 != ((_status) & NS_INLINE_BREAK))
#define NS_INLINE_IS_BREAK_AFTER(_status)   (0 != ((_status) & NS_INLINE_BREAK_AFTER))
#define NS_INLINE_IS_BREAK_BEFORE(_status)   (NS_INLINE_BREAK == ((_status) & (NS_INLINE_BREAK|NS_INLINE_BREAK_AFTER)))
#define NS_INLINE_GET_BREAK_TYPE(_status)   (((_status) >> 12) & 0xF)
#define NS_INLINE_MAKE_BREAK_TYPE(_type)   ((_type) << 12)
#define NS_INLINE_LINE_BREAK_BEFORE()
#define NS_INLINE_LINE_BREAK_AFTER(_completionStatus)
#define NS_FRAME_TRUNCATED   0x0010
#define NS_FRAME_IS_TRUNCATED(status)   (0 != ((status) & NS_FRAME_TRUNCATED))
#define NS_FRAME_SET_TRUNCATION(status, aReflowState, aMetrics)
#define NS_FRAME_REFLOW_NOT_FINISHED   PR_FALSE
#define NS_FRAME_REFLOW_FINISHED   PR_TRUE
#define STYLE_STRUCT(name_, checkdata_cb_, ctor_args_)
 Define typesafe getter functions for each style struct by preprocessing the list of style structs.
#define NS_GET_BASE_LEVEL(frame)   NS_PTR_TO_INT32(frame->GetProperty(nsLayoutAtoms::baseLevel))
#define NS_GET_EMBEDDING_LEVEL(frame)   NS_PTR_TO_INT32(frame->GetProperty(nsLayoutAtoms::embeddingLevel))

Typedefs

typedef class nsIFrame
typedef PRUint32 nsSplittableType
 Indication of how the frame can be split.
typedef PRUint32 nsFrameState
 Frame state bits.
typedef PRUint32 nsReflowStatus
 Reflow status returned by the reflow methods.
typedef PRBool nsDidReflowStatus
 DidReflow status values.

Enumerations

enum  nsFramePaintLayer { eFramePaintLayer_Underlay = 1, eFramePaintLayer_Content = 2, eFramePaintLayer_Overlay = 4 }
enum  nsSelectionAmount {
  eSelectCharacter = 0, eSelectWord = 1, eSelectLine = 2, eSelectBeginLine = 3,
  eSelectEndLine = 4, eSelectNoAmount = 5, eSelectDir = 6, eSelectParagraph = 7
}
enum  nsDirection { eDirNext = 0, eDirPrevious = 1 }
enum  nsSpread { eSpreadNone = 0, eSpreadAcross = 1, eSpreadDown = 2 }

Class Documentation

struct nsIFrame::Cursor

This structure holds information about a cursor.

mContainer represents a loaded image that should be preferred. If it is not possible to use it, or if it is null, mCursor should be used.

Definition at line 767 of file nsIFrame.h.

Collaboration diagram for nsIFrame::Cursor:
Class Members
nsCOMPtr< imgIContainer > mContainer
PRInt32 mCursor
PRBool mHaveHotspot
float mHotspotX
float mHotspotY

Define Documentation

Definition at line 256 of file nsIFrame.h.

Definition at line 255 of file nsIFrame.h.

Definition at line 292 of file nsIFrame.h.

Definition at line 198 of file nsIFrame.h.

Definition at line 152 of file nsIFrame.h.

#define NS_FRAME_FIRST_REFLOW   0x00000002

Definition at line 140 of file nsIFrame.h.

Definition at line 159 of file nsIFrame.h.

Definition at line 207 of file nsIFrame.h.

Definition at line 180 of file nsIFrame.h.

#define NS_FRAME_HAS_VIEW   0x00002000

Definition at line 183 of file nsIFrame.h.

#define NS_FRAME_IMPL_RESERVED   0xFFF00000

Definition at line 218 of file nsIFrame.h.

#define NS_FRAME_IN_REFLOW   0x00000001

Definition at line 135 of file nsIFrame.h.

Definition at line 186 of file nsIFrame.h.

#define NS_FRAME_IS_BOX   0x00000080

Definition at line 163 of file nsIFrame.h.

Definition at line 296 of file nsIFrame.h.

#define NS_FRAME_IS_DIRTY   0x00000400

Definition at line 174 of file nsIFrame.h.

Definition at line 299 of file nsIFrame.h.

Definition at line 124 of file nsIFrame.h.

#define NS_FRAME_IS_SPECIAL   0x00008000

Definition at line 191 of file nsIFrame.h.

Definition at line 121 of file nsIFrame.h.

Definition at line 359 of file nsIFrame.h.

#define NS_FRAME_IS_UNFLOWABLE   0x00000800

Definition at line 177 of file nsIFrame.h.

Definition at line 293 of file nsIFrame.h.

Definition at line 117 of file nsIFrame.h.

#define NS_FRAME_OUT_OF_FLOW   0x00000100

Definition at line 167 of file nsIFrame.h.

Definition at line 147 of file nsIFrame.h.

Definition at line 262 of file nsIFrame.h.

Definition at line 265 of file nsIFrame.h.

Definition at line 263 of file nsIFrame.h.

Definition at line 264 of file nsIFrame.h.

Definition at line 377 of file nsIFrame.h.

Definition at line 294 of file nsIFrame.h.

Definition at line 376 of file nsIFrame.h.

#define NS_FRAME_REFLOW_ROOT   0x00080000

Definition at line 211 of file nsIFrame.h.

Definition at line 156 of file nsIFrame.h.

#define NS_FRAME_RESERVED   0x000FFFFF

Definition at line 214 of file nsIFrame.h.

Definition at line 170 of file nsIFrame.h.

#define NS_FRAME_SET_TRUNCATION (   status,
  aReflowState,
  aMetrics 
)
Value:
if (aReflowState.availableHeight != NS_UNCONSTRAINEDSIZE &&   \
      !aReflowState.mFlags.mIsTopOfPage &&                      \
      aReflowState.availableHeight < aMetrics.height)           \
    status |= NS_FRAME_TRUNCATED;                               \
  else                                                          \
    status &= ~NS_FRAME_TRUNCATED;

Definition at line 361 of file nsIFrame.h.

Definition at line 118 of file nsIFrame.h.

Definition at line 119 of file nsIFrame.h.

#define NS_FRAME_TRUNCATED   0x0010

Definition at line 358 of file nsIFrame.h.

#define NS_GET_BASE_LEVEL (   frame)    NS_PTR_TO_INT32(frame->GetProperty(nsLayoutAtoms::baseLevel))

Definition at line 1334 of file nsIFrame.h.

#define NS_GET_EMBEDDING_LEVEL (   frame)    NS_PTR_TO_INT32(frame->GetProperty(nsLayoutAtoms::embeddingLevel))

Definition at line 1337 of file nsIFrame.h.

Value:
{ 0x2fb5effc, 0x5eeb, 0x4ccb, \
  { 0xb9, 0xfa, 0x32, 0x5f, 0x86, 0x42, 0x20, 0x0f } }

Definition at line 98 of file nsIFrame.h.

#define NS_INLINE_BREAK   0x0100

Extensions to the reflow status bits defined by nsIFrameReflow.

Definition at line 312 of file nsIFrame.h.

Definition at line 318 of file nsIFrame.h.

Definition at line 317 of file nsIFrame.h.

Definition at line 321 of file nsIFrame.h.

#define NS_INLINE_GET_BREAK_TYPE (   _status)    (((_status) >> 12) & 0xF)

Definition at line 335 of file nsIFrame.h.

Definition at line 326 of file nsIFrame.h.

Definition at line 329 of file nsIFrame.h.

Definition at line 332 of file nsIFrame.h.

#define NS_INLINE_LINE_BREAK_AFTER (   _completionStatus)
Value:

Definition at line 351 of file nsIFrame.h.

Value:
(NS_INLINE_BREAK | NS_INLINE_BREAK_BEFORE |                           \
   NS_INLINE_MAKE_BREAK_TYPE(NS_STYLE_CLEAR_LINE))

Definition at line 343 of file nsIFrame.h.

#define NS_INLINE_MAKE_BREAK_TYPE (   _type)    ((_type) << 12)

Definition at line 337 of file nsIFrame.h.

Definition at line 304 of file nsIFrame.h.

Definition at line 222 of file nsIFrame.h.

#define NS_STATE_IS_HORIZONTAL   0x00400000

Definition at line 221 of file nsIFrame.h.

#define STYLE_STRUCT (   name_,
  checkdata_cb_,
  ctor_args_ 
)
Value:
const nsStyle##name_ * GetStyle##name_() const {                          \
      return NS_STATIC_CAST(const nsStyle##name_*,                            \
                            GetStyleData(eStyleStruct_##name_));              \
    }

Define typesafe getter functions for each style struct by preprocessing the list of style structs.

These functions are the preferred way to get style data. The macro creates functions like: const nsStyleBorder* GetStyleBorder(); const nsStyleColor* GetStyleColor();

Definition at line 623 of file nsIFrame.h.


Typedef Documentation

DidReflow status values.

Definition at line 374 of file nsIFrame.h.

Frame state bits.

Any bits not listed here are reserved for future extensions, but must be stored by the frames.

Definition at line 133 of file nsIFrame.h.

typedef class nsIFrame

Definition at line 94 of file nsIFrame.h.

Reflow status returned by the reflow methods.

NS_FRAME_NOT_COMPLETE bit flag means the frame does not map all its content, and that the parent frame should create a continuing frame. If this bit isn't set it means the frame does map all its content.

NS_FRAME_REFLOW_NEXTINFLOW bit flag means that the next-in-flow is dirty, and also needs to be reflowed. This status only makes sense for a frame that is not complete, i.e. you wouldn't set both NS_FRAME_COMPLETE and NS_FRAME_REFLOW_NEXTINFLOW

The low 8 bits of the nsReflowStatus are reserved for future extensions; the remaining 24 bits are zero (and available for extensions; however API's that accept/return nsReflowStatus must not receive/return any extension bits).

See also:
#Reflow()

Definition at line 290 of file nsIFrame.h.

Indication of how the frame can be split.

This is used when doing runaround of floats, and when pulling up child frames from a next-in-flow.

The choices are splittable, not splittable at all, and splittable in a non-rectangular fashion. This last type only applies to block-level elements, and indicates whether splitting can be used when doing runaround. If you can split across page boundaries, but you expect each continuing frame to be the same width then return frSplittable and not frSplittableNonRectangular.

See also:
#IsSplittable()

Definition at line 115 of file nsIFrame.h.


Enumeration Type Documentation

Enumerator:
eDirNext 
eDirPrevious 

Definition at line 243 of file nsIFrame.h.

                 {
  eDirNext    = 0,
  eDirPrevious= 1
};
Enumerator:
eFramePaintLayer_Underlay 
eFramePaintLayer_Content 
eFramePaintLayer_Overlay 

Definition at line 226 of file nsIFrame.h.

Enumerator:
eSelectCharacter 
eSelectWord 
eSelectLine 
eSelectBeginLine 
eSelectEndLine 
eSelectNoAmount 
eSelectDir 
eSelectParagraph 

Definition at line 232 of file nsIFrame.h.

                       {
  eSelectCharacter = 0,
  eSelectWord      = 1,
  eSelectLine      = 2,  //previous drawn line in flow.
  eSelectBeginLine = 3,
  eSelectEndLine   = 4,
  eSelectNoAmount  = 5,   //just bounce back current offset.
  eSelectDir       = 6,   //select next/previous frame based on direction
  eSelectParagraph = 7    //select a "paragraph"
};
enum nsSpread
Enumerator:
eSpreadNone 
eSpreadAcross 
eSpreadDown 

Definition at line 248 of file nsIFrame.h.