Skip to content

Commit 1c132cf

Browse files
committed
Add IManager
1 parent e39894e commit 1c132cf

File tree

17 files changed

+70
-21
lines changed

17 files changed

+70
-21
lines changed

BellColorTextBox.Net/BellColorTextBox.ImGuiNet/ImGuiTextBox.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ private void RenderTextBox(Vector2 size)
115115
Vector2 viewPos = new Vector2(ImGui.GetScrollX(), ImGui.GetScrollY());
116116
Vector2 viewSize = new Vector2(contentSize.X - ImGui.GetStyle().ScrollbarSize, contentSize.Y);
117117

118+
_textBox.Tick();
118119
_textBox.Render(viewPos, viewSize);
119120

120121
ImGui.End();

BellColorTextBox.Net/BellColorTextBox.Net/Actions/Action.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
using System.Text;
22
using Bell.Data;
3+
using Bell.Managers;
34
using Bell.Utils;
45

56
namespace Bell.Actions;

BellColorTextBox.Net/BellColorTextBox.Net/Actions/Command.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using Bell.Data;
2+
using Bell.Managers;
23
using Bell.Utils;
34

45
namespace Bell.Actions;

BellColorTextBox.Net/BellColorTextBox.Net/BellColorTextBox.Net.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,5 @@
2323
</None>
2424
</ItemGroup>
2525

26+
2627
</Project>

BellColorTextBox.Net/BellColorTextBox.Net/Data/Coordinates.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
using Bell.Utils;
1+
using Bell.Managers;
2+
using Bell.Utils;
23

34
namespace Bell.Data;
45

BellColorTextBox.Net/BellColorTextBox.Net/Data/Line.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
using System.Text;
33
using System.Text.RegularExpressions;
44
using Bell.Languages;
5+
using Bell.Managers;
56
using Bell.Themes;
67
using Bell.Utils;
78

BellColorTextBox.Net/BellColorTextBox.Net/Data/Row.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
using Bell.Utils;
1+
using Bell.Managers;
2+
using Bell.Utils;
23

34
namespace Bell.Data;
45

BellColorTextBox.Net/BellColorTextBox.Net/Actions/ActionManager.cs renamed to BellColorTextBox.Net/BellColorTextBox.Net/Managers/ActionManager.cs

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
using System.Text;
2-
using Bell.Utils;
2+
using Bell.Actions;
3+
using Action = Bell.Actions.Action;
34

4-
namespace Bell.Actions;
5+
namespace Bell.Managers;
56

6-
internal class ActionManager
7+
internal class ActionManager : IManager
78
{
89
private const int HistoryCapacity = 1000;
910
private readonly LinkedList<Action> _actionHistory = new();
@@ -114,4 +115,8 @@ internal string GetDebugString()
114115
}
115116
return sb.ToString();
116117
}
118+
119+
public void Tick()
120+
{
121+
}
117122
}

BellColorTextBox.Net/BellColorTextBox.Net/Data/CaretManager.cs renamed to BellColorTextBox.Net/BellColorTextBox.Net/Managers/CaretManager.cs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
using System.Text;
22
using Bell.Actions;
3+
using Bell.Data;
34
using Bell.Utils;
45

5-
namespace Bell.Data;
6+
namespace Bell.Managers;
67

78
// Interface
89
internal partial class CaretManager
@@ -55,7 +56,7 @@ internal static bool IsLineHasCaret(int lineIndex) =>
5556
}
5657

5758
// Implementation
58-
internal partial class CaretManager
59+
internal partial class CaretManager : IManager
5960
{
6061
private readonly List<Caret> _carets = new();
6162
private readonly List<string> _clipboard = new();
@@ -397,4 +398,8 @@ private void RemoveDuplicatedCarets_()
397398
}
398399
TextBox.Ins.CaretBlinkStopwatch.Restart();
399400
}
401+
402+
public void Tick()
403+
{
404+
}
400405
}

BellColorTextBox.Net/BellColorTextBox.Net/Data/FontManager.cs renamed to BellColorTextBox.Net/BellColorTextBox.Net/Managers/FontManager.cs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
using Bell.Utils;
1+
using Bell.Data;
22

3-
namespace Bell.Data;
3+
namespace Bell.Managers;
44

55
// Interface
66
internal partial class FontManager
@@ -17,7 +17,7 @@ internal partial class FontManager
1717
}
1818

1919
// Implementation
20-
internal partial class FontManager
20+
internal partial class FontManager : IManager
2121
{
2222
private readonly Dictionary<float, Font> _fontDictionary = new();
2323

@@ -58,4 +58,8 @@ private float GetLineHeightOffset_()
5858
{
5959
return ((_fontCache.Size * TextBox.Ins.LeadingHeight) - _fontCache.Size) / 2.0f;
6060
}
61+
62+
public void Tick()
63+
{
64+
}
6165
}

0 commit comments

Comments
 (0)