HTML::ELEMENT Class Reference

#include <mi32/htmlelement.h>

List of all members.

Public Types

enum  STATE {
  STATE_Normal = 0, STATE_Hover, STATE_Active, STATE_Link,
  STATE_NUMSTATES
}

Public Member Functions

 ELEMENT (HTMLDOC *doc, XMLNODE *node)
virtual ~ELEMENT ()
void AddToRegion (REGION2D &region, const DPOINT2D &pos, bool bOnlyIfDirty)
ERRVALUE DoLayout (MGD::CONTEXT *gc, double MaxWidth, DPOINT2D &pt, REGION2D &Container, DRECT2D &Extents)
void DoLayoutPass2 (MGD::CONTEXT *gc, DPOINT2D &AbsPos)
void Draw (MGD::CONTEXT *gc, const DPOINT2D &pos, const DRECT2D *clip=0)
ELEMENTFindChild (const DPOINT2D &pt)
const DRECT2DGetExtents () const
ELEMENTGetFirstChild ()
const ELEMENTGetFirstChild () const
double GetHeight () const
double GetIntrinsicHeight () const
double GetIntrinsicWidth () const
ELEMENTGetNext ()
const ELEMENTGetNext () const
XMLNODEGetNode () const
ELEMENTGetParent ()
const ELEMENTGetParent () const
const DPOINT2DGetPos () const
void GetRegion (REGION2D &region, bool bRootRelative=true)
const STYLEGetStyle (STYLE::PSEUDO pseudo=STYLE::PSEUDO_CurrentState) const
double GetWidth () const
bool IsEmpty () const
bool IsHidden () const
void SetState (STATE state)
void SetStyle (STYLE *style)
virtual void v_GetInlinePos (SIMPLE_ARRAY< INLINE_POS * > &positions)
virtual double v_GetIntrinsicHeight () const
virtual double v_GetIntrinsicWidth () const

Member Enumeration Documentation

Enumerator:
STATE_Normal 
STATE_Hover 
STATE_Active 
STATE_Link 
STATE_NUMSTATES 

Constructor & Destructor Documentation

HTML::ELEMENT::ELEMENT ( HTMLDOC doc,
XMLNODE node 
)
virtual HTML::ELEMENT::~ELEMENT (  )  [virtual]

Member Function Documentation

void HTML::ELEMENT::AddToRegion ( REGION2D region,
const DPOINT2D pos,
bool  bOnlyIfDirty 
)
ERRVALUE HTML::ELEMENT::DoLayout ( MGD::CONTEXT gc,
double  MaxWidth,
DPOINT2D pt,
REGION2D Container,
DRECT2D Extents 
)

Compute the size and position of the element.

Parameters:
MaxWidth Maximum width in pixels
pt Starting position relative to parent
Container Container to layout into. Child should remove its own area from the container, and can grow it as necessary.
Extents Extents of the parent element. Child can grow if necessary
void HTML::ELEMENT::DoLayoutPass2 ( MGD::CONTEXT gc,
DPOINT2D AbsPos 
)

After figuring out the layout of children, compute the absolute position of the element.

void HTML::ELEMENT::Draw ( MGD::CONTEXT gc,
const DPOINT2D pos,
const DRECT2D clip = 0 
)

Draw the element and its children.

ELEMENT* HTML::ELEMENT::FindChild ( const DPOINT2D pt  ) 

Find a child element at a given point.

The point is relative to the upper-left corner of this element.

const DRECT2D& HTML::ELEMENT::GetExtents (  )  const [inline]

Get the extents of the element.

These are computed when the element is drawn

ELEMENT* HTML::ELEMENT::GetFirstChild (  ) 
const ELEMENT* HTML::ELEMENT::GetFirstChild (  )  const
double HTML::ELEMENT::GetHeight (  )  const [inline]

Get the height of the element in pixels Height includes margins, padding and border.

double HTML::ELEMENT::GetIntrinsicHeight (  )  const [inline]
double HTML::ELEMENT::GetIntrinsicWidth (  )  const [inline]
ELEMENT* HTML::ELEMENT::GetNext (  ) 
const ELEMENT* HTML::ELEMENT::GetNext (  )  const
XMLNODE* HTML::ELEMENT::GetNode (  )  const [inline]
ELEMENT* HTML::ELEMENT::GetParent (  ) 
const ELEMENT* HTML::ELEMENT::GetParent (  )  const
const DPOINT2D& HTML::ELEMENT::GetPos (  )  const [inline]
void HTML::ELEMENT::GetRegion ( REGION2D region,
bool  bRootRelative = true 
)
const STYLE* HTML::ELEMENT::GetStyle ( STYLE::PSEUDO  pseudo = STYLE::PSEUDO_CurrentState  )  const
double HTML::ELEMENT::GetWidth (  )  const [inline]

Get the width of the element in pixels Width includes margins, padding and border.

bool HTML::ELEMENT::IsEmpty (  )  const

Return true if the element has no content This will ignore white-space.

bool HTML::ELEMENT::IsHidden (  )  const [inline]

Determine if the element should be "hidden".

void HTML::ELEMENT::SetState ( STATE  state  ) 
void HTML::ELEMENT::SetStyle ( STYLE style  ) 

Set the style for the element.

This will AddRef() the style.

virtual void HTML::ELEMENT::v_GetInlinePos ( SIMPLE_ARRAY< INLINE_POS * > &  positions  )  [virtual]
virtual double HTML::ELEMENT::v_GetIntrinsicHeight (  )  const [virtual]
virtual double HTML::ELEMENT::v_GetIntrinsicWidth (  )  const [virtual]

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

Generated on Sun Oct 7 21:35:01 2012 for TNTsdk 2012 by  doxygen 1.6.1