IGLib  1.7.2
The IGLib base library EXTENDED - with other lilbraries and applications.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
IG.Sendigence.TextStyle Class Reference

Specifies a text tyle used for draving text in various contexts. More...

+ Inheritance diagram for IG.Sendigence.TextStyle:
+ Collaboration diagram for IG.Sendigence.TextStyle:

Public Member Functions

void DisposeTextFont ()
 Disposes of this object's font and sets it to null. Dispose() is called on the font onlt if it is owned by the object. More...
 
void Dispose ()
 Disposes of this object. More...
 
Object Clone ()
 Creates and returns a clone of this object. The clone is functionally identical to but has no common data with this object. More...
 
 TextStyle ()
 Creates a new text style without a specified font or background or foreground color. More...
 
 TextStyle (Font font)
 Creates a new text style without a specified font or background or foreground color. More...
 
 TextStyle (Font font, Color forecolor)
 Creates a new text style with a specified font and foreground color but without background color. More...
 
 TextStyle (Font font, Color backcolor, Color forecolor)
 Creates a new text style with a specified font and background and foreground color. More...
 
Font GetFont ()
 Returns the fons of the text style. If the font is not defined, a defauld font is first assigned to the text style and this font is returned, which changes the text style (from the one without a font defined to the one with font defined). More...
 
void CopyFrom (TextStyle source)
 Copies (retrieves) the text style represented by this object from another style. More...
 
void CopyFrom (Control source)
 Copies (retrieves) the text style represented by this object from a window form. More...
 
void CopyFromSelection (RichTextBox source)
 Copies (retrieves) the text style represented by this object from selection style of a RichTextBox. More...
 
void ApplyBackColor (Control control)
 Applies the style backgrount color, if defined, to a control. More...
 
void ApplyForeColor (Control control)
 Applies the style foreground color, if defined, to a control. More...
 
void ApplyFont (Control control)
 Applies the style font, if defined, to a control. Control gets a clone of the font rather than just a reference to it. More...
 
void Apply (Control control)
 Applies the style to a control. Only components of the style that are defined are applied (text font is considered atomic). Control gets a clone of the font rather than just a reference to it. More...
 
void ApplyFontReference (Control control)
 Applies the style font, if defined, to a control. Control gets only a reference of the font, which implies that the style's font may not be disposed while it is used. More...
 
void ApplyReference (Control control)
 Applies the style to a control. Only components of the style that are defined are applied (text font is considered atomic). Control gets only a reference of the font, which implies that the style's font may not be disposed while it is used. More...
 
void ApplySelectionBackColor (RichTextBox control)
 Applies the style backgrount color, if defined, to selected text or insertion point of a RichTextBox. To apply the style to the main style of the control instead of selection style, cast the RichTextBox to Control! More...
 
void ApplySelectionForeColor (RichTextBox control)
 Applies the style foreground color, if defined, to selected text or insertion point of a RichTextBox. To apply the style to the main style of the control instead of selection style, cast the RichTextBox to Control! More...
 
void ApplySelectionFont (RichTextBox control)
 Applies the style font, if defined, to selected text or insertion point of a RichTextBox. To apply the style to the main style of the control instead of selection style, cast the RichTextBox to Control! More...
 
void ApplySelection (RichTextBox control)
 Applies the style to selected text or insertion point of a RichTextBox. Only components of the style that are defined are applied (text font is considered atomic). To apply the style to the main style of the control instead of selection style, cast the RichTextBox to Control! More...
 
void ApplySelectionFontReference (RichTextBox control)
 Applies the style font, if defined, to selected text or insertion point of a RichTextBox. Control gets only a reference of the font, which implies that the style's font may not be disposed while it is used. To apply the style to the main style of the control instead of selection style, cast the RichTextBox to Control! More...
 
void ApplySelectionReference (RichTextBox control)
 Applies the style to selected text or insertion point of a RichTextBox. Only components of the style that are defined are applied (text font is considered atomic). Control gets only a reference of the font, which implies that the style's font may not be disposed while it is used. To apply the style to the main style of the control instead of selection style, cast the RichTextBox to Control! More...
 
void ApplyBackColor (Object obj)
 Dummy functon for application of the style background color to a general type of object. Does nothing. More...
 
void ApplyForeColor (Object obj)
 Dummy functon for application of the style foreground color to a general type of object. Does nothing. More...
 
void Apply (Object obj)
 Dummy functon for application of the style to a general type of object. Does nothing. More...
 
void DisposeTextFont ()
 Disposes of this object's font and sets it to null. Dispose() is called on the font onlt if it is owned by the object. More...
 
void Dispose ()
 Disposes of this object. More...
 
