diff options
author | Neil <nyamatongwe@gmail.com> | 2021-05-24 19:31:06 +1000 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2021-05-24 19:31:06 +1000 |
commit | 92290868cf9753d2df0d494cb44e2ff62a570b58 (patch) | |
tree | 001e6cfce84372a03997de3138d630751ee8d38a /src/CallTip.cxx | |
parent | ee1886079d0a5cd350ee8e3379be347943ba93ae (diff) | |
download | scintilla-mirror-92290868cf9753d2df0d494cb44e2ff62a570b58.tar.gz |
Define C++ version of the Scintilla API in ScintillaTypes.h, ScintillaMessages.h
and ScintillaStructures.h using scoped enumerations.
Use these headers instead of Scintilla.h internally.
External definitions go in the Scintilla namespace and internal definitio0ns in
Scintilla::Internal.
Diffstat (limited to 'src/CallTip.cxx')
-rw-r--r-- | src/CallTip.cxx | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/src/CallTip.cxx b/src/CallTip.cxx index 8229fc82c..18caddea1 100644 --- a/src/CallTip.cxx +++ b/src/CallTip.cxx @@ -20,16 +20,18 @@ #include <algorithm> #include <memory> +#include "ScintillaTypes.h" +#include "ScintillaMessages.h" + #include "Debugging.h" #include "Geometry.h" #include "Platform.h" -#include "Scintilla.h" - #include "Position.h" #include "CallTip.h" using namespace Scintilla; +using namespace Scintilla::Internal; size_t Chunk::Length() const noexcept { return end - start; @@ -93,7 +95,7 @@ constexpr bool IsArrowCharacter(char ch) noexcept { return (ch == 0) || (ch == '\001') || (ch == '\002'); } -void DrawArrow(Scintilla::Surface *surface, const PRectangle &rc, bool upArrow, ColourRGBA colourBG, ColourRGBA colourUnSel) { +void DrawArrow(Surface *surface, const PRectangle &rc, bool upArrow, ColourRGBA colourBG, ColourRGBA colourUnSel) { surface->FillRectangle(rc, colourBG); const PRectangle rcClientInner = Clamp(rc.Inset(1), Edge::right, rc.right - 2); surface->FillRectangle(rcClientInner, colourUnSel); @@ -271,8 +273,8 @@ void CallTip::MouseClick(Point pt) noexcept { PRectangle CallTip::CallTipStart(Sci::Position pos, Point pt, int textHeight, const char *defn, const char *faceName, int size, - int codePage_, int characterSet, - int technology, + int codePage_, CharacterSet characterSet, + Technology technology, const char *localeName, const Window &wParent) { clickPlace = 0; @@ -285,8 +287,8 @@ PRectangle CallTip::CallTipStart(Sci::Position pos, Point pt, int textHeight, co inCallTipMode = true; posStartCallTip = pos; const XYPOSITION deviceHeight = static_cast<XYPOSITION>(surfaceMeasure->DeviceHeightFont(size)); - const FontParameters fp(faceName, deviceHeight / SC_FONT_SIZE_MULTIPLIER, SC_WEIGHT_NORMAL, - false, 0, technology, characterSet, localeName); + const FontParameters fp(faceName, deviceHeight / FontSizeMultiplier, FontWeight::Normal, + false, FontQuality::QualityDefault, technology, characterSet, localeName); font = Font::Allocate(fp); // Look for multiple lines in the text // Only support \n here - simply means container must avoid \r! @@ -330,7 +332,7 @@ void CallTip::SetHighlight(size_t start, size_t end) { } // Set the tab size (sizes > 0 enable the use of tabs). This also enables the -// use of the STYLE_CALLTIP. +// use of the StyleCallTip. void CallTip::SetTabSize(int tabSz) noexcept { tabSize = tabSz; useStyleCallTip = true; |