C# Class XNAInterfaceComponents.ChildComponents.XNATextField

Inheritance: XNAInterfaceComponents.AbstractComponents.ChildComponent, Focusable, KeyboardListener, MouseClickListener, MouseMotionListener
ファイルを表示 Open project: Wotuu/RTS_XNA_v2 Class Usage Examples

Private Properties

Property Type Description
DeleteCharacterAt void
InsertStringAtCaret void
ProcessKey void

Public Methods

Method Description
CalculateVerticalScrollBarHeight ( ) : int

Calculates the vertical scrollbar height.

Draw ( SpriteBatch sb ) : void
GetDisplayText ( ) : String

Gets the display text

GetPixelsPerScrollBarTick ( ) : double

Gets the amount of pixels the scrollbar needs to scroll before a row up or down is shown.

GetTextOnRow ( int row ) : String

Gets the text on a row.

OnFocusLost ( ) : void
OnFocusReceived ( ) : void
OnKeyPressed ( XNAInputLibrary.KeyboardInput.KeyEvent e ) : void
OnKeyReleased ( XNAInputLibrary.KeyboardInput.KeyEvent e ) : void
OnKeyTyped ( XNAInputLibrary.KeyboardInput.KeyEvent e ) : void
OnMouseClick ( MouseEvent e ) : void
OnMouseDrag ( MouseEvent e ) : void
OnMouseEnter ( MouseEvent e ) : void
OnMouseExit ( MouseEvent e ) : void
OnMouseMotion ( MouseEvent e ) : void
OnMouseRelease ( MouseEvent e ) : void
ShouldDrawVerticalScrollBar ( ) : System.Boolean

Checks whether we should draw the scrollbar

Unload ( ) : void
Update ( ) : void
XNATextField ( ParentComponent parent, Rectangle bounds, int rows ) : System

Private Methods

Method Description
DeleteCharacterAt ( int index, System.Boolean isBackspace ) : void

Deletes a character, and places the caret before or after the deleted character

InsertStringAtCaret ( String s ) : void

Inserts a string at the current caret position.

ProcessKey ( XNAInputLibrary.KeyboardInput.KeyEvent e ) : void

Method Details

CalculateVerticalScrollBarHeight() public method

Calculates the vertical scrollbar height.
public CalculateVerticalScrollBarHeight ( ) : int
return int

Draw() public method

public Draw ( SpriteBatch sb ) : void
sb Microsoft.Xna.Framework.Graphics.SpriteBatch
return void

GetDisplayText() public method

Gets the display text
public GetDisplayText ( ) : String
return String

GetPixelsPerScrollBarTick() public method

Gets the amount of pixels the scrollbar needs to scroll before a row up or down is shown.
public GetPixelsPerScrollBarTick ( ) : double
return double

GetTextOnRow() public method

Gets the text on a row.
public GetTextOnRow ( int row ) : String
row int The row.
return String

OnFocusLost() public method

public OnFocusLost ( ) : void
return void

OnFocusReceived() public method

public OnFocusReceived ( ) : void
return void

OnKeyPressed() public method

public OnKeyPressed ( XNAInputLibrary.KeyboardInput.KeyEvent e ) : void
e XNAInputLibrary.KeyboardInput.KeyEvent
return void

OnKeyReleased() public method

public OnKeyReleased ( XNAInputLibrary.KeyboardInput.KeyEvent e ) : void
e XNAInputLibrary.KeyboardInput.KeyEvent
return void

OnKeyTyped() public method

public OnKeyTyped ( XNAInputLibrary.KeyboardInput.KeyEvent e ) : void
e XNAInputLibrary.KeyboardInput.KeyEvent
return void

OnMouseClick() public method

public OnMouseClick ( MouseEvent e ) : void
e MouseEvent
return void

OnMouseDrag() public method

public OnMouseDrag ( MouseEvent e ) : void
e MouseEvent
return void

OnMouseEnter() public method

public OnMouseEnter ( MouseEvent e ) : void
e MouseEvent
return void

OnMouseExit() public method

public OnMouseExit ( MouseEvent e ) : void
e MouseEvent
return void

OnMouseMotion() public method

public OnMouseMotion ( MouseEvent e ) : void
e MouseEvent
return void

OnMouseRelease() public method

public OnMouseRelease ( MouseEvent e ) : void
e MouseEvent
return void

ShouldDrawVerticalScrollBar() public method

Checks whether we should draw the scrollbar
public ShouldDrawVerticalScrollBar ( ) : System.Boolean
return System.Boolean

Unload() public method

public Unload ( ) : void
return void

Update() public method

public Update ( ) : void
return void

XNATextField() public method

public XNATextField ( ParentComponent parent, Rectangle bounds, int rows ) : System
parent XNAInterfaceComponents.AbstractComponents.ParentComponent
bounds Microsoft.Xna.Framework.Rectangle
rows int
return System