C# 클래스 SadConsole.Controls.ControlBase

상속: CellSurface, IInput
파일 보기 프로젝트 열기: Thraka/SadConsole 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
bounds Microsoft.Xna.Framework.Rectangle
isEnabled bool
isMouseOver bool
parent Consoles.ControlsConsole
position Point

Private Properties

프로퍼티 타입 설명
AfterDeserialized void

공개 메소드들

메소드 설명
Compose ( ) : void

Redraw the lastest appearance of the control.

This method is implemented by each derived control.

Compose ( bool force ) : void

Redraw the latest appearance of the control if IsDirty is set to true.

ControlBase ( int width, int height ) : System.Runtime.Serialization

Default constructor of the control.

DetermineAppearance ( ) : void

Sets the appropriate theme for the control based on the current state of the control.

Called by the control as the mouse state changes, like when the mouse is clicked on top of the control or leaves the area of the control. This method is implemented by each derived control.

FocusLost ( ) : void

Called when the control loses focus. Calls DetermineAppearance.

Focused ( ) : void

Called when the control is focused. Calls DetermineAppearance.

ProcessKeyboard ( KeyboardInfo info ) : bool

Called when the keyboard is used on this control.

ProcessMouse ( Input info ) : bool

Checks if the mouse is the control and calls the appropriate mouse methods.

Update ( ) : void

Update the control. Calls Compose() and then updates each cell effect if needed.

보호된 메소드들

메소드 설명
OnLeftMouseClicked ( Input info ) : void

Called when the left mouse button is clicked. Raises the MouseButtonClicked event and calls the DetermineAppearance method.

OnMouseEnter ( Input info ) : void

Called when the mouse first enters the control. Raises the MouseEnter event and calls the DetermineAppearance method.

OnMouseExit ( Input info ) : void

Called when the mouse exits the area of the control. Raises the MouseExit event and calls the DetermineAppearance method.

OnMouseIn ( Input info ) : void

Called as the mouse moves around the control area. Raises the MouseMove event and calls the DetermineAppearance method.

OnParentChanged ( ) : void

Called when the parent property is changed.

OnPositionChanged ( ) : void

Called when the control changes position.

OnRightMouseClicked ( Input info ) : void

Called when the right mouse button is clicked. Raises the MouseButtonClicked event and calls the DetermineAppearance method.

TransformConsolePositionByControlPosition ( Input info ) : Point

Helper method that returns the mouse x,y position for the control.

비공개 메소드들

메소드 설명
AfterDeserialized ( StreamingContext context ) : void

메소드 상세

Compose() 공개 추상적인 메소드

Redraw the lastest appearance of the control.
This method is implemented by each derived control.
public abstract Compose ( ) : void
리턴 void

Compose() 공개 메소드

Redraw the latest appearance of the control if IsDirty is set to true.
public Compose ( bool force ) : void
force bool Force the draw to happen by setting IsDirty as true.
리턴 void

ControlBase() 공개 메소드

Default constructor of the control.
public ControlBase ( int width, int height ) : System.Runtime.Serialization
width int
height int
리턴 System.Runtime.Serialization

DetermineAppearance() 공개 추상적인 메소드

Sets the appropriate theme for the control based on the current state of the control.
Called by the control as the mouse state changes, like when the mouse is clicked on top of the control or leaves the area of the control. This method is implemented by each derived control.
public abstract DetermineAppearance ( ) : void
리턴 void

FocusLost() 공개 메소드

Called when the control loses focus. Calls DetermineAppearance.
public FocusLost ( ) : void
리턴 void

Focused() 공개 메소드

Called when the control is focused. Calls DetermineAppearance.
public Focused ( ) : void
리턴 void

OnLeftMouseClicked() 보호된 메소드

Called when the left mouse button is clicked. Raises the MouseButtonClicked event and calls the DetermineAppearance method.
protected OnLeftMouseClicked ( Input info ) : void
info Input The current mouse data
리턴 void

OnMouseEnter() 보호된 메소드

Called when the mouse first enters the control. Raises the MouseEnter event and calls the DetermineAppearance method.
protected OnMouseEnter ( Input info ) : void
info Input The current mouse data
리턴 void

OnMouseExit() 보호된 메소드

Called when the mouse exits the area of the control. Raises the MouseExit event and calls the DetermineAppearance method.
protected OnMouseExit ( Input info ) : void
info Input The current mouse data
리턴 void

OnMouseIn() 보호된 메소드

Called as the mouse moves around the control area. Raises the MouseMove event and calls the DetermineAppearance method.
protected OnMouseIn ( Input info ) : void
info Input The current mouse data
리턴 void

OnParentChanged() 보호된 메소드

Called when the parent property is changed.
protected OnParentChanged ( ) : void
리턴 void

OnPositionChanged() 보호된 메소드

Called when the control changes position.
protected OnPositionChanged ( ) : void
리턴 void

OnRightMouseClicked() 보호된 메소드

Called when the right mouse button is clicked. Raises the MouseButtonClicked event and calls the DetermineAppearance method.
protected OnRightMouseClicked ( Input info ) : void
info Input The current mouse data
리턴 void

ProcessKeyboard() 공개 메소드

Called when the keyboard is used on this control.
public ProcessKeyboard ( KeyboardInfo info ) : bool
info SadConsole.Input.KeyboardInfo The state of the keyboard.
리턴 bool

ProcessMouse() 공개 메소드

Checks if the mouse is the control and calls the appropriate mouse methods.
public ProcessMouse ( Input info ) : bool
info Input Mouse information.
리턴 bool

TransformConsolePositionByControlPosition() 보호된 메소드

Helper method that returns the mouse x,y position for the control.
protected TransformConsolePositionByControlPosition ( Input info ) : Point
info Input The mouse information as used by a mouse event.
리턴 Point

Update() 공개 메소드

Update the control. Calls Compose() and then updates each cell effect if needed.
public Update ( ) : void
리턴 void

프로퍼티 상세

bounds 보호되어 있는 프로퍼티

protected Rectangle,Microsoft.Xna.Framework bounds
리턴 Microsoft.Xna.Framework.Rectangle

isEnabled 보호되어 있는 프로퍼티

protected bool isEnabled
리턴 bool

isMouseOver 보호되어 있는 프로퍼티

protected bool isMouseOver
리턴 bool

parent 보호되어 있는 프로퍼티

protected Consoles.ControlsConsole parent
리턴 Consoles.ControlsConsole

position 보호되어 있는 프로퍼티

protected Point position
리턴 Point