Object Clone ()
 Creates and returns a clone of this object. The clone is functionally identical to but has no common data with this object. More...
 
 TextStyle ()
 Creates a new text style without a specified font or background or foreground color. More...
 
 TextStyle (Font font)
 Creates a new text style without a specified font or background or foreground color. More...
 
 TextStyle (Font font, Color forecolor)
 Creates a new text style with a specified font and foreground color but without background color. More...
 
 TextStyle (Font font, Color backcolor, Color forecolor)
 Creates a new text style with a specified font and background and foreground color. More...
 
Font GetFont ()
 Returns the fons of the text style. If the font is not defined, a defauld font is first assigned to the text style and this font is returned, which changes the text style (from the one without a font defined to the one with font defined). More...
 
void CopyFrom (TextStyle source)
 Copies (retrieves) the text style represented by this object from another style. More...
 
void CopyFrom (Control source)
 Copies (retrieves) the text style represented by this object from a window consform. More...
 
void CopyFromSelection (RichTextBox source)
 Copies (retrieves) the text style represented by this object from selection style of a RichTextBox. More...
 
void ApplyBackColor (Control control)
 Applies the style backgrount color, if defined, to a control. More...
 
void ApplyForeColor (Control control)
 Applies the style foreground color, if defined, to a control. More...
 
void ApplyFont (Control control)
 Applies the style font, if defined, to a control. Control gets a clone of the font rather than just a reference to it. More...
 
void Apply (Control control)
 Applies the style to a control. Only components of the style that are defined are applied (text font is considered atomic). Control gets a clone of the font rather than just a reference to it. More...
 
void ApplyFontReference (Control control)
 Applies the style font, if defined, to a control. Control gets only a reference of the font, which implies that the style's font may not be disposed while it is used. More...
 
void ApplyReference (Control control)
 Applies the style to a control. Only components of the style that are defined are applied (text font is considered atomic). Control gets only a reference of the font, which implies that the style's font may not be disposed while it is used. More...
 
void ApplySelectionBackColor (RichTextBox control)
 Applies the style backgrount color, if defined, to selected text or insertion point of a RichTextBox. To apply the style to the main style of the control instead of selection style, cast the RichTextBox to Control! More...
 
void ApplySelectionForeColor (RichTextBox control)
 Applies the style foreground color, if defined, to selected text or insertion point of a RichTextBox. To apply the style to the main style of the control instead of selection style, cast the RichTextBox to Control! More...
 
void ApplySelectionFont (RichTextBox control)
 Applies the style font, if defined, to selected text or insertion point of a RichTextBox. To apply the style to the main style of the control instead of selection style, cast the RichTextBox to Control! More...
 
void ApplySelection (RichTextBox control)
 Applies the style to selected text or insertion point of a RichTextBox. Only components of the style that are defined are applied (text font is considered atomic). To apply the style to the main style of the control instead of selection style, cast the RichTextBox to Control! More...
 
void ApplySelectionFontReference (RichTextBox control)
 Applies the style font, if defined, to selected text or insertion point of a RichTextBox. Control gets only a reference of the font, which implies that the style's font may not be disposed while it is used. To apply the style to the main style of the control instead of selection style, cast the RichTextBox to Control! More...
 
void ApplySelectionReference (RichTextBox control)
 Applies the style to selected text or insertion point of a RichTextBox. Only components of the style that are defined are applied (text font is considered atomic). Control gets only a reference of the font, which implies that the style's font may not be disposed while it is used. To apply the style to the main style of the control instead of selection style, cast the RichTextBox to Control! More...
 
void ApplyBackColor (Object obj)
 Dummy functon for application of the style background color to a general type of object. Does nothing. More...
 
void ApplyForeColor (Object obj)
 Dummy functon for application of the style foreground color to a general type of object. Does nothing. More...
 
void Apply (Object obj)
 Dummy functon for application of the style to a general type of object. Does nothing. More...
 

Static Public Member Functions

static TextStyle Copy (TextStyle source)
 Creates and returns a new style that is a copy of an existing text style. More...
 
static TextStyle Copy (Control source)
 Creates and returns a new style that is a copy of the text style of a control. More...
 
static TextStyle Copy (RichTextBox source)
 Creates and returns a new style that is a copy of the text style of selected text or insertion point of a rich text box. To copy control's main style instead of the selection style, cast the RichTextBox to Control! More...
 
static TextStyle Copy (TextStyle source)
 Creates and returns a new style that is a copy of an existing text style. More...
 
static TextStyle Copy (Control source)
 Creates and returns a new style that is a copy of the text style of a control. More...
 
static TextStyle Copy (RichTextBox source)
 Creates and returns a new style that is a copy of the text style of selected text or insertion point of a rich text box. To copy control's main style instead of the selection style, cast the RichTextBox to Control! More...
 

Properties

