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.Forms.FontSelectorSimple Class Reference

Simple control that allows font selection. More...

+ Inheritance diagram for IG.Forms.FontSelectorSimple:
+ Collaboration diagram for IG.Forms.FontSelectorSimple:

Public Member Functions

 FontSelectorSimple ()
 
 FontSelectorSimple (Font initialFont)
 
string FontDescriptionShort ()
 Returns short textual description of the selected forn. More...
 
void UpdateAppearance ()
 Updates appearance of the control, according to the state of font selection and the actual font. More...
 
 FontSelectorSimple ()
 
 FontSelectorSimple (Font initialFont)
 
string FontDescriptionShort ()
 Returns short textual description of the selected forn. More...
 
void UpdateAppearance ()
 Updates appearance of the control, according to the state of font selection and the actual font. More...
 

Static Public Member Functions

static string FontDesctiptionShort (Font font)
 Returns a short desription of the specified font. More...
 
static string FontDesctiptionShort (Font font)
 Returns a short desription of the specified font. More...
 

Public Attributes

string _initialFontLabelText = "< Click to select font! >"
 

Protected Member Functions

void OpenFontDialog ()
 
void OnFontSelected (object sender, FontEventArgs eventArgs)
 Triggers the FontSelected event. This occurs whenewer the selected font is changed, or when it is set for the first time. More...
 
void OnFontSelectedFirstTime (object sender, FontEventArgs eventArgs)
 Triggers the FontSelectedFirstTime event. This occurs when font is selected for the first time. More...
 
void OpenFontDialog ()
 
void OnFontSelected (object sender, FontEventArgs eventArgs)
 Triggers the FontSelected event. This occurs whenewer the selected font is changed, or when it is set for the first time. More...
 
void OnFontSelectedFirstTime (object sender, FontEventArgs eventArgs)
 Triggers the FontSelectedFirstTime event. This occurs when font is selected for the first time. More...
 

Properties

bool IsFontSelected [get, set]
 
Font SelectedFont [get, set]
 
string InitialFontLabelText [get, set]
 
Color InitialFontLabelForeColor [get]
 
Color NormalFontLabelForeColor [get]
 

Events

FontEventHandler FontSelected
 Event that is fired when the selected font changes. More...
 
FontEventHandler FontSelectedFirstTime
 Event that occurs when the selected font gets defined (i.e., when it is set for the first time). More...
 

Private Member Functions

void btnOpenDialog_Click (object sender, EventArgs e)
 
void lblFontDescription_Click (object sender, EventArgs e)
 
void InitializeComponent ()
 Required designer variable. More...
 
void btnOpenDialog_Click (object sender, EventArgs e)
 
void lblFontDescription_Click (object sender, EventArgs e)
 
void InitializeComponent ()
 Required designer variable. More...
 

Private Attributes

bool _isFontSelected = false
 
Font _selectedFont = new Font("Times New Roman", 10)
 
System.Windows.Forms.Button btnOpenDialog
 
System.Windows.Forms.FontDialog fontDialog1
 
System.Windows.Forms.Label lblFontDescription
 

Detailed Description

Simple control that allows font selection.

Contains a button for font selection and a label with short description of the current font.

The font is initially unspecified when control if control is created with default constructor.

Font can be queeried, and change of font fires an event.

Constructor & Destructor Documentation

IG.Forms.FontSelectorSimple.FontSelectorSimple ( )
inline
IG.Forms.FontSelectorSimple.FontSelectorSimple ( Font  initialFont)
inline
IG.Forms.FontSelectorSimple.FontSelectorSimple ( )
inline
IG.Forms.FontSelectorSimple.FontSelectorSimple ( Font  initialFont)
inline

Member Function Documentation

string IG.Forms.FontSelectorSimple.FontDescriptionShort ( )
inline

Returns short textual description of the selected forn.

static string IG.Forms.FontSelectorSimple.FontDesctiptionShort ( Font  font)
inlinestatic

Returns a short desription of the specified font.

Description contains font size, family name, and descriptors indicating whether it is bold, italic, underlined, or strikedout, separated by commas. If font has no modifier properties like bold then hte corresponding discriptor is just empty. Descriptors are like "bold", "italic", "underlined", etc.

