C# Class SIL.FieldWorks.FwCoreDlgControls.FontFeaturesButton

Font Features button
Inheritance: System.Windows.Forms.Button, IFWDisposable
Mostrar archivo Open project: sillsdev/FieldWorks Class Usage Examples

Public Methods

Method Description
CheckDisposed ( ) : void

Check to see if the object has been disposed. All public Properties and Methods should call this before doing anything else.

FontFeaturesButton ( ) : System

Initializes a new instance of the FontFeaturesButton class.

GenerateFeatureString ( int ids, int values ) : string

This is the inverse operation of ParseFeatureString.

ParseFeatureString ( int ids, string stFeatures ) : int[]

Parse a feature string from a renderer. The feature string is of the form 1=12,2=23,3="abcd" where the first number in each pair is a feature ID, the second is the value. The quoted form represents a special trick form (which this class never outputs, but apparently may be found in existing engines), where the low bytes of up to four characters are combined to make the value. The routine returns an array the same length as ids[]. By default all values are the largest possible integer, signifying the default value of the property. For each id in ids that is matched by an id in the string, we record the corresponding valuein values.

SetupFontFeatures ( ) : void

Setups the font features.

Protected Methods

Method Description
Dispose ( bool disposing ) : void

Clean up any resources being used.

OnClick ( EventArgs e ) : void

Raises the click event.

OnFontFeatureSelected ( EventArgs ea ) : void

Handle the FontFeatureSelected event; by default just calls delegates.

Private Methods

Method Description
FindNextFeature ( string stFeatures, int ichMin ) : int

Scan for another feature value, which is marked by a comma.

InitializeComponent ( ) : void

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

ItemClickHandler ( Object sender, EventArgs e ) : void

Items the click handler.

ParseNextFid ( string stFeatures, int ichMin, int &ichLim ) : int

Parse a feature string to find the next feature id value, skipping any leading spaces. Also skip past the trailing equal sign, and any surrounding spaces.

ParseNumericValue ( string stFeatures, int ichMin, int &ichLim ) : int

Parse the value, which is a number (digit string).

ParseQuotedValue ( string stFeatures, int ichMin, int &ichLim ) : int

Parse the value, which is a quoted string. The first four characters are packed into a 32-bit integer by taking the low byte of each character.

Method Details

CheckDisposed() public method

Check to see if the object has been disposed. All public Properties and Methods should call this before doing anything else.
public CheckDisposed ( ) : void
return void

Dispose() protected method

Clean up any resources being used.
protected Dispose ( bool disposing ) : void
disposing bool
return void

FontFeaturesButton() public method

Initializes a new instance of the FontFeaturesButton class.
public FontFeaturesButton ( ) : System
return System

GenerateFeatureString() static public method

This is the inverse operation of ParseFeatureString.
static public GenerateFeatureString ( int ids, int values ) : string
ids int The ids.
values int The values.
return string

OnClick() protected method

Raises the click event.
protected OnClick ( EventArgs e ) : void
e System.EventArgs The instance containing the event data.
return void

OnFontFeatureSelected() protected method

Handle the FontFeatureSelected event; by default just calls delegates.
protected OnFontFeatureSelected ( EventArgs ea ) : void
ea System.EventArgs The instance containing the event data.
return void

ParseFeatureString() static public method

Parse a feature string from a renderer. The feature string is of the form 1=12,2=23,3="abcd" where the first number in each pair is a feature ID, the second is the value. The quoted form represents a special trick form (which this class never outputs, but apparently may be found in existing engines), where the low bytes of up to four characters are combined to make the value. The routine returns an array the same length as ids[]. By default all values are the largest possible integer, signifying the default value of the property. For each id in ids that is matched by an id in the string, we record the corresponding valuein values.
static public ParseFeatureString ( int ids, string stFeatures ) : int[]
ids int
stFeatures string
return int[]

SetupFontFeatures() public method

Setups the font features.
public SetupFontFeatures ( ) : void
return void