1. ) --------------------------------------------------
In my App the Calltip window appers left outside the scintilla Widget.
Maybe a chnge like this will do:
void ScintillaBase::CallTipShow(Point pt, const char *defn) {
AutoCompleteCancel();
pt.y += vs.lineHeight;
PRectangle rc = ct.CallTipStart(currentPos, pt,
defn,
vs.styles[STYLE_DEFAULT].fontName,
vs.styles[STYLE_DEFAULT].sizeZoomed,
CodePage(),
vs.styles[STYLE_DEFAULT].characterSet,
wMain);
// If the call-tip window would be out of the client
// space, adjust so it displays above the text.
PRectangle rcClient = GetClientRectangle();
if (rc.bottom > rcClient.bottom) {
int offset = vs.lineHeight + rc.Height();
rc.top -= offset;
rc.bottom -= offset;
}
// Collins *start* Adjust if left outside
if (rc.left < rcClient.left) {
int offset = rcClient.left - rc.left + 5;
rc.left += offset;
rc.right += offset;
}
// Collins *end* Adjust if left outside
// Now display the window.
CreateCallTipWindow(rc);
ct.wCallTip.SetPositionRelative(rc, wMain);
ct.wCallTip.Show();
}
2. ) --------------------------------------------------
Unexact hit-Test in
bool Editor::PointInSelection(Point pt)
The method returns true, allthough the point is (left or right ) outside the
selection
bool Editor::PointInSelection(Point pt) {
int pos = PositionFromLocation(pt);
if (0 == PositionInSelection(pos)) {
// Probably inside, but we must make a finer test
int selStart, selEnd;
if (selType == selStream) {
selStart = SelectionStart();
selEnd = SelectionEnd();
} else {
SelectionLineIterator lineIterator(this);
lineIterator.SetAt(pdoc->LineFromPosition(pos));
selStart = lineIterator.startPos;
selEnd = lineIterator.endPos;
}
if (pos == selStart) {
// see if just before selection
Point locStart = LocationFromPosition(pos);
if (pt.x < locStart.x) {
return false;
}
}
if (pos == selEnd) {
// see if just after selection
Point locEnd = LocationFromPosition(pos);
if (pt.x > locEnd.x) {
return false;
}
}
// Collins *Start* even finerer test
// The Click could have happened left or right from the selection
int curLine = pdoc->LineFromPosition( pos );
int lineStart = pdoc->LineStart( curLine );
int lineEnd = pdoc->LineEnd( curLine );
Point locStart = LocationFromPosition(lineStart);
if (pt.x < locStart.x) {
return false;
}
Point locEnd = LocationFromPosition(lineEnd);
if (pt.x > locEnd.x) {
return false;
}
// Collins *End* even finerer test
return true;
}
return false;
}
3. ) --------------------------------------------------
I would appreciate some more const correctness in scintilla.
Could you make change these methods of SString to const methods ? ( This
hurts nobody :-) )
bool contains(char ch)
bool contains(const char *sFind)
to
bool contains(char ch) const
bool contains(const char *sFind) const
______________________________________________________________
Verschicken Sie romantische, coole und witzige Bilder per SMS!
Jetzt bei WEB.DE FreeMail: http://f.web.de/?mc=021193
_______________________________________________
Scintilla-interest mailing list
[email protected]
http://mailman.lyra.org/mailman/listinfo/scintilla-interest