C# Class ThoNohT.NohBoard.Keyboard.ElementDefinitions.KeyDefinition

Inheritance: ElementDefinition
Afficher le fichier Open project: ThoNohT/NohBoard Class Usage Examples

Private Properties

Свойство Type Description
GetBoundingBoxImpl System.Drawing.Rectangle

Méthodes publiques

Méthode Description
BordersWith ( KeyDefinition otherKey ) : bool

Checks whether this key overlaps with another specified key definition.

GetBoundingBox ( ) : Rectangle

Returns the bounding box of this element.

Inside ( Point point ) : bool

Calculates whether the specified point is inside this element.

UnionWith ( List keys ) : KeyDefinition

Updates the key definition to occupy a region of itself plus the specified other keys.

Méthodes protégées

Méthode Description
GetBackgroundBrush ( KeySubStyle subStyle, bool pressed ) : Brush

Rmeturns the background brush for the key.

GetPath ( ) : List

Returns a Clipper recognized path for the boundaries of this key.

KeyDefinition ( int id, List boundaries, List keyCodes, string text ) : System.Collections.Generic

Initializes a new instance of the KeyDefinition class.

The position of the text is determined from the bounding box of the key.

KeyDefinition ( int id, List boundaries, List keyCodes, string text, TPoint textPosition ) : System.Collections.Generic

Initializes a new instance of the KeyDefinition class.

Private Methods

Méthode Description
GetBoundingBoxImpl ( ) : Rectangle

Returns the bounding box of this element.

Method Details

BordersWith() public méthode

Checks whether this key overlaps with another specified key definition.
public BordersWith ( KeyDefinition otherKey ) : bool
otherKey KeyDefinition The other key to check for overlapping on.
Résultat bool

GetBackgroundBrush() protected méthode

Rmeturns the background brush for the key.
protected GetBackgroundBrush ( KeySubStyle subStyle, bool pressed ) : Brush
subStyle KeySubStyle The substyle to use for rendering the key.
pressed bool Whether the is pressed.
Résultat System.Drawing.Brush

GetBoundingBox() public méthode

Returns the bounding box of this element.
public GetBoundingBox ( ) : Rectangle
Résultat System.Drawing.Rectangle

GetPath() protected méthode

Returns a Clipper recognized path for the boundaries of this key.
protected GetPath ( ) : List
Résultat List

Inside() public méthode

Calculates whether the specified point is inside this element.
public Inside ( Point point ) : bool
point System.Drawing.Point The point.
Résultat bool

KeyDefinition() protected méthode

Initializes a new instance of the KeyDefinition class.
The position of the text is determined from the bounding box of the key.
protected KeyDefinition ( int id, List boundaries, List keyCodes, string text ) : System.Collections.Generic
id int The identifier of the key.
boundaries List The boundaries.
keyCodes List The keycodes.
text string The text of the key.
Résultat System.Collections.Generic

KeyDefinition() protected méthode

Initializes a new instance of the KeyDefinition class.
protected KeyDefinition ( int id, List boundaries, List keyCodes, string text, TPoint textPosition ) : System.Collections.Generic
id int The identifier of the key.
boundaries List The boundaries.
keyCodes List The keycodes.
text string The text of the key.
textPosition TPoint The position of the text.
Résultat System.Collections.Generic

UnionWith() public abstract méthode

Updates the key definition to occupy a region of itself plus the specified other keys.
public abstract UnionWith ( List keys ) : KeyDefinition
keys List The keys to union with.
Résultat KeyDefinition