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

Inheritance: ElementDefinition
Exibir arquivo Open project: ThoNohT/NohBoard Class Usage Examples

Private Properties

Property Type Description
GetBoundingBoxImpl System.Drawing.Rectangle

Public Methods

Method 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.

Protected Methods

Method 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

Method Description
GetBoundingBoxImpl ( ) : Rectangle

Returns the bounding box of this element.

Method Details

BordersWith() public method

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.
return bool

GetBackgroundBrush() protected method

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.
return System.Drawing.Brush

GetBoundingBox() public method

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

GetPath() protected method

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

Inside() public method

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

KeyDefinition() protected method

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.
return System.Collections.Generic

KeyDefinition() protected method

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.
return System.Collections.Generic

UnionWith() public abstract method

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.
return KeyDefinition