aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--curses/Makefile8
-rw-r--r--curses/ScintillaCurses.cxx26
2 files changed, 6 insertions, 28 deletions
diff --git a/curses/Makefile b/curses/Makefile
index 77bfd14dd..a21eae1c2 100644
--- a/curses/Makefile
+++ b/curses/Makefile
@@ -18,10 +18,10 @@ CURSES_FLAGS =
scintilla = ../bin/scintilla.a
sci = AutoComplete.o CallTip.o CaseConvert.o CaseFolder.o Catalogue.o \
CellBuffer.o CharacterCategory.o CharClassify.o ContractionState.o \
- Decoration.o Document.o EditModel.o Editor.o EditView.o ExternalLexer.o \
- Indicator.o KeyMap.o LineMarker.o MarginView.o PerLine.o PositionCache.o \
- RESearch.o RunStyles.o ScintillaBase.o Selection.o Style.o \
- UniConversion.o ViewStyle.o XPM.o \
+ DBCS.o Decoration.o Document.o EditModel.o Editor.o EditView.o \
+ ExternalLexer.o Indicator.o KeyMap.o LineMarker.o MarginView.o PerLine.o \
+ PositionCache.o RESearch.o RunStyles.o ScintillaBase.o Selection.o \
+ Style.o UniConversion.o ViewStyle.o XPM.o \
Accessor.o CharacterSet.o LexerBase.o LexerModule.o LexerNoExceptions.o \
LexerSimple.o PropSetSimple.o StyleContext.o WordList.o
lexers = $(addsuffix .o,$(basename $(sort $(notdir $(wildcard ../lexers/Lex*.cxx)))))
diff --git a/curses/ScintillaCurses.cxx b/curses/ScintillaCurses.cxx
index c03680d20..90b9d7584 100644
--- a/curses/ScintillaCurses.cxx
+++ b/curses/ScintillaCurses.cxx
@@ -453,8 +453,6 @@ public:
XYPOSITION Descent(Font &font_) { return 0; }
/** Returns 0 since curses characters have no leading. */
XYPOSITION InternalLeading(Font &font_) { return 0; }
- /** Returns 0 since curses characters have no leading. */
- XYPOSITION ExternalLeading(Font &font_) { return 0; }
/** Returns 1 since curses characters always have a height of 1. */
XYPOSITION Height(Font &font_) { return 1; }
/** Returns 1 since curses characters always have a width of 1. */
@@ -866,22 +864,7 @@ ColourDesired Platform::ChromeHighlight() { return ColourDesired(0, 0, 0); }
const char *Platform::DefaultFont() { return "monospace"; }
int Platform::DefaultFontSize() { return 10; }
unsigned int Platform::DoubleClickTime() { return 500; /* ms */ }
-bool Platform::MouseButtonBounce() { return true; }
void Platform::DebugDisplay(const char *s) { fprintf(stderr, "%s", s); }
-//bool Platform::IsKeyDown(int key) { return false; }
-//long Platform::SendScintilla(WindowID w, unsigned int msg,
-// unsigned long wParam, long lParam) { return 0; }
-//long Platform::SendScintillaPointer(WindowID w, unsigned int msg,
-// unsigned long wParam,
-// void *lParam) { return 0; }
-//bool Platform::IsDBCSLeadByte(int codePage, char ch) { return false; }
-//int Platform::DBCSCharLength(int codePage, const char *s) {
-// int bytes = mblen(s, MB_CUR_MAX);
-// return (bytes >= 1) ? bytes : 1;
-//}
-//int Platform::DBCSCharMaxLength() { return MB_CUR_MAX; }
-int Platform::Minimum(int a, int b) { return (a < b) ? a : b; }
-int Platform::Maximum(int a, int b) { return (a > b) ? a : b; }
void Platform::DebugPrintf(const char *format, ...) {}
//bool Platform::ShowAssertionPopUps(bool assertionPopUps_) { return true; }
void Platform::Assert(const char *c, const char *file, int line) {
@@ -890,11 +873,6 @@ void Platform::Assert(const char *c, const char *file, int line) {
Platform::DebugDisplay(buffer);
abort();
}
-int Platform::Clamp(int val, int minVal, int maxVal) {
- if (val > maxVal) val = maxVal;
- if (val < minVal) val = minVal;
- return val;
-}
/** Implementation of Scintilla for curses. */
class ScintillaCurses : public ScintillaBase {
@@ -1049,9 +1027,9 @@ public:
WINDOW *w = GetWINDOW();
int maxy = getmaxy(w), maxx = getmaxx(w);
int height = roundf(static_cast<float>(nPage) / nMax * maxy);
- scrollBarHeight = Platform::Clamp(height, 1, maxy);
+ scrollBarHeight = Sci::clamp(height, 1, maxy);
int width = roundf(static_cast<float>(maxx) / scrollWidth * maxx);
- scrollBarWidth = Platform::Clamp(width, 1, maxx);
+ scrollBarWidth = Sci::clamp(width, 1, maxx);
return true;
}
/**