Skip to content

Commit 42b23b7

Browse files
committed
Added custom scrollbar to avalonEdit text editor
1 parent afb656e commit 42b23b7

252 files changed

Lines changed: 48113 additions & 13 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CutCode.sln

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ VisualStudioVersion = 16.0.31515.178
55
MinimumVisualStudioVersion = 10.0.40219.1
66
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CutCode", "CutCode\CutCode.csproj", "{05099602-B5CB-4056-A265-035AD8982699}"
77
EndProject
8-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ICSharpCode.AvalonEdit", "..\..\AvalonEdit\ICSharpCode.AvalonEdit\ICSharpCode.AvalonEdit.csproj", "{FF99C7A0-5362-49B3-886D-1AE27AF6BA4E}"
8+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ICSharpCode.AvalonEdit", "ICSharpCode.AvalonEdit\ICSharpCode.AvalonEdit.csproj", "{3A46776C-D775-4814-8073-60A6D3D14AA7}"
99
EndProject
1010
Global
1111
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -29,18 +29,18 @@ Global
2929
{05099602-B5CB-4056-A265-035AD8982699}.Release|iPhone.Build.0 = Release|Any CPU
3030
{05099602-B5CB-4056-A265-035AD8982699}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
3131
{05099602-B5CB-4056-A265-035AD8982699}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
32-
{FF99C7A0-5362-49B3-886D-1AE27AF6BA4E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
33-
{FF99C7A0-5362-49B3-886D-1AE27AF6BA4E}.Debug|Any CPU.Build.0 = Debug|Any CPU
34-
{FF99C7A0-5362-49B3-886D-1AE27AF6BA4E}.Debug|iPhone.ActiveCfg = Debug|Any CPU
35-
{FF99C7A0-5362-49B3-886D-1AE27AF6BA4E}.Debug|iPhone.Build.0 = Debug|Any CPU
36-
{FF99C7A0-5362-49B3-886D-1AE27AF6BA4E}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
37-
{FF99C7A0-5362-49B3-886D-1AE27AF6BA4E}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
38-
{FF99C7A0-5362-49B3-886D-1AE27AF6BA4E}.Release|Any CPU.ActiveCfg = Release|Any CPU
39-
{FF99C7A0-5362-49B3-886D-1AE27AF6BA4E}.Release|Any CPU.Build.0 = Release|Any CPU
40-
{FF99C7A0-5362-49B3-886D-1AE27AF6BA4E}.Release|iPhone.ActiveCfg = Release|Any CPU
41-
{FF99C7A0-5362-49B3-886D-1AE27AF6BA4E}.Release|iPhone.Build.0 = Release|Any CPU
42-
{FF99C7A0-5362-49B3-886D-1AE27AF6BA4E}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
43-
{FF99C7A0-5362-49B3-886D-1AE27AF6BA4E}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
32+
{3A46776C-D775-4814-8073-60A6D3D14AA7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
33+
{3A46776C-D775-4814-8073-60A6D3D14AA7}.Debug|Any CPU.Build.0 = Debug|Any CPU
34+
{3A46776C-D775-4814-8073-60A6D3D14AA7}.Debug|iPhone.ActiveCfg = Debug|Any CPU
35+
{3A46776C-D775-4814-8073-60A6D3D14AA7}.Debug|iPhone.Build.0 = Debug|Any CPU
36+
{3A46776C-D775-4814-8073-60A6D3D14AA7}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
37+
{3A46776C-D775-4814-8073-60A6D3D14AA7}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
38+
{3A46776C-D775-4814-8073-60A6D3D14AA7}.Release|Any CPU.ActiveCfg = Release|Any CPU
39+
{3A46776C-D775-4814-8073-60A6D3D14AA7}.Release|Any CPU.Build.0 = Release|Any CPU
40+
{3A46776C-D775-4814-8073-60A6D3D14AA7}.Release|iPhone.ActiveCfg = Release|Any CPU
41+
{3A46776C-D775-4814-8073-60A6D3D14AA7}.Release|iPhone.Build.0 = Release|Any CPU
42+
{3A46776C-D775-4814-8073-60A6D3D14AA7}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
43+
{3A46776C-D775-4814-8073-60A6D3D14AA7}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
4444
EndGlobalSection
4545
GlobalSection(SolutionProperties) = preSolution
4646
HideSolutionNode = FALSE

CutCode/CutCode.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@
5959

6060
<ItemGroup>
6161
<ProjectReference Include="..\..\..\AvalonEdit\ICSharpCode.AvalonEdit\ICSharpCode.AvalonEdit.csproj" />
62+
<ProjectReference Include="..\ICSharpCode.AvalonEdit\ICSharpCode.AvalonEdit.csproj" />
6263
</ItemGroup>
6364

6465
<ItemGroup>
Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
// Copyright (c) 2014 AlphaSierraPapa for the SharpDevelop Team
2+
//
3+
// Permission is hereby granted, free of charge, to any person obtaining a copy of this
4+
// software and associated documentation files (the "Software"), to deal in the Software
5+
// without restriction, including without limitation the rights to use, copy, modify, merge,
6+
// publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
7+
// to whom the Software is furnished to do so, subject to the following conditions:
8+
//
9+
// The above copyright notice and this permission notice shall be included in all copies or
10+
// substantial portions of the Software.
11+
//
12+
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
13+
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
14+
// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
15+
// FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
16+
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
17+
// DEALINGS IN THE SOFTWARE.
18+
19+
using System.Windows.Input;
20+
21+
namespace ICSharpCode.AvalonEdit
22+
{
23+
/// <summary>
24+
/// Custom commands for AvalonEdit.
25+
/// </summary>
26+
public static class AvalonEditCommands
27+
{
28+
/// <summary>
29+
/// Toggles Overstrike mode
30+
/// The default shortcut is Ins.
31+
/// </summary>
32+
public static readonly RoutedCommand ToggleOverstrike = new RoutedCommand(
33+
"ToggleOverstrike", typeof(TextEditor),
34+
new InputGestureCollection {
35+
new KeyGesture(Key.Insert)
36+
});
37+
38+
/// <summary>
39+
/// Deletes the current line.
40+
/// The default shortcut is Ctrl+D.
41+
/// </summary>
42+
public static readonly RoutedCommand DeleteLine = new RoutedCommand(
43+
"DeleteLine", typeof(TextEditor),
44+
new InputGestureCollection {
45+
new KeyGesture(Key.D, ModifierKeys.Control)
46+
});
47+
48+
/// <summary>
49+
/// Removes leading whitespace from the selected lines (or the whole document if the selection is empty).
50+
/// </summary>
51+
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1702:CompoundWordsShouldBeCasedCorrectly", MessageId = "Whitespace",
52+
Justification = "WPF uses 'Whitespace'")]
53+
public static readonly RoutedCommand RemoveLeadingWhitespace = new RoutedCommand("RemoveLeadingWhitespace", typeof(TextEditor));
54+
55+
/// <summary>
56+
/// Removes trailing whitespace from the selected lines (or the whole document if the selection is empty).
57+
/// </summary>
58+
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1702:CompoundWordsShouldBeCasedCorrectly", MessageId = "Whitespace",
59+
Justification = "WPF uses 'Whitespace'")]
60+
public static readonly RoutedCommand RemoveTrailingWhitespace = new RoutedCommand("RemoveTrailingWhitespace", typeof(TextEditor));
61+
62+
/// <summary>
63+
/// Converts the selected text to upper case.
64+
/// </summary>
65+
public static readonly RoutedCommand ConvertToUppercase = new RoutedCommand("ConvertToUppercase", typeof(TextEditor));
66+
67+
/// <summary>
68+
/// Converts the selected text to lower case.
69+
/// </summary>
70+
public static readonly RoutedCommand ConvertToLowercase = new RoutedCommand("ConvertToLowercase", typeof(TextEditor));
71+
72+
/// <summary>
73+
/// Converts the selected text to title case.
74+
/// </summary>
75+
public static readonly RoutedCommand ConvertToTitleCase = new RoutedCommand("ConvertToTitleCase", typeof(TextEditor));
76+
77+
/// <summary>
78+
/// Inverts the case of the selected text.
79+
/// </summary>
80+
public static readonly RoutedCommand InvertCase = new RoutedCommand("InvertCase", typeof(TextEditor));
81+
82+
/// <summary>
83+
/// Converts tabs to spaces in the selected text.
84+
/// </summary>
85+
public static readonly RoutedCommand ConvertTabsToSpaces = new RoutedCommand("ConvertTabsToSpaces", typeof(TextEditor));
86+
87+
/// <summary>
88+
/// Converts spaces to tabs in the selected text.
89+
/// </summary>
90+
public static readonly RoutedCommand ConvertSpacesToTabs = new RoutedCommand("ConvertSpacesToTabs", typeof(TextEditor));
91+
92+
/// <summary>
93+
/// Converts leading tabs to spaces in the selected lines (or the whole document if the selection is empty).
94+
/// </summary>
95+
public static readonly RoutedCommand ConvertLeadingTabsToSpaces = new RoutedCommand("ConvertLeadingTabsToSpaces", typeof(TextEditor));
96+
97+
/// <summary>
98+
/// Converts leading spaces to tabs in the selected lines (or the whole document if the selection is empty).
99+
/// </summary>
100+
public static readonly RoutedCommand ConvertLeadingSpacesToTabs = new RoutedCommand("ConvertLeadingSpacesToTabs", typeof(TextEditor));
101+
102+
/// <summary>
103+
/// Runs the IIndentationStrategy on the selected lines (or the whole document if the selection is empty).
104+
/// </summary>
105+
public static readonly RoutedCommand IndentSelection = new RoutedCommand(
106+
"IndentSelection", typeof(TextEditor),
107+
new InputGestureCollection {
108+
new KeyGesture(Key.I, ModifierKeys.Control)
109+
});
110+
}
111+
}
2.39 KB
Loading

0 commit comments

Comments
 (0)