Closed electroly closed 3 years ago
Thank you! I will look at it during the next days.
I had to make some additional changes, but I've got everything working now including syntax coloring using my own lexer.
It's working very nicely!
Closing this PR now that https://github.com/electroly/tmbasic/pull/4 has been merged.
This code was hastily prepared and I don't expect it to be mergeable as-is, but it can serve as a proof of concept for the desired division of responsibilities.
I refactored the
EditorWindow
class so that everything turbo-specific (generally the window management and file handling stuff) is in a subclass (still calledEditorWindow
), with a newBaseEditorWindow
class offering a convenient extension point for external users. I've implemented a subclass ofBaseEditorWindow
in tmbasic and it seems to be working ok. I haven't finished the integration work, but I don't think any upstream changes are required for the rest.I also extended the
Clipboard
class to allow a subclass to implement fallback behavior when libclipboard fails.