| 17 skipped lines |
| 18 | U | 18 | U | inCallTipMode = false; |
|
| 19 | U | 19 | U | posStartCallTip = 0; |
|
|
| 21 | C | xUp = -100; | | 21 | C | rectUp = PRectangle(0,0,0,0); |
| 22 | C | xDown = -100; | | 22 | C | rectDown = PRectangle(0,0,0,0); |
|
| 24 | U | 24 | U | startHighlight = 0; |
|
|
| 49 skipped lines |
| 75 | U | 75 | U | if (IsArrowCharacter(s[startSeg])) { |
|
| 76 | U | 76 | U | xEnd = x + widthArrow; |
|
| 77 | U | 77 | U | offsetMain = xEnd; |
|
| | | 78 | A | rcClient.left = x; |
| | | 79 | A | rcClient.right = xEnd; |
|
| 79 | U | 81 | U | const int halfWidth = widthArrow / 2 - 3; |
|
| 80 | U | 82 | U | const int centreX = x + widthArrow / 2 - 1; |
|
| 81 | U | 83 | U | const int centreY = (rcClient.top + rcClient.bottom) / 2; |
|
| 82 | R | rcClient.left = x; | | |
| 83 | R | rcClient.right = xEnd; | | |
| 84 | U | 84 | U | surface->FillRectangle(rcClient, colourBG.allocated); |
|
| 85 | U | 85 | U | PRectangle rcClientInner(rcClient.left+1, rcClient.top+1, rcClient.right-2, rcClient.bottom-1); |
|
| 86 | U | 86 | U | surface->FillRectangle(rcClientInner, colourUnSel.allocated); |
|
| 17 skipped lines |
| 104 | U | 104 | U | surface->Polygon(pts, sizeof(pts) / sizeof(pts[0]), |
|
| 105 | U | 105 | U | colourBG.allocated, colourBG.allocated); |
|
|
| 107 | C | } else { | | 107 | C | } |
| 108 | C | if (s[startSeg] == '\001') { | | 108 | C | if (s[startSeg] == '\001') { |
| 109 | C | xUp = x+1; | | 109 | C | rectUp = rcClient; |
| 110 | C | } else { | | 110 | C | } else if (s[startSeg] == '\002') { |
| 111 | C | xDown = x+1; | | 111 | C | rectDown = rcClient; |
| 112 | C | } | | |
|
|
| 115 | U | 114 | U | xEnd = x + surface->WidthText(font, s+startSeg, endSeg - startSeg); |
|
| 87 skipped lines |
|
| 204 | U | 203 | U | void CallTip::MouseClick(Point pt) { |
|
|
| 206 | C | if (pt.y < lineHeight) { | | 205 | C | if (rectUp.Contains(pt)) |
| 207 | C | if ((pt.x > xUp) && (pt.x < xUp + widthArrow - 2)) { | | |
| 208 | C | clickPlace = 1; | | 206 | C | clickPlace = 1; |
| 209 | C | } else if ((pt.x > xDown) && (pt.x < xDown + widthArrow - 2)) { | | 207 | C | if (rectDown.Contains(pt)) |
| 210 | C | clickPlace = 2; | | 208 | C | clickPlace = 2; |
| 211 | C | } | | |
| 212 | C | } | | |
|
|
| 215 | U | 211 | U | PRectangle CallTip::CallTipStart(int pos, Point pt, const char *defn, |
|
| 24 skipped lines |
| 240 | U | 236 | U | int numLines = 1; |
|
| 241 | U | 237 | U | const char *newline; |
|
| 242 | U | 238 | U | const char *look = val; |
|
| 243 | C | xUp = -100; | | 239 | C | rectUp = PRectangle(0,0,0,0); |
| 244 | C | xDown = -100; | | 240 | C | rectDown = PRectangle(0,0,0,0); |
|
| 246 | U | 242 | U | int width = PaintContents(surfaceMeasure, false) + 5; |
|
| 247 | U | 243 | U | while ((newline = strchr(look, '\n')) != NULL) { |
|
| 28 skipped lines |