diff options
author | nyamatongwe <unknown> | 2002-06-19 11:01:21 +0000 |
---|---|---|
committer | nyamatongwe <unknown> | 2002-06-19 11:01:21 +0000 |
commit | 1d36d7e91e44d0675bf1c1e3c8834b1d0a4804ee (patch) | |
tree | 27673630a940f5074c74a2199c8b805289f67897 | |
parent | 5fd10810590591df4d2aa51d1de0f239f0fe8dfa (diff) | |
download | scintilla-mirror-1d36d7e91e44d0675bf1c1e3c8834b1d0a4804ee.tar.gz |
TextHeight feature contributed by Josh Wingstrom.
-rw-r--r-- | doc/ScintillaDoc.html | 5 | ||||
-rw-r--r-- | doc/ScintillaHistory.html | 1 | ||||
-rw-r--r-- | include/Scintilla.h | 3 | ||||
-rw-r--r-- | include/Scintilla.iface | 3 | ||||
-rw-r--r-- | src/Editor.cxx | 3 |
5 files changed, 12 insertions, 3 deletions
diff --git a/doc/ScintillaDoc.html b/doc/ScintillaDoc.html index 30d7660dd..39cc14a34 100644 --- a/doc/ScintillaDoc.html +++ b/doc/ScintillaDoc.html @@ -244,6 +244,7 @@ SCI_MOVECARETINSIDEVIEW SCI_WORDENDPOSITION(int position, bool onlyWordCharacters) SCI_WORDSTARTPOSITION(int position, bool onlyWordCharacters) SCI_TEXTWIDTH(int stylenumber, char *text) +SCI_TEXTHEIGHT(int line) </pre> <p> Scintilla maintains a selection which stretches between two points, the anchor and the @@ -267,7 +268,9 @@ SCI_TEXTWIDTH(int stylenumber, char *text) can be used to find the pixel location of text on the display. SCI_TEXTWIDTH can be used to find the pixel width of a string which can be used, for example, to decide how wide to make the line number - margin in order to display a given number of numerals. + margin in order to display a given number of numerals. SCI_TEXTHEIGHT + returns the height in pixels of a particular line. Currently all lines are the + same height. </p> <p> SCI_WORDENDPOSITION and SCI_WORDSTARTPOSITION can be used to find diff --git a/doc/ScintillaHistory.html b/doc/ScintillaHistory.html index 9cd02286f..6bbc94b7e 100644 --- a/doc/ScintillaHistory.html +++ b/doc/ScintillaHistory.html @@ -105,6 +105,7 @@ <li>Don Paul Beletsky</li> <li>Gerhard Kalab</li> <li>Olivier Dagenais</li> + <li>Josh Wingstrom</li> </ul> <p> Sponsorship diff --git a/include/Scintilla.h b/include/Scintilla.h index a15d3da92..b583ab746 100644 --- a/include/Scintilla.h +++ b/include/Scintilla.h @@ -372,6 +372,7 @@ typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam, #define SCI_TEXTWIDTH 2276 #define SCI_SETENDATLASTLINE 2277 #define SCI_GETENDATLASTLINE 2278 +#define SCI_TEXTHEIGHT 2279 #define SCI_LINEDOWN 2300 #define SCI_LINEDOWNEXTEND 2301 #define SCI_LINEUP 2302 @@ -518,11 +519,9 @@ typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam, #define SCK_ADD 310 #define SCK_SUBTRACT 311 #define SCK_DIVIDE 312 -#define KeyMod SCMOD_ #define SCMOD_SHIFT 1 #define SCMOD_CTRL 2 #define SCMOD_ALT 4 -#define Lexer SCLEX_ #define SCN_STYLENEEDED 2000 #define SCN_CHARADDED 2001 #define SCN_SAVEPOINTREACHED 2002 diff --git a/include/Scintilla.iface b/include/Scintilla.iface index e5daa4f96..c310da062 100644 --- a/include/Scintilla.iface +++ b/include/Scintilla.iface @@ -979,6 +979,9 @@ set void SetEndAtLastLine=2277(bool endAtLastLine,) # line at the bottom of the view. get int GetEndAtLastLine=2278(,) +# Retrieve the height of a particular line of text in pixels. +fun int TextHeight=2279(int line,) + ## Start of key messages # Move caret down one line. fun void LineDown=2300(,) diff --git a/src/Editor.cxx b/src/Editor.cxx index fbf44883c..aa05775de 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -4729,6 +4729,9 @@ sptr_t Editor::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) { PLATFORM_ASSERT(lParam); return TextWidth(wParam, CharPtrFromSPtr(lParam)); + case SCI_TEXTHEIGHT: + return vs.lineHeight; + case SCI_SETENDATLASTLINE: PLATFORM_ASSERT((wParam == 0) || (wParam ==1)); if (endAtLastLine != (wParam != 0)) { |