bool TextFontOwned [get, private set]
 Gets a value inticating whether the text font is owned by this object or not. If false then font is either nul or onlt a reference to a font object that exists out of this class. More...
 
Color BackColor [get, set]
 Gets or sets the text style's background color. When set, the background color gets defined. When not defined, the get() still returns the color. Whether the color is set or not should be verified by the BackColorSet property. More...
 
bool BackColorSet [get, set]
 Specifies whether the text style's background color is defined or not. More...
 
Color ForeColor [get, set]
 Gets or sets the text style's foreground color. When set, the foreground color gets defined. When not defined, the get() still returns the color. Whether the color is set or not should be verified by the ForeColorSet property. More...
 
bool ForeColorSet [get, set]
 Specifies whether the text style's foreground color is defined or not. More...
 
Font TextFontReference [set]
 Sets the style's font to a reference to an existent font. Warning: If the reference font is changed (E.G. disposed) then the changes are reflected on this style More...
 
Font TextFont [get, set]
 Gets or sets the style's font. null is used for unspecified, making the style inable to change the current font of a target object. Set: Font is cloned rather than referenced (changes in original are not reflected on this object). More...
 
bool Bold [get, set]
 Gets or sets the bold property of the text style's font. Get: if font is not specified for the text style then false is returned. Set: if font was not defined for the style, font becomes the default font with the specified bold property. More...
 
bool Italic [get, set]
 Gets or sets the italic property of the text style's font. Get: if font is not specified for the text style then false is returned. Set: if font was not defined for the style, font becomes the default font with the specified italic property. More...
 
bool Underline [get, set]
 Gets or sets the underline property of the text style's font. Get: if font is not specified for the text style then false is returned. Set: if font was not defined for the style, font becomes the default font with the specified underline property. More...
 
bool Strikeout [get, set]
 Gets or sets the strikeout property of the text style's font. Get: if font is not specified for the text style then false is returned. Set: if font was not defined for the style, font becomes the default font with the specified strikeout property. More...
 
float SizeInPoints [get, set]
 Gets or sets the size of the text style's font in points. Get: if font is not specified for the text style then 0 is returned. Set: if font was not defined for the style, font becomes the default font with the specified size. More...
 
string Family [get, set]
 Gets or sets the family of the text style's font, where the family is represented by its name. Get: if font is not specified for the text style then null is returned. Set: if font was not defined for the style, font becomes the default font with the specified family. More...
 

Private Member Functions

void SetFontSize (float size)
 Sets font size for of the text style's font in points. if font was not defined for the style, font becomes the default font with the specified size. More...
 
void SetFontSize (float size, GraphicsUnit unit)
 Sets font size for of the text style's font. if font was not defined for the style, font becomes the default font with the specified size. More...
 
float GetFontSizeInPoints ()
 Retrieves font size in points for of the text style's font. if font is not defined for the style, 0 is returned. More...
 
float GetFontSize ()
 Retrieves font size in points for of the text style's font. if font is not defined for the style, 0 is returned. More...
 
void GetFontSize (out float size, out GraphicsUnit unit)
 Retrieves font size for of the text style's font. if font is not defined for the style, 0 is returned for size and Point for unit. More...
 
void SaveFontProperties ()
 
void SaveFontProperties (Font ft)
 
Font RestoreFont ()
 
void ApplyFont (Object obj)
 Dummy functon for application of the style font to a general type of object. Does nothing. More...
 
void SetFontSize (float size)
 Sets font size for of the text style's font in points. if font was not defined for the style, font becomes the default font with the specified size. More...
 
void SetFontSize (float size, GraphicsUnit unit)
 Sets font size for of the text style's font. if font was not defined for the style, font becomes the default font with the specified size. More...
 
float GetFontSizeInPoints ()
 Retrieves font size in points for of the text style's font. if font is not defined for the style, 0 is returned. More...
 
float GetFontSize ()
 Retrieves font size in points for of the text style's font. if font is not defined for the style, 0 is returned. More...
 
void GetFontSize (out float size, out GraphicsUnit unit)
 Retrieves font size for of the text style's font. if font is not defined for the style, 0 is returned for size and Point for unit. More...
 
void SaveFontProperties ()
 
void SaveFontProperties (Font ft)
 
Font RestoreFont ()
 
void ApplyFont (Object obj)
 Dummy functon for application of the style font to a general type of object. Does nothing. More...
 

Static Private Member Functions

static Font defaultfont ()
 
static Font defaultfont ()
 

Private Attributes

bool _TextFontOwned = false
 
const string defaultFontFamilyName = "Times"
 
const int defaultFontSize = 10
 
FontFamily _FamilyAllocated = null
 
Color _BackColor = Color.White
 
Color _ForeColor = Color.Black
 
bool _BackColorSet = false
 
bool _ForeColorSet = false
 
Font _TextFont = null
 
bool _Bold
 
