C# 클래스 ThoNohT.NohBoard.Keyboard.ElementDefinitions.KeyboardKeyDefinition

상속: KeyDefinition
파일 보기 프로젝트 열기: ThoNohT/NohBoard 1 사용 예제들

Private Properties

프로퍼티 타입 설명
GetText string
UnionWith KeyboardKeyDefinition

공개 메소드들

메소드 설명
BordersWith ( KeyboardKeyDefinition otherKey ) : bool

Checks whether this key overlaps with another specified key definition.

KeyboardKeyDefinition ( int id, List boundaries, List keyCodes, string normalText, string shiftText, bool changeOnCaps ) : System

Initializes a new instance of the KeyboardKeyDefinition class.

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

KeyboardKeyDefinition ( int id, List boundaries, List keyCodes, string text, string shiftText, bool changeOnCaps, TPoint textPosition ) : System

Initializes a new instance of the KeyboardKeyDefinition class.

Render ( Graphics g, bool pressed, bool shift, bool capsLock ) : void

Renders the key in the specified surface.

Translate ( int dx, int dy ) : ElementDefinition

Translates the element, moving it the specified distance.

UnionWith ( List keys ) : KeyDefinition

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

비공개 메소드들

메소드 설명
GetText ( bool shift, bool capsLock ) : string

Determines whether to use the shift text or the regular text for this key depening on the shift, caps lock state and the key's properties. Returns the text that should be displayed for this state.

UnionWith ( IList keys ) : KeyboardKeyDefinition

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

메소드 상세

BordersWith() 공개 메소드

Checks whether this key overlaps with another specified key definition.
public BordersWith ( KeyboardKeyDefinition otherKey ) : bool
otherKey KeyboardKeyDefinition The other key to check for overlapping on.
리턴 bool

KeyboardKeyDefinition() 공개 메소드

Initializes a new instance of the KeyboardKeyDefinition class.
The position of the text is determined from the bounding box of the key.
public KeyboardKeyDefinition ( int id, List boundaries, List keyCodes, string normalText, string shiftText, bool changeOnCaps ) : System
id int The identifier of the key.
boundaries List The boundaries.
keyCodes List The keycodes.
normalText string The normal text.
shiftText string The shift text.
changeOnCaps bool Whether to change to shift text on caps lock.
리턴 System

KeyboardKeyDefinition() 공개 메소드

Initializes a new instance of the KeyboardKeyDefinition class.
public KeyboardKeyDefinition ( int id, List boundaries, List keyCodes, string text, string shiftText, bool changeOnCaps, TPoint textPosition ) : System
id int The identifier of the key.
boundaries List The boundaries.
keyCodes List The keycodes.
text string The normal text.
shiftText string The shift text.
changeOnCaps bool Whether to change to shift text on caps lock.
textPosition TPoint The position of the text.
리턴 System

Render() 공개 메소드

Renders the key in the specified surface.
public Render ( Graphics g, bool pressed, bool shift, bool capsLock ) : void
g System.Drawing.Graphics The GDI+ surface to render on.
pressed bool A value indicating whether to render the key in its pressed state or not.
shift bool A value indicating whether shift is pressed during the render.
capsLock bool A value indicating whether caps lock is pressed during the render.
리턴 void

Translate() 공개 메소드

Translates the element, moving it the specified distance.
public Translate ( int dx, int dy ) : ElementDefinition
dx int The distance along the x-axis.
dy int The distance along the y-axis.
리턴 ElementDefinition

UnionWith() 공개 메소드

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