Parameters
fontFont whose description is returned.
Returns
void IG.Forms.FontSelectorSimple.UpdateAppearance ( )
inline

Updates appearance of the control, according to the state of font selection and the actual font.

void IG.Forms.FontSelectorSimple.OpenFontDialog ( )
inlineprotected
void IG.Forms.FontSelectorSimple.OnFontSelected ( object  sender,
FontEventArgs  eventArgs 
)
inlineprotected

Triggers the FontSelected event. This occurs whenewer the selected font is changed, or when it is set for the first time.

void IG.Forms.FontSelectorSimple.OnFontSelectedFirstTime ( object  sender,
FontEventArgs  eventArgs 
)
inlineprotected

Triggers the FontSelectedFirstTime event. This occurs when font is selected for the first time.

void IG.Forms.FontSelectorSimple.btnOpenDialog_Click ( object  sender,
EventArgs  e 
)
inlineprivate
void IG.Forms.FontSelectorSimple.lblFontDescription_Click ( object  sender,
EventArgs  e 
)
inlineprivate
void IG.Forms.FontSelectorSimple.InitializeComponent ( )
inlineprivate

Required designer variable.

Required method for Designer support - do not modify the contents of this method with the code editor.

string IG.Forms.FontSelectorSimple.FontDescriptionShort ( )
inline

Returns short textual description of the selected forn.

static string IG.Forms.FontSelectorSimple.FontDesctiptionShort ( Font  font)
inlinestatic

Returns a short desription of the specified font.

Description contains font size, family name, and descriptors indicating whether it is bold, italic, underlined, or strikedout, separated by commas. If font has no modifier properties like bold then hte corresponding discriptor is just empty. Descriptors are like "bold", "italic", "underlined", etc.

Parameters
fontFont whose description is returned.
Returns
void IG.Forms.FontSelectorSimple.UpdateAppearance ( )
inline

Updates appearance of the control, according to the state of font selection and the actual font.

void IG.Forms.FontSelectorSimple.OpenFontDialog ( )
inlineprotected
void IG.Forms.FontSelectorSimple.OnFontSelected ( object  sender,
FontEventArgs  eventArgs 
)
inlineprotected

Triggers the FontSelected event. This occurs whenewer the selected font is changed, or when it is set for the first time.

void IG.Forms.FontSelectorSimple.OnFontSelectedFirstTime ( object  sender,
FontEventArgs  eventArgs 
)
inlineprotected

Triggers the FontSelectedFirstTime event. This occurs when font is selected for the first time.

void IG.Forms.FontSelectorSimple.btnOpenDialog_Click ( object  sender,
EventArgs  e 
)
inlineprivate
void IG.Forms.FontSelectorSimple.lblFontDescription_Click ( object  sender,
EventArgs  e 
)
inlineprivate
void IG.Forms.FontSelectorSimple.InitializeComponent ( )
inlineprivate

Required designer variable.

Required method for Designer support - do not modify the contents of this method with the code editor.

Member Data Documentation

bool IG.Forms.FontSelectorSimple._isFontSelected = false
private
Font IG.Forms.FontSelectorSimple._selectedFont = new Font("Times New Roman", 10)
private
string IG.Forms.FontSelectorSimple._initialFontLabelText = "< Click to select font! >"
System Windows Forms Button IG.Forms.FontSelectorSimple.btnOpenDialog
private
System Windows Forms FontDialog IG.Forms.FontSelectorSimple.fontDialog1
private
System Windows Forms Label IG.Forms.FontSelectorSimple.lblFontDescription
private

Property Documentation

bool IG.Forms.FontSelectorSimple.IsFontSelected
getsetprotected
Font IG.Forms.FontSelectorSimple.SelectedFont
getset
string IG.Forms.FontSelectorSimple.InitialFontLabelText
getset
Color IG.Forms.FontSelectorSimple.InitialFontLabelForeColor
getprotected
Color IG.Forms.FontSelectorSimple.NormalFontLabelForeColor
getprotected

Event Documentation

FontEventHandler IG.Forms.FontSelectorSimple.FontSelected

Event that is fired when the selected font changes.

FontEventHandler IG.Forms.FontSelectorSimple.FontSelectedFirstTime

Event that occurs when the selected font gets defined (i.e., when it is set for the first time).


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