bool _Italic
 
bool _Underline
 
bool _Strikeout
 
bool _GdiVerticalFont
 
bool _IsSystemFont
 
byte _GdiCharSet
 
FontFamily _FontFamily
 
string _SystemFontName
 
string _Name
 
string _OriginalFontName
 
int _Height
 
float _Size
 
float _SizeInPoints
 
FontStyle _Style
 
GraphicsUnit _Unit
 

Detailed Description

Specifies a text tyle used for draving text in various contexts.

Constructor & Destructor Documentation

IG.Sendigence.TextStyle.TextStyle ( )
inline

Creates a new text style without a specified font or background or foreground color.

IG.Sendigence.TextStyle.TextStyle ( Font  font)
inline

Creates a new text style without a specified font or background or foreground color.

Parameters
fontSpecifies the text style font.
IG.Sendigence.TextStyle.TextStyle ( Font  font,
Color  forecolor 
)
inline

Creates a new text style with a specified font and foreground color but without background color.

Parameters
fontSpecifies the text style font.
forecolorSpecifies the text foreground color.
IG.Sendigence.TextStyle.TextStyle ( Font  font,
Color  backcolor,
Color  forecolor 
)
inline

Creates a new text style with a specified font and background and foreground color.

Parameters
fontSpecifies the text style font.
backSpecifies the text background color.
forecolorSpecifies the text foreground color.
IG.Sendigence.TextStyle.TextStyle ( )
inline

Creates a new text style without a specified font or background or foreground color.

IG.Sendigence.TextStyle.TextStyle ( Font  font)
inline

Creates a new text style without a specified font or background or foreground color.

Parameters
fontSpecifies the text style font.
IG.Sendigence.TextStyle.TextStyle ( Font  font,
Color  forecolor 
)
inline

Creates a new text style with a specified font and foreground color but without background color.

Parameters
fontSpecifies the text style font.
forecolorSpecifies the text foreground color.
IG.Sendigence.TextStyle.TextStyle ( Font  font,
Color  backcolor,
Color  forecolor 
)
inline

Creates a new text style with a specified font and background and foreground color.

Parameters
fontSpecifies the text style font.
backSpecifies the text background color.
forecolorSpecifies the text foreground color.

Member Function Documentation

void IG.Sendigence.TextStyle.DisposeTextFont ( )
inline

Disposes of this object's font and sets it to null. Dispose() is called on the font onlt if it is owned by the object.

void IG.Sendigence.TextStyle.Dispose ( )
inline

Disposes of this object.

Object IG.Sendigence.TextStyle.Clone ( )
inline

Creates and returns a clone of this object. The clone is functionally identical to but has no common data with this object.

Returns
A clone of this object.

References IG.Sendigence.TextStyle.BackColor, IG.Sendigence.TextStyle.BackColorSet, IG.Sendigence.TextStyle.ForeColor, IG.Sendigence.TextStyle.ForeColorSet, IG.Sendigence.TextStyle.TextFont, and IG.Sendigence.TextStyle.TextFontReference.

static Font IG.Sendigence.TextStyle.defaultfont ( )
inlinestaticprivate
Font IG.Sendigence.TextStyle.GetFont ( )
inline

Returns the fons of the text style. If the font is not defined, a defauld font is first assigned to the text style and this font is returned, which changes the text style (from the one without a font defined to the one with font defined).

void IG.Sendigence.TextStyle.SetFontSize ( float  size)
inlineprivate

Sets font size for of the text style's font in points. if font was not defined for the style, font becomes the default font with the specified size.

Parameters
sizeSize of the font in points.
void IG.Sendigence.TextStyle.SetFontSize ( float  size,
GraphicsUnit  unit 
)
inlineprivate

Sets font size for of the text style's font. if font was not defined for the style, font becomes the default font with the specified size.

Parameters
sizeSize of the font in specified units.
unitUnits used to define the size.
float IG.Sendigence.TextStyle.GetFontSizeInPoints ( )
inlineprivate

Retrieves font size in points for of the text style's font. if font is not defined for the style, 0 is returned.

Returns
Size of font or 0.0 if font is not defined.
float IG.Sendigence.TextStyle.GetFontSize ( )
inlineprivate

Retrieves font size in points for of the text style's font. if font is not defined for the style, 0 is returned.

Returns
Size of font or 0.0 if font is not defined.
void IG.Sendigence.TextStyle.GetFontSize ( out float  size,
out GraphicsUnit  unit 
)
inlineprivate

Retrieves font size for of the text style's font. if font is not defined for the style, 0 is returned for size and Point for unit.

