aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authornyamatongwe <unknown>2001-12-19 07:26:34 +0000
committernyamatongwe <unknown>2001-12-19 07:26:34 +0000
commit4111db4baf3e8dcd726be593f7a0ed00768b6f26 (patch)
tree693b6b24b4df4b7ca2a188f33767efe1c4192d40 /src
parent4bbf5d16b5bc787e78b8a03499d719ac173f5f0b (diff)
downloadscintilla-mirror-4111db4baf3e8dcd726be593f7a0ed00768b6f26.tar.gz
Support Unicode in calltips.
Diffstat (limited to 'src')
-rw-r--r--src/CallTip.cxx6
-rw-r--r--src/CallTip.h3
-rw-r--r--src/ScintillaBase.cxx3
3 files changed, 8 insertions, 4 deletions
diff --git a/src/CallTip.cxx b/src/CallTip.cxx
index 8f85e1b5c..4b4ae0c7c 100644
--- a/src/CallTip.cxx
+++ b/src/CallTip.cxx
@@ -117,17 +117,19 @@ void CallTip::PaintCT(Surface *surfaceWindow) {
}
PRectangle CallTip::CallTipStart(int pos, Point pt, const char *defn,
- const char *faceName, int size) {
+ const char *faceName, int size, bool unicodeMode_) {
if (val)
delete []val;
val = new char[strlen(defn) + 1];
if (!val)
return PRectangle();
strcpy(val, defn);
- Surface *surfaceMeasure=Surface::Allocate();
+ unicodeMode = unicodeMode_;
+ Surface *surfaceMeasure = Surface::Allocate();
if (!surfaceMeasure)
return PRectangle();
surfaceMeasure->Init();
+ surfaceMeasure->SetUnicodeMode(unicodeMode);
startHighlight = 0;
endHighlight = 0;
inCallTipMode = true;
diff --git a/src/CallTip.h b/src/CallTip.h
index b38a4840a..9f5025f63 100644
--- a/src/CallTip.h
+++ b/src/CallTip.h
@@ -29,6 +29,7 @@ public:
ColourPair colourSel;
ColourPair colourShade;
ColourPair colourLight;
+ bool unicodeMode;
CallTip();
~CallTip();
@@ -40,7 +41,7 @@ public:
/// Setup the calltip and return a rectangle of the area required.
PRectangle CallTipStart(int pos, Point pt, const char *defn,
- const char *faceName, int size);
+ const char *faceName, int size, bool unicodeMode_);
void CallTipCancel();
diff --git a/src/ScintillaBase.cxx b/src/ScintillaBase.cxx
index eb882cfad..fe732cabd 100644
--- a/src/ScintillaBase.cxx
+++ b/src/ScintillaBase.cxx
@@ -491,7 +491,8 @@ sptr_t ScintillaBase::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lPara
PRectangle rc = ct.CallTipStart(currentPos, pt,
reinterpret_cast<char *>(lParam),
vs.styles[STYLE_DEFAULT].fontName,
- vs.styles[STYLE_DEFAULT].sizeZoomed);
+ vs.styles[STYLE_DEFAULT].sizeZoomed,
+ IsUnicodeMode());
// If the call-tip window would be out of the client
// space, adjust so it displays above the text.
PRectangle rcClient = GetClientRectangle();