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