Back to index

lightning-sunbird  0.9+nobinonly
Classes | Defines | Functions
nsStyleContext.h File Reference
#include "nsRuleNode.h"
#include "nsIAtom.h"
#include "nsStyleStructList.h"

Go to the source code of this file.

Classes

class  nsStyleContext
 An nsStyleContext represents the computed style data for an element. More...

Defines

#define STYLE_STRUCT(name_, checkdata_cb_, ctor_args_)
 Define typesafe getter functions for each style struct by preprocessing the list of style structs.

Functions

 NS_NewStyleContext (nsStyleContext *aParentContext, nsIAtom *aPseudoTag, nsRuleNode *aRuleNode, nsPresContext *aPresContext)

Define Documentation

#define STYLE_STRUCT (   name_,
  checkdata_cb_,
  ctor_args_ 
)
Value:
const nsStyle##name_ * GetStyle##name_() {                                \
      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 151 of file nsStyleContext.h.


Function Documentation

NS_NewStyleContext ( nsStyleContext aParentContext,
nsIAtom aPseudoTag,
nsRuleNode aRuleNode,
nsPresContext aPresContext 
)

Definition at line 970 of file nsStyleContext.cpp.

{
  nsStyleContext* context = new (aPresContext) nsStyleContext(aParentContext, aPseudoTag, 
                                                              aRuleNode, aPresContext);
  if (context)
    context->AddRef();
  return context;
}

Here is the call graph for this function:

Here is the caller graph for this function: