Call tips implemented

Originally committed to SVN as r682.
This commit is contained in:
Rodrigo Braz Monteiro 2007-01-02 18:15:17 +00:00
parent 893955d773
commit 3ec34573a8
2 changed files with 6 additions and 1 deletions

View File

@ -125,6 +125,7 @@ SubsTextEditCtrl::SubsTextEditCtrl(wxWindow* parent, wxWindowID id, const wxStri
delim = _T(" .,;:!?¿¡-(){}[]\"/\\");
// Prototypes for call tips
tipProtoN = -1;
proto.Add(_T("move(x1,y1,x2,y2)"));
proto.Add(_T("move(x1,y1,x2,y2,startTime,endTime)"));
proto.Add(_T("fn;FontName"));
@ -515,6 +516,7 @@ void SubsTextEditCtrl::UpdateCallTip() {
wxString useProto;
wxString cleanProto;
wxString protoName;
int protoN;
bool semiProto = false;
for (unsigned int i=0;i<proto.Count();i++) {
// Get prototype name
@ -542,6 +544,7 @@ void SubsTextEditCtrl::UpdateCallTip() {
if (proto[i].Freq(_T(',')) >= tagCommas) {
// Found
useProto = proto[i];
protoN = i;
break;
}
}
@ -580,7 +583,8 @@ void SubsTextEditCtrl::UpdateCallTip() {
}
// Show calltip
CallTipShow(pos,cleanProto);
if (!CallTipActive() || tipProtoN != protoN) CallTipShow(GetUnicodePosition(tagStart),cleanProto);
tipProtoN = protoN;
CallTipSetHighlight(highStart,highEnd);
}

View File

@ -64,6 +64,7 @@ private:
int currentWordPos;
wxArrayString proto;
int tipProtoN;
void OnMouseEvent(wxMouseEvent &event);