Parameters
sizeSize of the font in the returned units.
unitUnits used to define the size.
void IG.Sendigence.TextStyle.SaveFontProperties ( )
inlineprivate
void IG.Sendigence.TextStyle.SaveFontProperties ( Font  ft)
inlineprivate
Font IG.Sendigence.TextStyle.RestoreFont ( )
inlineprivate
void IG.Sendigence.TextStyle.CopyFrom ( TextStyle  source)
inline

Copies (retrieves) the text style represented by this object from another style.

Parameters
sourceText style from which the style is copied.

References IG.Sendigence.TextStyle.BackColor, IG.Sendigence.TextStyle.BackColorSet, IG.Sendigence.TextStyle.ForeColor, IG.Sendigence.TextStyle.ForeColorSet, and IG.Sendigence.TextStyle.TextFont.

Referenced by IG.Sendigence.TextStyle.Copy().

void IG.Sendigence.TextStyle.CopyFrom ( Control  source)
inline

Copies (retrieves) the text style represented by this object from a window form.

Parameters
sourceWindows form from which the style is copied.
void IG.Sendigence.TextStyle.CopyFromSelection ( RichTextBox  source)
inline

Copies (retrieves) the text style represented by this object from selection style of a RichTextBox.

Parameters
sourceWindows form from which the style is copied.
static TextStyle IG.Sendigence.TextStyle.Copy ( TextStyle  source)
inlinestatic

Creates and returns a new style that is a copy of an existing text style.

Parameters
sourceControl from which the style is copied.

References IG.Sendigence.TextStyle.CopyFrom().

Referenced by IG.Sendigence.FormWriterBase.InitStyles().

static TextStyle IG.Sendigence.TextStyle.Copy ( Control  source)
inlinestatic

Creates and returns a new style that is a copy of the text style of a control.

Parameters
sourceControl from which the style is copied.

References IG.Sendigence.TextStyle.CopyFrom().

static TextStyle IG.Sendigence.TextStyle.Copy ( RichTextBox  source)
inlinestatic

Creates and returns a new style that is a copy of the text style of selected text or insertion point of a rich text box. To copy control's main style instead of the selection style, cast the RichTextBox to Control!

Parameters
sourceRich text box from which the style is copied.

References IG.Sendigence.TextStyle.CopyFrom().

void IG.Sendigence.TextStyle.ApplyBackColor ( Control  control)
inline

Applies the style backgrount color, if defined, to a control.

Parameters
controlAffected control.
void IG.Sendigence.TextStyle.ApplyForeColor ( Control  control)
inline

Applies the style foreground color, if defined, to a control.

Parameters
controlAffected control.
void IG.Sendigence.TextStyle.ApplyFont ( Control  control)
inline

Applies the style font, if defined, to a control. Control gets a clone of the font rather than just a reference to it.

Parameters
controlAffected control.
void IG.Sendigence.TextStyle.Apply ( Control  control)
inline

Applies the style to a control. Only components of the style that are defined are applied (text font is considered atomic). Control gets a clone of the font rather than just a reference to it.

Parameters
controlAffected control.
void IG.Sendigence.TextStyle.ApplyFontReference ( Control  control)
inline

Applies the style font, if defined, to a control. Control gets only a reference of the font, which implies that the style's font may not be disposed while it is used.

Parameters
controlAffected control.
void IG.Sendigence.TextStyle.ApplyReference ( Control  control)
inline

Applies the style to a control. Only components of the style that are defined are applied (text font is considered atomic). Control gets only a reference of the font, which implies that the style's font may not be disposed while it is used.

Parameters
controlAffected control.
void IG.Sendigence.TextStyle.ApplySelectionBackColor ( RichTextBox  control)
inline

Applies the style backgrount color, if defined, to selected text or insertion point of a RichTextBox. To apply the style to the main style of the control instead of selection style, cast the RichTextBox to Control!

Parameters
controlAffected control.
void IG.Sendigence.TextStyle.ApplySelectionForeColor ( RichTextBox  control)
inline

Applies the style foreground color, if defined, to selected text or insertion point of a RichTextBox. To apply the style to the main style of the control instead of selection style, cast the RichTextBox to Control!

Parameters
controlAffected control.
void IG.Sendigence.TextStyle.ApplySelectionFont ( RichTextBox  control)
inline

Applies the style font, if defined, to selected text or insertion point of a RichTextBox. To apply the style to the main style of the control instead of selection style, cast the RichTextBox to Control!

Parameters
controlAffected control.
void IG.Sendigence.TextStyle.ApplySelection ( RichTextBox  control)
inline

Applies the style to selected text or insertion point of a RichTextBox. Only components of the style that are defined are applied (text font is considered atomic). To apply the style to the main style of the control instead of selection style, cast the RichTextBox to Control!

Parameters
controlAffected control.
void IG.Sendigence.TextStyle.ApplySelectionFontReference ( RichTextBox  control)
inline

