Example #1
0
 static CodeViewerState ChangeDocument(CodeViewerState previousState, ChangeDocumentAction action)
 {
     if (!previousState.ViewerSettings.SelectionLocked)
     {
         previousState.Document = action.Document;
     }
     return(previousState);
 }
Example #2
0
 static CodeViewerState ChangeLockState(CodeViewerState previousState, ChangeLockStateAction action)
 {
     ((ViewerSettings)previousState.ViewerSettings).SelectionLocked = action.Locked;
     return(previousState);
 }
Example #3
0
 static CodeViewerState ToggleShowLineIcons(CodeViewerState previousState, ToggleShowLineIconsAction action)
 {
     ((ViewerSettings)previousState.ViewerSettings).ShowLineIcons = !previousState.ViewerSettings.ShowLineIcons;
     return(previousState);
 }
Example #4
0
 static CodeViewerState ToggleShowLineNumber(CodeViewerState previousState, ToggleShowLineNumberAction action)
 {
     ((ViewerSettings)previousState.ViewerSettings).ShowLineNumber = !previousState.ViewerSettings.ShowLineNumber;
     return(previousState);
 }
Example #5
0
 static CodeViewerState ActivateLine(CodeViewerState previousState, ActivateLineAction action)
 {
     previousState.Document.Callback?.Invoke(action.Line.Metadata);
     return(previousState);
 }