C# Class Vidka.Core.UiObj.VidkaUiStateObjects

This class serves 2 functions: 1 - keeps all interactive UI objects in one place. 2 - provides easier management of when a state changes to help trigger repaint only when neccesary.
Show file Open project: miktemk/VidkaEditor Class Usage Examples

Public Methods

Method Description
ClearAll ( ) : void
ClearDraggy ( ) : void
ClearStateChangeFlag ( ) : void

Call this before every serious interaction method. Then do some shit. Then call DidSomethingChange() to see if you need to repaint.

DidSomethingChange ( ) : bool

Call this at the end of every serious interaction method. if this returns true, then you probably need to repaint.

DidSomethingChange_originalTimeline ( ) : bool

Used to change player position when console is hidden and player floats around

IncCurrentMarkerFrame ( long frameInc ) : void
PleaseShowAllUsages ( VidkaProj proj ) : void
SetActiveAudio ( VidkaClipAudio active ) : void

There can only be one selected (active) b/w video and audio line, so video will be set to null

SetActiveVideo ( VidkaClipVideoAbstract active, VidkaProj proj ) : void

There can only be one selected (active) b/w video and audio line, so audio will be set to null Needs proj to find absolute frame position (CurrentClipFrameAbsPos)

SetCurrentMarkerFrame ( long frame ) : void
SetDraggyAudio ( VidkaClipAudio clip ) : void
SetDraggyCoordinates ( EditorDraggyMode mode = null, long frameLength = null, string text = null, int mouseX = null, int mouseXOffset = null, bool hasAudio = null, long frameAbsLeft = null ) : void
SetDraggyVideo ( VidkaClipVideoAbstract clip ) : void
SetHoverAudio ( VidkaClipAudio hover ) : void

There can only be one hover b/w video and audio line, so video will be set to null

SetHoverGeneric ( VidkaClip hoverClip, VidkaProj proj ) : void

Uses proj.ClipsAudio.Contains(hoverClip) to determine which to set HoverAudio or HoverVideo

SetHoverVideo ( VidkaClipVideoAbstract hover ) : void

There can only be one hover b/w video and audio line, so audio will be set to null

SetOriginalTimelinePlaybackMode ( bool flag ) : void
SetShowEasingHandles ( bool flag ) : void
SetShowVideoAudioLinkage ( bool flag ) : void
SetTimelineHover ( ProjectDimensionsTimelineType hover ) : void
SetTrimHover ( TrimDirection trimHover ) : void
SetTrimThreshPixels ( int trimThreshPixels ) : void
UiStateChanged ( ) : void

Call if a repaint should be forced anyway, regardless

UpdateCurrentClipFrameAbsPos ( VidkaProj proj ) : void

proj parameter is only needed for video clip, to find its abs position

VidkaUiStateObjects ( ) : System
setMouseDragFrameDelta ( long frameDelta ) : void
setMouseDragFrameDeltaMainTimelineOnly ( bool p ) : void

Private Methods

Method Description
resetCurrentClipUsages ( ) : void

Method Details

ClearAll() public method

public ClearAll ( ) : void
return void

ClearDraggy() public method

public ClearDraggy ( ) : void
return void

ClearStateChangeFlag() public method

Call this before every serious interaction method. Then do some shit. Then call DidSomethingChange() to see if you need to repaint.
public ClearStateChangeFlag ( ) : void
return void

DidSomethingChange() public method

Call this at the end of every serious interaction method. if this returns true, then you probably need to repaint.
public DidSomethingChange ( ) : bool
return bool

DidSomethingChange_originalTimeline() public method

Used to change player position when console is hidden and player floats around
public DidSomethingChange_originalTimeline ( ) : bool
return bool

IncCurrentMarkerFrame() public method

public IncCurrentMarkerFrame ( long frameInc ) : void
frameInc long
return void

PleaseShowAllUsages() public method

public PleaseShowAllUsages ( VidkaProj proj ) : void
proj Vidka.Core.Model.VidkaProj
return void