Applies the style font, if defined, to selected text or insertion point of a RichTextBox. Control gets only a reference of the font, which implies that the style's font may not be disposed while it is used. To apply the style to the main style of the control instead of selection style, cast the RichTextBox to Control!

Parameters
controlAffected control.
void IG.Sendigence.TextStyle.ApplySelectionReference ( RichTextBox  control)
inline

Applies the style to selected text or insertion point of a RichTextBox. Only components of the style that are defined are applied (text font is considered atomic). Control gets only a reference of the font, which implies that the style's font may not be disposed while it is used. To apply the style to the main style of the control instead of selection style, cast the RichTextBox to Control!

Parameters
controlAffected control.
void IG.Sendigence.TextStyle.ApplyBackColor ( Object  obj)
inline

Dummy functon for application of the style background color to a general type of object. Does nothing.

Parameters
objAffected object.
void IG.Sendigence.TextStyle.ApplyForeColor ( Object  obj)
inline

Dummy functon for application of the style foreground color to a general type of object. Does nothing.

Parameters
objAffected object.
void IG.Sendigence.TextStyle.ApplyFont ( Object  obj)
inlineprivate

Dummy functon for application of the style font to a general type of object. Does nothing.

Parameters
objAffected object.
void IG.Sendigence.TextStyle.Apply ( Object  obj)
inline

Dummy functon for application of the style to a general type of object. Does nothing.

Parameters
objAffected object.
void IG.Sendigence.TextStyle.DisposeTextFont ( )
inline

Disposes of this object's font and sets it to null. Dispose() is called on the font onlt if it is owned by the object.

void IG.Sendigence.TextStyle.Dispose ( )
inline

Disposes of this object.

Object IG.Sendigence.TextStyle.Clone ( )
inline

Creates and returns a clone of this object. The clone is functionally identical to but has no common data with this object.

Returns
A clone of this object.
static Font IG.Sendigence.TextStyle.defaultfont ( )
inlinestaticprivate
Font IG.Sendigence.TextStyle.GetFont ( )
inline

Returns the fons of the text style. If the font is not defined, a defauld font is first assigned to the text style and this font is returned, which changes the text style (from the one without a font defined to the one with font defined).

void IG.Sendigence.TextStyle.SetFontSize ( float  size)
inlineprivate

Sets font size for of the text style's font in points. if font was not defined for the style, font becomes the default font with the specified size.

Parameters
sizeSize of the font in points.
void IG.Sendigence.TextStyle.SetFontSize ( float  size,
GraphicsUnit  unit 
)
inlineprivate

Sets font size for of the text style's font. if font was not defined for the style, font becomes the default font with the specified size.

Parameters
sizeSize of the font in specified units.
unitUnits used to define the size.
float IG.Sendigence.TextStyle.GetFontSizeInPoints ( )
inlineprivate

Retrieves font size in points for of the text style's font. if font is not defined for the style, 0 is returned.

Returns
Size of font or 0.0 if font is not defined.
float IG.Sendigence.TextStyle.GetFontSize ( )
inlineprivate

Retrieves font size in points for of the text style's font. if font is not defined for the style, 0 is returned.

Returns
Size of font or 0.0 if font is not defined.
void IG.Sendigence.TextStyle.GetFontSize ( out float  size,
out GraphicsUnit  unit 
)
inlineprivate

Retrieves font size for of the text style's font. if font is not defined for the style, 0 is returned for size and Point for unit.

Parameters
sizeSize of the font in the returned units.
unitUnits used to define the size.
void IG.Sendigence.TextStyle.SaveFontProperties ( )
inlineprivate
void IG.Sendigence.TextStyle.SaveFontProperties ( Font  ft)
inlineprivate
Font IG.Sendigence.TextStyle.RestoreFont ( )
inlineprivate
void IG.Sendigence.TextStyle.CopyFrom ( TextStyle  source)
inline

Copies (retrieves) the text style represented by this object from another style.

Parameters
sourceText style from which the style is copied.
void IG.Sendigence.TextStyle.CopyFrom ( Control  source)
inline

Copies (retrieves) the text style represented by this object from a window consform.

Parameters
sourceWindows consform from which the style is copied.
void IG.Sendigence.TextStyle.CopyFromSelection ( RichTextBox  source)
inline

Copies (retrieves) the text style represented by this object from selection style of a RichTextBox.

Parameters
sourceWindows consform from which the style is copied.
static TextStyle IG.Sendigence.TextStyle.Copy ( TextStyle  source)
inlinestatic

Creates and returns a new style that is a copy of an existing text style.

Parameters
sourceControl from which the style is copied.
static TextStyle IG.Sendigence.TextStyle.Copy ( Control  source)
inlinestatic

Creates and returns a new style that is a copy of the text style of a control.

Parameters
sourceControl from which the style is copied.
static TextStyle IG.Sendigence.TextStyle.Copy ( RichTextBox  source)
inlinestatic

