CharDescription Class Reference

The CharDescription structure is used to identify a character within the FontCache. To extract the CharCode from a CharDescription To extract the Typeface Handle from a CharDescription To extract the Bold state from a CharDescription To extract the italic state from a CharDescription. More...

#include <txtattr.h>

Inheritance diagram for CharDescription:

CCObject SimpleCCObject List of all members.

Public Member Functions

CharDescriptionoperator= (CharDescription &that)
BOOL operator== (CharDescription &that) const
BOOL operator!= (CharDescription &that) const

Public Attributes

UINT32 charHandle

Private Member Functions

 CharDescription ()
 CharDescription (CharDescription &that)
 CharDescription constructor from another CharDescriptor.
 CharDescription (WCHAR CharCode, WORD TypefaceHandle, BOOL Bold, BOOL Italic)
 CharDescription constructor.
WCHAR GetCharCode ()
WORD GetTypefaceHandle ()
BOOL GetBold ()
BOOL GetItalic ()

Detailed Description

The CharDescription structure is used to identify a character within the FontCache. To extract the CharCode from a CharDescription To extract the Typeface Handle from a CharDescription To extract the Bold state from a CharDescription To extract the italic state from a CharDescription.

Author:
Simon_Maneggio (Xara Group Ltd) <camelotdev@xara.com>
Date:
20/3/95
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
The italic state

Errors: -

See also:
-

Definition at line 1776 of file txtattr.h.


Constructor & Destructor Documentation

CharDescription::CharDescription  )  [inline, private]
 

Definition at line 1781 of file txtattr.h.

01781 {};

CharDescription::CharDescription CharDescription that  )  [private]
 

CharDescription constructor from another CharDescriptor.

Author:
Peter_Arnold (Xara Group Ltd) <camelotdev@xara.com>
Date:
24/4/95
Parameters:
Reference to a CharDescriptor [INPUTS]

Definition at line 8200 of file txtattr.cpp.

08201 {
08202     charHandle = that.charHandle;
08203 }

CharDescription::CharDescription WCHAR  CharCode,
WORD  TypefaceHandle,
BOOL  Bold,
BOOL  Italic
[private]
 

CharDescription constructor.

Author:
Simon_Maneggio (Xara Group Ltd) <camelotdev@xara.com>
Date:
20/3/95
Parameters:
CharCode : Unicode character, LO-BYTE identical to ASCII [INPUTS] TypefaceHandle: This must be in the range 0..16384(2 power 14) Bold : Bold or not Italic : Italic or not

Definition at line 8178 of file txtattr.cpp.

08179 {
08180      charHandle = CharCode   <<16;      // CharCode occupies HI-WORD
08181      charHandle+=(Bold   ? 1<<15 : 0);  // Top bit of LOW-WORD
08182      charHandle+=(Italic ? 1<<14 : 0);  // Next bit 
08183      charHandle+= TypefaceHandle;       // Lowest 14 bits of LOW-WORD
08184      
08185      ERROR3IF (CharCode!=GetCharCode() || TypefaceHandle!=GetTypefaceHandle() ||
08186                Bold!=GetBold() || Italic!=GetItalic(), "Invalid CharHandle generated"); 
08187 }


Member Function Documentation

BOOL CharDescription::GetBold  )  [inline, private]
 

Definition at line 1787 of file txtattr.h.

01787 { return ((charHandle & 0x00008000) != 0); }

WCHAR CharDescription::GetCharCode  )  [inline, private]
 

Definition at line 1785 of file txtattr.h.

01785 { return (WCHAR)(charHandle >> 16); }

BOOL CharDescription::GetItalic  )  [inline, private]
 

Definition at line 1788 of file txtattr.h.

01788 { return ((charHandle & 0x00004000) != 0); }

WORD CharDescription::GetTypefaceHandle  )  [inline, private]
 

Definition at line 1786 of file txtattr.h.

01786 { return (WORD)(charHandle & 0x00003FFF); }

BOOL CharDescription::operator!= CharDescription that  )  const [inline]
 

Definition at line 1795 of file txtattr.h.

01795 { return this->charHandle!=that.charHandle; }

CharDescription& CharDescription::operator= CharDescription that  )  [inline]
 

Definition at line 1793 of file txtattr.h.

01793 { this->charHandle =that.charHandle; return *this; }

BOOL CharDescription::operator== CharDescription that  )  const [inline]
 

Definition at line 1794 of file txtattr.h.

01794 { return this->charHandle==that.charHandle; }


Member Data Documentation

UINT32 CharDescription::charHandle
 

Definition at line 1791 of file txtattr.h.


The documentation for this class was generated from the following files:
Generated on Sat Nov 10 03:52:32 2007 for Camelot by  doxygen 1.4.4