SetActiveAudio() public method

There can only be one selected (active) b/w video and audio line, so video will be set to null
public SetActiveAudio ( VidkaClipAudio active ) : void
active Vidka.Core.Model.VidkaClipAudio
return void

SetActiveVideo() public method

There can only be one selected (active) b/w video and audio line, so audio will be set to null Needs proj to find absolute frame position (CurrentClipFrameAbsPos)
public SetActiveVideo ( VidkaClipVideoAbstract active, VidkaProj proj ) : void
active Vidka.Core.Model.VidkaClipVideoAbstract
proj Vidka.Core.Model.VidkaProj
return void

SetCurrentMarkerFrame() public method

public SetCurrentMarkerFrame ( long frame ) : void
frame long
return void

SetDraggyAudio() public method

public SetDraggyAudio ( VidkaClipAudio clip ) : void
clip Vidka.Core.Model.VidkaClipAudio
return void

SetDraggyCoordinates() public method

public SetDraggyCoordinates ( EditorDraggyMode mode = null, long frameLength = null, string text = null, int mouseX = null, int mouseXOffset = null, bool hasAudio = null, long frameAbsLeft = null ) : void
mode EditorDraggyMode
frameLength long
text string
mouseX int
mouseXOffset int
hasAudio bool
frameAbsLeft long
return void

SetDraggyVideo() public method

public SetDraggyVideo ( VidkaClipVideoAbstract clip ) : void
clip Vidka.Core.Model.VidkaClipVideoAbstract
return void

SetHoverAudio() public method

There can only be one hover b/w video and audio line, so video will be set to null
public SetHoverAudio ( VidkaClipAudio hover ) : void
hover Vidka.Core.Model.VidkaClipAudio
return void

SetHoverGeneric() public method

Uses proj.ClipsAudio.Contains(hoverClip) to determine which to set HoverAudio or HoverVideo
public SetHoverGeneric ( VidkaClip hoverClip, VidkaProj proj ) : void
hoverClip Vidka.Core.Model.VidkaClip
proj Vidka.Core.Model.VidkaProj
return void

SetHoverVideo() public method

There can only be one hover b/w video and audio line, so audio will be set to null
public SetHoverVideo ( VidkaClipVideoAbstract hover ) : void
hover Vidka.Core.Model.VidkaClipVideoAbstract
return void

SetOriginalTimelinePlaybackMode() public method

public SetOriginalTimelinePlaybackMode ( bool flag ) : void
flag bool
return void

SetShowEasingHandles() public method

public SetShowEasingHandles ( bool flag ) : void
flag bool
return void

SetShowVideoAudioLinkage() public method

public SetShowVideoAudioLinkage ( bool flag ) : void
flag bool
return void

SetTimelineHover() public method

public SetTimelineHover ( ProjectDimensionsTimelineType hover ) : void
hover ProjectDimensionsTimelineType
return void

SetTrimHover() public method

public SetTrimHover ( TrimDirection trimHover ) : void
trimHover TrimDirection
return void

SetTrimThreshPixels() public method

public SetTrimThreshPixels ( int trimThreshPixels ) : void
trimThreshPixels int
return void

UiStateChanged() public method

Call if a repaint should be forced anyway, regardless
public UiStateChanged ( ) : void
return void

UpdateCurrentClipFrameAbsPos() public method

proj parameter is only needed for video clip, to find its abs position
public UpdateCurrentClipFrameAbsPos ( VidkaProj proj ) : void
proj Vidka.Core.Model.VidkaProj
return void

VidkaUiStateObjects() public method

public VidkaUiStateObjects ( ) : System
return System

setMouseDragFrameDelta() public method

public setMouseDragFrameDelta ( long frameDelta ) : void
frameDelta long
return void

setMouseDragFrameDeltaMainTimelineOnly() public method

public setMouseDragFrameDeltaMainTimelineOnly ( bool p ) : void
p bool
return void