OWLNext 7.0
Borland's Object Windows Library for the modern age
|
TCharFormat encapsulates the CHARFORMAT2 structure which contains information about character formatting in a rich edit control. More...
#include <owl/richedit.h>
Public Member Functions | |
TCharFormat (ulong mask=0) | |
Constructor of a 'TCharFormat' structure initialized with the specified mask. | |
TCharFormat (const TRichEdit &, bool selection=true, ulong mask=CFM_ALL) | |
Constructs a CharacterFormat structure from the current character attributes of a RICHEDIT control. | |
void | ToggleEffectsBit (ulong flag) |
Toggles the effect bits specified in the 'flag' parameter. | |
void | ToggleMaskBit (ulong flag) |
Toggles the mask bits specified in the 'flag' parameter. | |
void | EnableBold (bool=true) |
Toggles the bold character attribute according to the boolean parameter specified. | |
void | EnableItalic (bool=true) |
Toggles italic character attribute based on the boolean parameter specified. | |
void | EnableUnderline (bool=true) |
Toggles the underline character attribute based on the boolean parameter specified. | |
void | EnableStrikeOut (bool=true) |
Toggles the strike-out character attribute based on the boolean parameter specified. | |
void | EnableProtected (bool=true) |
Toggles the protected character attribute based on the boolean parameter specified. | |
void | SetHeight (long) |
Sets the character height. | |
void | SetOffset (long) |
Sets the character offset from the baseline. | |
void | SetTextColor (const TColor &=TColor::None) |
Updates the CHARFORMAT structure with the specified color. | |
void | SetCharSet (uint8) |
Sets the character set of the font. | |
void | SetPitchAndFamily (uint8) |
Sets the pitch and family of the font. | |
void | SetFaceName (LPCTSTR) |
Sets the face name of the font. | |
void | SetFaceName (const tstring &f) |
TColor | GetTextColor () const |
Retrieves the character color stored in the CHARFORMAT structure. | |
TColor | GetBkColor () const |
Retrieves the character background color stored in the CHARFORMAT structure. | |
void | SetFontInfo (LOGFONT &lf) const |
Transfers the information currently in the underlying CHARFORMAT structure to a LOGFONT structure. | |
void | GetFontInfo (const LOGFONT &lf) |
Initializes the underlying CHARFORMAT structure using the information stored in a LOGFONT structure. | |
void | SetWeight (uint16 weigh) |
Font weight (LOGFONT value) | |
void | SetSpacing (int16 spacing) |
Amount to space between letters. | |
void | SetBkColor (const TColor &clr) |
Background color. | |
void | SetLCID (LCID lcid) |
Locale ID. | |
void | SetStyle (int16 style) |
Style handle. | |
void | SetKerning (uint16 kern) |
Twip size above which to kern char pair. | |
void | SetUnderlineType (uint8 utype) |
Underline type. | |
void | SetAnimation (uint8 anim) |
Animated text like marching ants. | |
void | SetRevAuthor (uint8 revav) |
Revision author index. | |
TCharFormat encapsulates the CHARFORMAT2 structure which contains information about character formatting in a rich edit control.
Definition at line 56 of file richedit.h.
|
inline |
Constructor of a 'TCharFormat' structure initialized with the specified mask.
Definition at line 578 of file richedit.h.
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.
Definition at line 53 of file richedit.cpp.
References owl::TRichEdit::GetCharFormat(), and PRECONDITION.
Toggles the bold character attribute according to the boolean parameter specified.
Definition at line 71 of file richedit.cpp.
Toggles italic character attribute based on the boolean parameter specified.
Definition at line 84 of file richedit.cpp.
Toggles the protected character attribute based on the boolean parameter specified.
Definition at line 123 of file richedit.cpp.
Toggles the strike-out character attribute based on the boolean parameter specified.
Definition at line 110 of file richedit.cpp.
Toggles the underline character attribute based on the boolean parameter specified.
Definition at line 97 of file richedit.cpp.
TColor owl::TCharFormat::GetBkColor | ( | ) | const |
Retrieves the character background color stored in the CHARFORMAT structure.
Definition at line 305 of file richedit.cpp.
References owl::TColor::SysWindow.
Initializes the underlying CHARFORMAT structure using the information stored in a LOGFONT structure.
Definition at line 259 of file richedit.cpp.
References _T.
TColor owl::TCharFormat::GetTextColor | ( | ) | const |
Retrieves the character color stored in the CHARFORMAT structure.
Definition at line 138 of file richedit.cpp.
References owl::TColor::SysWindowText.
Animated text like marching ants.
Definition at line 371 of file richedit.cpp.
Background color.
Sets Background color.
Definition at line 316 of file richedit.cpp.
References owl::TColor::None.
Sets the character set of the font.
Valid values include the following: ANSI_CHARSET, OEM_CHARSET, and SYMBOL_CHARSET.
Definition at line 180 of file richedit.cpp.
Definition at line 77 of file richedit.h.
References SetFaceName().
Sets the face name of the font.
name
is greater or equal to LF_FACESIZE
, the name is truncated. Definition at line 168 of file richedit.cpp.
References _T, and PRECONDITION.
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).
Definition at line 228 of file richedit.cpp.
References _T.
Sets the character height.
Definition at line 204 of file richedit.cpp.
Twip size above which to kern char pair.
Definition at line 351 of file richedit.cpp.
Locale ID.
Definition at line 331 of file richedit.cpp.
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.
Definition at line 215 of file richedit.cpp.
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.
Definition at line 195 of file richedit.cpp.
Revision author index.
Sets Revision author index.
Definition at line 381 of file richedit.cpp.
Amount to space between letters.
Sets Amount to space between letters.
Definition at line 294 of file richedit.cpp.
Style handle.
Sets Style handle.
Definition at line 341 of file richedit.cpp.
void owl::TCharFormat::SetTextColor | ( | const TColor & | color = TColor::None | ) |
Updates the CHARFORMAT structure with the specified color.
Definition at line 151 of file richedit.cpp.
References owl::TColor::None.
Underline type.
Set underline type.
Definition at line 361 of file richedit.cpp.
Font weight (LOGFONT value)
Sets Font weight (LOGFONT value).
Definition at line 284 of file richedit.cpp.
Toggles the effect bits specified in the 'flag' parameter.
Definition at line 587 of file richedit.h.
Toggles the mask bits specified in the 'flag' parameter.
Definition at line 595 of file richedit.h.