C# Class Scroller.ScrollingStrategyBase

Inheritance: IScrollingStrategy, IHighlightableElement
Show file Open project: Invenietis/ck-certified

Public Methods

Method Description
BeginHighlight ( BeginScrollingInfo beginScrollingInfo, ScrollingDirective scrollingDirective ) : ScrollingDirective
ElementUnregistered ( HighlightModel element ) : void
EndHighlight ( EndScrollingInfo endScrollingInfo, ScrollingDirective scrollingDirective ) : ScrollingDirective
GoToElement ( HighlightModel element ) : void
MoveNext ( ActionType action ) : void

Move the cursor to the next element according to the given ActionType

OnExternalEvent ( ) : void
Pause ( bool forceEndHighlight ) : void
Resume ( ) : void
ScrollingStrategyBase ( ) : System
SelectElement ( ScrollingDirective scrollingDirective ) : ScrollingDirective
Setup ( DispatcherTimer timer, Func getElements, IPluginConfigAccessor config ) : void
Start ( ) : void
Stop ( ) : void

Protected Methods

Method Description
ActiveAutoPause ( ) : void
CanMove ( ) : bool

Determine whether a move can be performed or not.

DeactiveAutoPause ( ) : void
FireBeginHighlight ( ) : void

Calls the BeginHighlight method of the current IHighlightableElement It also sets LastDirective to the ScrollingDirective object returned by the call to BeginHighlight.

FireEndHighlight ( IHighlightableElement previousElement, IHighlightableElement element ) : void

Calls the EndHighlight method of the current IHighlightableElement It also sets _lastDirective to the ScrollingDirective object returned by the call to EndHighlight.

FireSelectElement ( ) : void

Calls the SelectElement method of the current IHighlightableElement It also sets LastDirective to the ScrollingDirective object returned by the call to SelectElement.

OnConfigChanged ( object sender, CK.Plugin.Config.ConfigChangedEventArgs e ) : void
OnInternalBeat ( object sender, EventArgs e ) : void
ProcessSkipBehavior ( ActionType action ) : void

Read the the SkipBehavior of the current element and process it.

ResetAutoPause ( ) : void
UpdateAutoPauseTicks ( ActionType LastActionType ) : void
WarnNextAction ( ActionType action ) : ActionType

Allow IHighlightableElementController to change the given action used for the next move

Private Methods

Method Description
CheckAutoPauseCondition ( ) : bool
EnsureReactivity ( ) : void

if the directive is to react instantly, we stop the timer, simulate a tick, and relaunch the timer.

Method Details

ActiveAutoPause() protected method

protected ActiveAutoPause ( ) : void
return void

BeginHighlight() public method

public BeginHighlight ( BeginScrollingInfo beginScrollingInfo, ScrollingDirective scrollingDirective ) : ScrollingDirective
beginScrollingInfo HighlightModel.BeginScrollingInfo
scrollingDirective HighlightModel.ScrollingDirective
return HighlightModel.ScrollingDirective

CanMove() protected method

Determine whether a move can be performed or not.
protected CanMove ( ) : bool
return bool

DeactiveAutoPause() protected method

protected DeactiveAutoPause ( ) : void
return void

ElementUnregistered() public method

public ElementUnregistered ( HighlightModel element ) : void
element HighlightModel
return void

EndHighlight() public method

public EndHighlight ( EndScrollingInfo endScrollingInfo, ScrollingDirective scrollingDirective ) : ScrollingDirective
endScrollingInfo HighlightModel.EndScrollingInfo
scrollingDirective HighlightModel.ScrollingDirective
return HighlightModel.ScrollingDirective

FireBeginHighlight() protected method

Calls the BeginHighlight method of the current IHighlightableElement It also sets LastDirective to the ScrollingDirective object returned by the call to BeginHighlight.
protected FireBeginHighlight ( ) : void
return void

FireEndHighlight() protected method

Calls the EndHighlight method of the current IHighlightableElement It also sets _lastDirective to the ScrollingDirective object returned by the call to EndHighlight.
protected FireEndHighlight ( IHighlightableElement previousElement, IHighlightableElement element ) : void
previousElement IHighlightableElement
element IHighlightableElement
return void

FireSelectElement() protected method

Calls the SelectElement method of the current IHighlightableElement It also sets LastDirective to the ScrollingDirective object returned by the call to SelectElement.
protected FireSelectElement ( ) : void
return void

GoToElement() public method

public GoToElement ( HighlightModel element ) : void
element HighlightModel
return void

MoveNext() public method

Move the cursor to the next element according to the given ActionType
public MoveNext ( ActionType action ) : void
action ActionType The ActionType that indicate the move direction
return void

OnConfigChanged() protected method

protected OnConfigChanged ( object sender, CK.Plugin.Config.ConfigChangedEventArgs e ) : void
sender object
e CK.Plugin.Config.ConfigChangedEventArgs
return void

OnExternalEvent() public method

public OnExternalEvent ( ) : void
return void

OnInternalBeat() protected method

protected OnInternalBeat ( object sender, EventArgs e ) : void
sender object
e System.EventArgs
return void

Pause() public method

public Pause ( bool forceEndHighlight ) : void
forceEndHighlight bool
return void

ProcessSkipBehavior() protected method

Read the the SkipBehavior of the current element and process it.
protected ProcessSkipBehavior ( ActionType action ) : void
action ActionType
return void

ResetAutoPause() protected method

protected ResetAutoPause ( ) : void
return void

Resume() public method

public Resume ( ) : void
return void

ScrollingStrategyBase() public method

public ScrollingStrategyBase ( ) : System
return System

SelectElement() public method

public SelectElement ( ScrollingDirective scrollingDirective ) : ScrollingDirective
scrollingDirective HighlightModel.ScrollingDirective
return HighlightModel.ScrollingDirective

Setup() public method

public Setup ( DispatcherTimer timer, Func getElements, IPluginConfigAccessor config ) : void
timer System.Windows.Threading.DispatcherTimer
getElements Func
config IPluginConfigAccessor
return void

Start() public method

public Start ( ) : void
return void

Stop() public method

public Stop ( ) : void
return void

UpdateAutoPauseTicks() protected method

protected UpdateAutoPauseTicks ( ActionType LastActionType ) : void
LastActionType ActionType
return void

WarnNextAction() protected method

Allow IHighlightableElementController to change the given action used for the next move
protected WarnNextAction ( ActionType action ) : ActionType
action ActionType
return ActionType