Creates and returns a new style that is a copy of the text style of selected text or insertion point of a rich text box. To copy control's main style instead of the selection style, cast the RichTextBox to Control!

Parameters
sourceRich text box from which the style is copied.
void IG.Sendigence.TextStyle.ApplyBackColor ( Control  control)
inline

Applies the style backgrount color, if defined, to a control.

Parameters
controlAffected control.
void IG.Sendigence.TextStyle.ApplyForeColor ( Control  control)
inline

Applies the style foreground color, if defined, to a control.

Parameters
controlAffected control.
void IG.Sendigence.TextStyle.ApplyFont ( Control  control)
inline

Applies the style font, if defined, to a control. Control gets a clone of the font rather than just a reference to it.

Parameters
controlAffected control.
void IG.Sendigence.TextStyle.Apply ( Control  control)
inline

Applies the style to a control. Only components of the style that are defined are applied (text font is considered atomic). Control gets a clone of the font rather than just a reference to it.

Parameters
controlAffected control.
void IG.Sendigence.TextStyle.ApplyFontReference ( Control  control)
inline

Applies the style font, if defined, to a control. Control gets only a reference of the font, which implies that the style's font may not be disposed while it is used.

Parameters
controlAffected control.
void IG.Sendigence.TextStyle.ApplyReference ( Control  control)
inline

Applies the style to a control. Only components of the style that are defined are applied (text font is considered atomic). Control gets only a reference of the font, which implies that the style's font may not be disposed while it is used.

Parameters
controlAffected control.
void IG.Sendigence.TextStyle.ApplySelectionBackColor ( RichTextBox  control)
inline

Applies the style backgrount color, if defined, to selected text or insertion point of a RichTextBox. To apply the style to the main style of the control instead of selection style, cast the RichTextBox to Control!

Parameters
controlAffected control.
void IG.Sendigence.TextStyle.ApplySelectionForeColor ( RichTextBox  control)
inline

Applies the style foreground color, if defined, to selected text or insertion point of a RichTextBox. To apply the style to the main style of the control instead of selection style, cast the RichTextBox to Control!

Parameters
controlAffected control.
void IG.Sendigence.TextStyle.ApplySelectionFont ( RichTextBox  control)
inline

Applies the style font, if defined, to selected text or insertion point of a RichTextBox. To apply the style to the main style of the control instead of selection style, cast the RichTextBox to Control!

Parameters
controlAffected control.
void IG.Sendigence.TextStyle.ApplySelection ( RichTextBox  control)
inline

Applies the style to selected text or insertion point of a RichTextBox. Only components of the style that are defined are applied (text font is considered atomic). To apply the style to the main style of the control instead of selection style, cast the RichTextBox to Control!

Parameters
controlAffected control.
void IG.Sendigence.TextStyle.ApplySelectionFontReference ( RichTextBox  control)
inline

Applies the style font, if defined, to selected text or insertion point of a RichTextBox. Control gets only a reference of the font, which implies that the style's font may not be disposed while it is used. To apply the style to the main style of the control instead of selection style, cast the RichTextBox to Control!

Parameters
controlAffected control.
void IG.Sendigence.TextStyle.ApplySelectionReference ( RichTextBox  control)
inline

Applies the style to selected text or insertion point of a RichTextBox. Only components of the style that are defined are applied (text font is considered atomic). Control gets only a reference of the font, which implies that the style's font may not be disposed while it is used. To apply the style to the main style of the control instead of selection style, cast the RichTextBox to Control!

Parameters
controlAffected control.
void IG.Sendigence.TextStyle.ApplyBackColor ( Object  obj)
inline

Dummy functon for application of the style background color to a general type of object. Does nothing.

Parameters
objAffected object.
void IG.Sendigence.TextStyle.ApplyForeColor ( Object  obj)
inline

Dummy functon for application of the style foreground color to a general type of object. Does nothing.

Parameters
objAffected object.
void IG.Sendigence.TextStyle.ApplyFont ( Object  obj)
inlineprivate

Dummy functon for application of the style font to a general type of object. Does nothing.

Parameters
objAffected object.
void IG.Sendigence.TextStyle.Apply ( Object  obj)
inline

Dummy functon for application of the style to a general type of object. Does nothing.

Parameters
objAffected object.

Member Data Documentation

