Changeset 29
- Timestamp:
- Jan 22, 2001, 8:28:54 AM (25 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/helpers/comctl.h
r21 r29 441 441 // #define TTF_IDISHWND 0x0001 442 442 // V0.9.7 (2001-01-03) [umoeller]: removed this win95 crap 443 #define TTF_CENTERBELOW 0x0002444 #define TTF_CENTERABOVE 0x0004443 // #define TTF_CENTERBELOW 0x0002 444 // #define TTF_CENTERABOVE 0x0004 445 445 // #define TTF_RTLREADING 0x0004 446 446 // V0.9.7 (2001-01-03) [umoeller]: removed this win95 crap 447 447 448 #define TTF_SUBCLASS 0x0008 448 449 // non-Win95 flags 449 450 #define TTF_SHYMOUSE 0x0010 451 452 // new flags with V0.9.7 (2001-01-20) [umoeller] 453 #define TTF_CENTER_X_ON_TOOL 0x0020 454 #define TTF_POS_Y_ABOVE_TOOL 0x0040 455 #define TTF_POS_Y_BELOW_TOOL 0x0080 450 456 451 457 #define PSZ_TEXTCALLBACK (PSZ)-1 … … 467 473 ULONG ulFlags; 468 474 // in: flags for the tool, any combination of: 469 // -- TTF_CENTERBELOW: centers the tooltip window below the470 // tool specified by the hwndTool member.471 // -- TTF_CENTERABOVE: centers the tooltip window above the472 // tool specified by the hwndTool member.473 475 // -- TTF_SUBCLASS: Indicates that the tooltip control should 474 476 // subclass hwndTool to intercept messages, 475 477 // such as WM_MOUSEMOVE. See TTM_RELAYEVENT. 476 // -- TTF_SHYMOUSE (OS/2 only): shy away from mouse pointer;478 // -- TTF_SHYMOUSE: shy away from mouse pointer; 477 479 // always position the tool tip such that it is never 478 480 // covered by the mouse pointer (for readability); 479 481 // added V0.9.1 (2000-02-04) [umoeller] 482 // -- TTF_CENTER_X_ON_TOOL: position tooltip X so that 483 // it's centered on the tool (doesn't affect Y) 484 // -- TTF_POS_Y_ABOVE_TOOL: position tooltip Y above 485 // the tool; cannot be used with TTF_POS_Y_BELOW_TOOL 486 // -- TTF_POS_Y_BELOW_TOOL: position tooltip Y below 487 // the tool; cannot be used with TTF_POS_Y_ABOVE_TOOL 480 488 HWND hwndToolOwner; 481 489 // in: handle to the window that contains the tool. If -
trunk/include/helpers/wphandle.h
r14 r29 72 72 typedef struct _DrivDev 73 73 { 74 BYTE chName[4]; // = 'DRIV'75 USHORT usUnknown1[4];74 BYTE chName[4]; // = 'DRIV' 75 USHORT usUnknown1[4]; 76 76 // or BYTE ch1[8], if you prefer 77 ULONG ulSerialNr;78 USHORT usUnknown2[2];77 ULONG ulSerialNr; 78 USHORT usUnknown2[2]; 79 79 // or BYTE ch2[4], if you prefer 80 BYTE szName[1];80 BYTE szName[1]; 81 81 } DRIV, *PDRIV; 82 82 -
trunk/src/helpers/cctl_tooltip.c
r21 r29 183 183 qmsg.mp1 = mp1; 184 184 qmsg.mp2 = mp2; 185 _Pmpf((__FUNCTION__ ": sending TTM_RELAYEVENT"));185 // _Pmpf((__FUNCTION__ ": sending TTM_RELAYEVENT")); 186 186 WinSendMsg(pst->hwndTooltip, 187 187 TTM_RELAYEVENT, … … 198 198 lstFree(G_pllSubclassedTools); 199 199 G_pllSubclassedTools = NULL; 200 _Pmpf((__FUNCTION__ ": removed hwnd 0x%lX", hwndTool));200 // _Pmpf((__FUNCTION__ ": removed hwnd 0x%lX", hwndTool)); 201 201 } 202 202 mrc = (pst->pfnwpOrig)(hwndTool, msg, mp1, mp2); … … 239 239 240 240 lstAppendItem(G_pllSubclassedTools, pst); 241 _Pmpf((__FUNCTION__ ": subclassed hwnd 0x%lX", hwndTool));241 // _Pmpf((__FUNCTION__ ": subclassed hwnd 0x%lX", hwndTool)); 242 242 } 243 243 } … … 435 435 BOOL fShow) // if TRUE: show, else: HIDE 436 436 { 437 _Pmpf((__FUNCTION__ ": fShow %d", fShow));437 // _Pmpf((__FUNCTION__ ": fShow %d", fShow)); 438 438 if (fShow) 439 439 { … … 461 461 // mouse not moved since timer was started: 462 462 // find the current TOOLINFO 463 _Pmpf((__FUNCTION__ ": mouse not moved... pttd->ptiMouseOver 0x%lX", pttd->ptiMouseOver));463 // _Pmpf((__FUNCTION__ ": mouse not moved... pttd->ptiMouseOver 0x%lX", pttd->ptiMouseOver)); 464 464 if (pttd->ptiMouseOver) 465 465 { … … 477 477 } 478 478 479 _Pmpf((__FUNCTION__ ": pttd->pszPaintText %s",480 (pttd->pszPaintText) ? pttd->pszPaintText : "NULL"));479 // _Pmpf((__FUNCTION__ ": pttd->pszPaintText %s", 480 // (pttd->pszPaintText) ? pttd->pszPaintText : "NULL")); 481 481 482 482 if (pttd->pszPaintText) … … 502 502 cy = (rcl.yTop - rcl.yBottom) + 2*TOOLTIP_CY_BORDER; 503 503 504 // calc x and y pos of tooltip 505 if ( (pttd->ptiMouseOver->ulFlags & TTF_CENTERBELOW) 506 || (pttd->ptiMouseOver->ulFlags & TTF_CENTERABOVE) 504 // calc x and y pos of tooltip: 505 506 // per default, use pointer pos 507 ptlTooltip.x = ptlPointer.x - cx/2; 508 ptlTooltip.y = ptlPointer.y - cy; 509 510 // do we need the tool's position? 511 if ( pttd->ptiMouseOver->ulFlags 512 & (TTF_CENTER_X_ON_TOOL | TTF_POS_Y_ABOVE_TOOL | TTF_POS_Y_BELOW_TOOL) 507 513 ) 508 514 { 509 // center below control: 510 SWP swpTool; 515 // yes: 516 SWP swpTool; 517 POINTL ptlTool; 511 518 WinQueryWindowPos(pttd->ptiMouseOver->hwndTool, &swpTool); 512 ptlTool tip.x = swpTool.x;513 ptlTool tip.y = swpTool.y;519 ptlTool.x = swpTool.x; 520 ptlTool.y = swpTool.y; 514 521 // convert x, y to desktop points 515 522 WinMapWindowPoints(WinQueryWindow(pttd->ptiMouseOver->hwndTool, 516 523 QW_PARENT), // hwndFrom 517 524 HWND_DESKTOP, // hwndTo 518 &ptlTool tip,525 &ptlTool, 519 526 1); 520 ptlTooltip.x += ((swpTool.cx - cx) / 2L); 521 if (pttd->ptiMouseOver->ulFlags & TTF_CENTERBELOW)522 ptlTooltip.y -= cy;523 else524 ptlTooltip. y += swpTool.cy;525 } 526 else527 {528 // use pointer pos:529 ptlTooltip.x = ptlPointer.x - cx/2;530 ptlTooltip.y = ptlPointer.y - cy;527 528 // X 529 if (pttd->ptiMouseOver->ulFlags & TTF_CENTER_X_ON_TOOL) 530 // center X on tool: 531 ptlTooltip.x = ptlTool.x + ((swpTool.cx - cx) / 2L); 532 533 // Y 534 if (pttd->ptiMouseOver->ulFlags & TTF_POS_Y_ABOVE_TOOL) 535 ptlTooltip.y = ptlTool.y + swpTool.cy; 536 else if (pttd->ptiMouseOver->ulFlags & TTF_POS_Y_BELOW_TOOL) 537 ptlTooltip.y = ptlTool.y - cy; 531 538 } 532 539 … … 852 859 case TOOLTIP_ID_TIMER_INITIAL: 853 860 // _Pmpf(("WM_TIMER: Stopping initial timer: %d", usTimer)); 854 _Pmpf((__FUNCTION__ ": TOOLTIP_ID_TIMER_INITIAL"));861 // _Pmpf((__FUNCTION__ ": TOOLTIP_ID_TIMER_INITIAL")); 855 862 WinStopTimer(pttd->hab, 856 863 hwndTooltip, … … 1160 1167 if (pti->hwndTool == pqmsg->hwnd) 1161 1168 { 1162 _Pmpf((__FUNCTION__ ": found tool"));1169 // _Pmpf((__FUNCTION__ ": found tool")); 1163 1170 pttd->ptiMouseOver = pti; 1164 1171 break; … … 1182 1189 memcpy(&pttd->ptlPointerLast, &ptlPointer, sizeof(POINTL)); 1183 1190 1184 _Pmpf((__FUNCTION__ ": pttd->ptiMouseOver: 0x%lX", pttd->ptiMouseOver));1185 _Pmpf((__FUNCTION__ ": pttd->fIsActive: 0x%lX", pttd->fIsActive));1191 // _Pmpf((__FUNCTION__ ": pttd->ptiMouseOver: 0x%lX", pttd->ptiMouseOver)); 1192 // _Pmpf((__FUNCTION__ ": pttd->fIsActive: 0x%lX", pttd->fIsActive)); 1186 1193 if ( (pttd->ptiMouseOver) 1187 1194 && (pttd->fIsActive) … … 1290 1297 // compose values for that msg 1291 1298 TOOLTIPTEXT ttt = {0}; 1292 _Pmpf(("TTM_GETTEXT: PSZ_TEXTCALLBACK... sending TTN_NEEDTEXT"));1299 // _Pmpf(("TTM_GETTEXT: PSZ_TEXTCALLBACK... sending TTN_NEEDTEXT")); 1293 1300 ttt.hwndTooltip = hwndTooltip; 1294 1301 ttt.hwndTool = pti->hwndTool; … … 1521 1528 1522 1529 case TTM_SHOWTOOLTIPNOW: 1523 _Pmpf((__FUNCTION__ ": TTM_SHOWTOOLTIPNOW %d", mp1));1530 // _Pmpf((__FUNCTION__ ": TTM_SHOWTOOLTIPNOW %d", mp1)); 1524 1531 TtmShowTooltip(hwndTooltip, pttd, (BOOL)mp1); 1525 1532 break; -
trunk/src/helpers/cnrh.c
r21 r29 1457 1457 * -- PRECORDCORE precc: current record core, as 1458 1458 * determined by this func. 1459 * -- ULONG ulUser: what you have specified here. 1459 * -- ULONG ulUser1/2: what you have specified here. 1460 * 1461 * It must be declared as follows: 1462 * 1463 + ULONG EXPENTRY fncb(HWND hwndCnr, 1464 + PRECORDCORE precc, 1465 + ULONG ulUser1, 1466 + ULONG ulUser2) 1460 1467 * 1461 1468 * If the callback returns anything != 0, this … … 1476 1483 1477 1484 ULONG cnrhForAllRecords(HWND hwndCnr, 1478 PRECORDCORE preccParent, 1479 PFNCBRECC pfncbRecc, 1485 PRECORDCORE preccParent, // in: NULL for root 1486 PFNCBRECC pfncbRecc, // in: callback 1480 1487 ULONG ulUser1, 1481 1488 ULONG ulUser2) -
trunk/src/helpers/gpih.c
r25 r29 361 361 POINTL ptl1; 362 362 363 for (us = 0; us < usWidth; us++) 363 for (us = 0; 364 us < usWidth; 365 us++) 364 366 { 365 367 GpiSetColor(hps, lColorLeft); 368 // draw left line 366 369 ptl1.x = rcl2.xLeft; 367 370 ptl1.y = rcl2.yBottom; … … 369 372 ptl1.y = rcl2.yTop; // V0.9.7 (2000-12-20) [umoeller] 370 373 GpiLine(hps, &ptl1); 374 // go right -> draw top 371 375 ptl1.x = rcl2.xRight; // V0.9.7 (2000-12-20) [umoeller] 372 376 GpiLine(hps, &ptl1); 377 // go down -> draw right 373 378 GpiSetColor(hps, lColorRight); 374 379 ptl1.y = rcl2.yBottom; 375 380 GpiLine(hps, &ptl1); 381 // go left -> draw bottom 376 382 ptl1.x = rcl2.xLeft; 377 383 GpiLine(hps, &ptl1);
Note:
See TracChangeset
for help on using the changeset viewer.