aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Editor.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/Editor.h')
-rw-r--r--src/Editor.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/Editor.h b/src/Editor.h
index 9af2add43..417700ed5 100644
--- a/src/Editor.h
+++ b/src/Editor.h
@@ -624,6 +624,19 @@ protected: // ScintillaBase subclass needs access to much of Editor
return static_cast<const char *>(PtrFromUPtr(wParam));
}
+ static constexpr Scintilla::sptr_t SPtrFromUPtr(Scintilla::uptr_t wParam) noexcept {
+ return static_cast<Scintilla::sptr_t>(wParam);
+ }
+ static constexpr Sci::Position PositionFromUPtr(Scintilla::uptr_t wParam) noexcept {
+ return SPtrFromUPtr(wParam);
+ }
+ static constexpr Sci::Line LineFromUPtr(Scintilla::uptr_t wParam) noexcept {
+ return SPtrFromUPtr(wParam);
+ }
+ Point PointFromParameters(Scintilla::uptr_t wParam, Scintilla::sptr_t lParam) const noexcept {
+ return Point(static_cast<XYPOSITION>(wParam) - vs.ExternalMarginWidth(), static_cast<XYPOSITION>(lParam));
+ }
+
constexpr std::optional<FoldLevel> OptionalFoldLevel(Scintilla::sptr_t lParam) {
if (lParam >= 0) {
return static_cast<FoldLevel>(lParam);