bool IG.Sendigence.TextStyle._TextFontOwned = false
private
const string IG.Sendigence.TextStyle.defaultFontFamilyName = "Times"
private
const int IG.Sendigence.TextStyle.defaultFontSize = 10
private
FontFamily IG.Sendigence.TextStyle._FamilyAllocated = null
private
Color IG.Sendigence.TextStyle._BackColor = Color.White
private
Color IG.Sendigence.TextStyle._ForeColor = Color.Black
private
bool IG.Sendigence.TextStyle._BackColorSet = false
private
bool IG.Sendigence.TextStyle._ForeColorSet = false
private
Font IG.Sendigence.TextStyle._TextFont = null
private
bool IG.Sendigence.TextStyle._Bold
private
bool IG.Sendigence.TextStyle._Italic
private
bool IG.Sendigence.TextStyle._Underline
private
bool IG.Sendigence.TextStyle._Strikeout
private
bool IG.Sendigence.TextStyle._GdiVerticalFont
private
bool IG.Sendigence.TextStyle._IsSystemFont
private
byte IG.Sendigence.TextStyle._GdiCharSet
private
FontFamily IG.Sendigence.TextStyle._FontFamily
private
string IG.Sendigence.TextStyle._SystemFontName
private
string IG.Sendigence.TextStyle._Name
private
string IG.Sendigence.TextStyle._OriginalFontName
private
int IG.Sendigence.TextStyle._Height
private
float IG.Sendigence.TextStyle._Size
private
float IG.Sendigence.TextStyle._SizeInPoints
private
FontStyle IG.Sendigence.TextStyle._Style
private
GraphicsUnit IG.Sendigence.TextStyle._Unit
private

Property Documentation

bool IG.Sendigence.TextStyle.TextFontOwned
getprivate set

Gets a value inticating whether the text font is owned by this object or not. If false then font is either nul or onlt a reference to a font object that exists out of this class.

Color IG.Sendigence.TextStyle.BackColor
getset

Gets or sets the text style's background color. When set, the background color gets defined. When not defined, the get() still returns the color. Whether the color is set or not should be verified by the BackColorSet property.

Referenced by IG.Sendigence.TextStyle.Clone(), and IG.Sendigence.TextStyle.CopyFrom().

bool IG.Sendigence.TextStyle.BackColorSet
getset

Specifies whether the text style's background color is defined or not.

Referenced by IG.Sendigence.TextStyle.Clone(), and IG.Sendigence.TextStyle.CopyFrom().

Color IG.Sendigence.TextStyle.ForeColor
getset

Gets or sets the text style's foreground color. When set, the foreground color gets defined. When not defined, the get() still returns the color. Whether the color is set or not should be verified by the ForeColorSet property.

Referenced by IG.Sendigence.TextStyle.Clone(), and IG.Sendigence.TextStyle.CopyFrom().

bool IG.Sendigence.TextStyle.ForeColorSet
getset

Specifies whether the text style's foreground color is defined or not.

Referenced by IG.Sendigence.TextStyle.Clone(), IG.Sendigence.TextStyle.CopyFrom(), and IG.Sendigence.SendigenceProgram.Main().

Font IG.Sendigence.TextStyle.TextFontReference
set

Sets the style's font to a reference to an existent font. Warning: If the reference font is changed (E.G. disposed) then the changes are reflected on this style

Referenced by IG.Sendigence.TextStyle.Clone().

Font IG.Sendigence.TextStyle.TextFont
getset

Gets or sets the style's font. null is used for unspecified, making the style inable to change the current font of a target object. Set: Font is cloned rather than referenced (changes in original are not reflected on this object).

Referenced by IG.Sendigence.TextStyle.Clone(), and IG.Sendigence.TextStyle.CopyFrom().

bool IG.Sendigence.TextStyle.Bold
getset

Gets or sets the bold property of the text style's font. Get: if font is not specified for the text style then false is returned. Set: if font was not defined for the style, font becomes the default font with the specified bold property.

bool IG.Sendigence.TextStyle.Italic
getset

Gets or sets the italic property of the text style's font. Get: if font is not specified for the text style then false is returned. Set: if font was not defined for the style, font becomes the default font with the specified italic property.

bool IG.Sendigence.TextStyle.Underline
getset

Gets or sets the underline property of the text style's font. Get: if font is not specified for the text style then false is returned. Set: if font was not defined for the style, font becomes the default font with the specified underline property.

bool IG.Sendigence.TextStyle.Strikeout
getset

Gets or sets the strikeout property of the text style's font. Get: if font is not specified for the text style then false is returned. Set: if font was not defined for the style, font becomes the default font with the specified strikeout property.

float IG.Sendigence.TextStyle.SizeInPoints
getset

Gets or sets the size of the text style's font in points. Get: if font is not specified for the text style then 0 is returned. Set: if font was not defined for the style, font becomes the default font with the specified size.

Referenced by IG.Sendigence.FormWriterBase.InitStylesAfter().

string IG.Sendigence.TextStyle.Family
getset

Gets or sets the family of the text style's font, where the family is represented by its name. Get: if font is not specified for the text style then null is returned. Set: if font was not defined for the style, font becomes the default font with the specified family.


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