C# 클래스 PowerArgs.Cli.FocusManager

A class that manages the focus of a CLI application
상속: ObservableObject
파일 보기 프로젝트 열기: adamabdelhamed/PowerArgs 1 사용 예제들

공개 메소드들

메소드 설명
Add ( ConsoleControl c ) : void

Adds the current control to the current focus context

ClearFocus ( ) : void

Clears the focus, but preserves the focus index

FocusManager ( ) : System

Initializes the focus manager

Pop ( ) : void

Pops the current focus context. This should be called if you've implemented a modal dialog like experience and your dialog has just closed. Pop() will automatically restore focus on the previous context.

Push ( ) : void

Pushes a new focus context onto the stack. This is useful, for example, when a dialog appears above all other controls and you want to limit focus to the dialog to acheive a modal affect. You must remember to call pop when your context ends.

Remove ( ConsoleControl c ) : void

Removes the control from all focus contexts

TryMoveFocus ( bool forward = true ) : bool

Tries to move the focus forward or backwards

TryRestoreFocus ( ) : bool

Tries to restore the focus on the given context

TrySetFocus ( ConsoleControl newFocusControl ) : bool

Tries to set focus on the given control.

비공개 메소드들

메소드 설명
CycleFocusIndex ( bool forward ) : bool

메소드 상세

Add() 공개 메소드

Adds the current control to the current focus context
public Add ( ConsoleControl c ) : void
c ConsoleControl The control to add
리턴 void

ClearFocus() 공개 메소드

Clears the focus, but preserves the focus index
public ClearFocus ( ) : void
리턴 void

FocusManager() 공개 메소드

Initializes the focus manager
public FocusManager ( ) : System
리턴 System

Pop() 공개 메소드

Pops the current focus context. This should be called if you've implemented a modal dialog like experience and your dialog has just closed. Pop() will automatically restore focus on the previous context.
public Pop ( ) : void
리턴 void

Push() 공개 메소드

Pushes a new focus context onto the stack. This is useful, for example, when a dialog appears above all other controls and you want to limit focus to the dialog to acheive a modal affect. You must remember to call pop when your context ends.
public Push ( ) : void
리턴 void

Remove() 공개 메소드

Removes the control from all focus contexts
public Remove ( ConsoleControl c ) : void
c ConsoleControl The control to remove
리턴 void

TryMoveFocus() 공개 메소드

Tries to move the focus forward or backwards
public TryMoveFocus ( bool forward = true ) : bool
forward bool If true then the manager will try to move forwards, otherwise backwards
리턴 bool

TryRestoreFocus() 공개 메소드

Tries to restore the focus on the given context
public TryRestoreFocus ( ) : bool
리턴 bool

TrySetFocus() 공개 메소드

Tries to set focus on the given control.
public TrySetFocus ( ConsoleControl newFocusControl ) : bool
newFocusControl ConsoleControl the control to focus.
리턴 bool