OWLNext 6.32
Public Member Functions
owl::TCharFormat Class Reference

#include <richedit.h>

List of all members.

Public Member Functions

 TCharFormat (ulong mask=0)
 TCharFormat (const TRichEdit &, bool selection=true, ulong mask=CFM_ALL)
void ToggleEffectsBit (ulong flag)
void ToggleMaskBit (ulong flag)
void EnableBold (bool=true)
void EnableItalic (bool=true)
void EnableUnderline (bool=true)
void EnableStrikeOut (bool=true)
void EnableProtected (bool=true)
void SetHeight (long)
void SetOffset (long)
void SetTextColor (const TColor &=TColor::None)
void SetCharSet (uint8)
void SetPitchAndFamily (uint8)
void SetFaceName (LPCTSTR)
void SetFaceName (const tstring &f)
TColor GetTextColor () const
void SetFontInfo (LOGFONT &lf) const
void GetFontInfo (const LOGFONT &lf)
void SetWeight (uint16 weigh)
void SetSpacing (int16 spacing)
void SetBkColor (const TColor &clr)
void SetLCID (LCID lcid)
void SetStyle (int16 style)
void SetKerning (uint16 kern)
void SetUnderlineType (uint8 utype)
void SetAnimation (uint8 anim)
void SetRevAuthor (uint8 revav)

Detailed Description

TCharFormat encapsulates the CHARFORMAT2 structure which contains information about character formatting in a rich edit control.


Constructor & Destructor Documentation

owl::TCharFormat::TCharFormat ( ulong  mask = 0) [inline]

Constructor of a 'TCharFormat' structure initialized with the specified mask.

Note:
This constructor is typically used for constructing an object which will be filled with the appropriate character format information by a rich edit control. The 'mask' specifies which field should be filled.
owl::TCharFormat::TCharFormat ( const TRichEdit edit,
bool  selection = true,
ulong  mask = CFM_ALL 
)

Constructs a CharacterFormat structure from the current character attributes of a RICHEDIT control.

Note:
Specifying 'true' for selection will return the attribute of the character at the current location if there are no block of data selected in the control.

Member Function Documentation

void owl::TCharFormat::EnableBold ( bool  flag = true)

Toggles the bold character attribute according to the boolean parameter specified.

void owl::TCharFormat::EnableItalic ( bool  flag = true)

Toggles italic character attribute based on the boolean parameter specified.

void owl::TCharFormat::EnableProtected ( bool  flag = true)

Toggles the protected character attribute based on the boolean parameter specified.

void owl::TCharFormat::EnableStrikeOut ( bool  flag = true)

Toggles the strike-out character attribute based on the boolean parameter specified.

void owl::TCharFormat::EnableUnderline ( bool  flag = true)

Toggles the underline character attribute based on the boolean parameter specified.

void owl::TCharFormat::GetFontInfo ( const LOGFONT &  lf)

Initializes the underlying CHARFORMAT structure using the information stored in a LOGFONT structure.

TColor owl::TCharFormat::GetTextColor ( ) const

Retrieves the character color stored in the CHARFORMAT structure.

Note:
Default to system text color of no explicit color was set in the CHARFORMAT structure.
void owl::TCharFormat::SetAnimation ( uint8  anim)

Animated text like marching ants.

Animated text like marching ants.

Note:
RichEdit 2.0 specific
void owl::TCharFormat::SetBkColor ( const TColor clr)

Background color.

Sets Background color.

Note:
RichEdit 2.0 specific
void owl::TCharFormat::SetCharSet ( uint8  charSet)

Sets the character set of the font. Valid values include the following: ANSI_CHARSET, OEM_CHARSET, and SYMBOL_CHARSET.

void owl::TCharFormat::SetFaceName ( LPCTSTR  name)

Sets the face name of the font.

void owl::TCharFormat::SetFontInfo ( LOGFONT &  lf) const

Transfers the information currently in the underlying CHARFORMAT structure to a LOGFONT structure. This is useful when changing the editor's font, as initialized LOGFONT structure can subsequently be used when invoking the FONT Common Dialog (i.e., TChooseFontDialog).

void owl::TCharFormat::SetHeight ( long  height)

Sets the character height.

void owl::TCharFormat::SetKerning ( uint16  kern)

Twip size above which to kern char pair.

Twip size above which to kern char pair.

Note:
RichEdit 2.0 specific
void owl::TCharFormat::SetLCID ( LCID  lcid)

Locale ID.

void owl::TCharFormat::SetOffset ( long  offset)

Sets the character offset from the baseline. If the parameter is positive, the character is a superscript; if it is negative, the character is a subscript.

void owl::TCharFormat::SetPitchAndFamily ( uint8  pitchFam)

Sets the pitch and family of the font. The two lower-bits specify the pitch of the font and can be one of the following values: DEFAULT_PITCH, FIXED_PITCH, or VARIABLE_PITCH.

Bits 4 through 7 of the member specify the font family and can be one of the following values: FF_DECORATIVE, FF_DONTCARE, FF_MODERN, FF_ROMAN, FF_SCRIPT or FF_SWISS.

void owl::TCharFormat::SetRevAuthor ( uint8  revav)

Revision author index.

Sets Revision author index.

Note:
RichEdit 2.0 specific
void owl::TCharFormat::SetSpacing ( int16  spacing)

Amount to space between letters.

Sets Amount to space between letters.

Note:
RichEdit 2.0 specific
void owl::TCharFormat::SetStyle ( int16  style)

Style handle.

Sets Style handle.

Note:
RichEdit 2.0 specific
void owl::TCharFormat::SetTextColor ( const TColor color = TColor::None)

Updates the CHARFORMAT structure with the specified color.

Note:
If 'TColor::None' is specified, enable the flag specifying that the color should default to the system text color.
void owl::TCharFormat::SetUnderlineType ( uint8  utype)

Underline type.

Set underline type.

Note:
RichEdit 2.0 specific
void owl::TCharFormat::SetWeight ( uint16  weigh)

Font weight (LOGFONT value)

Sets Font weight (LOGFONT value).

Note:
RichEdit 2.0 specific
void owl::TCharFormat::ToggleEffectsBit ( ulong  flag) [inline]

Toggles the effect bits specified in the 'flag' parameter.

void owl::TCharFormat::ToggleMaskBit ( ulong  flag) [inline]

Toggles the mask bits specified in the 'flag' parameter.


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