Changeset 29 for trunk/src


Ignore:
Timestamp:
Jan 22, 2001, 8:28:54 AM (25 years ago)
Author:
umoeller
Message:

Misc. updates.

Location:
trunk/src/helpers
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/helpers/cctl_tooltip.c

    r21 r29  
    183183            qmsg.mp1 = mp1;
    184184            qmsg.mp2 = mp2;
    185             _Pmpf((__FUNCTION__ ": sending TTM_RELAYEVENT"));
     185            // _Pmpf((__FUNCTION__ ": sending TTM_RELAYEVENT"));
    186186            WinSendMsg(pst->hwndTooltip,
    187187                       TTM_RELAYEVENT,
     
    198198                lstFree(G_pllSubclassedTools);
    199199                G_pllSubclassedTools = NULL;
    200                 _Pmpf((__FUNCTION__ ": removed hwnd 0x%lX", hwndTool));
     200                // _Pmpf((__FUNCTION__ ": removed hwnd 0x%lX", hwndTool));
    201201            }
    202202            mrc = (pst->pfnwpOrig)(hwndTool, msg, mp1, mp2);
     
    239239
    240240            lstAppendItem(G_pllSubclassedTools, pst);
    241             _Pmpf((__FUNCTION__ ": subclassed hwnd 0x%lX", hwndTool));
     241            // _Pmpf((__FUNCTION__ ": subclassed hwnd 0x%lX", hwndTool));
    242242        }
    243243    }
     
    435435                    BOOL fShow)  // if TRUE: show, else: HIDE
    436436{
    437     _Pmpf((__FUNCTION__ ": fShow %d", fShow));
     437    // _Pmpf((__FUNCTION__ ": fShow %d", fShow));
    438438    if (fShow)
    439439    {
     
    461461            // mouse not moved since timer was started:
    462462            // 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));
    464464            if (pttd->ptiMouseOver)
    465465            {
     
    477477            }
    478478
    479             _Pmpf((__FUNCTION__ ": pttd->pszPaintText %s",
    480                     (pttd->pszPaintText) ? pttd->pszPaintText : "NULL"));
     479            // _Pmpf((__FUNCTION__ ": pttd->pszPaintText %s",
     480               //      (pttd->pszPaintText) ? pttd->pszPaintText : "NULL"));
    481481
    482482            if (pttd->pszPaintText)
     
    502502                cy = (rcl.yTop - rcl.yBottom) + 2*TOOLTIP_CY_BORDER;
    503503
    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)
    507513                   )
    508514                {
    509                     // center below control:
    510                     SWP swpTool;
     515                    // yes:
     516                    SWP     swpTool;
     517                    POINTL  ptlTool;
    511518                    WinQueryWindowPos(pttd->ptiMouseOver->hwndTool, &swpTool);
    512                     ptlTooltip.x = swpTool.x;
    513                     ptlTooltip.y = swpTool.y;
     519                    ptlTool.x = swpTool.x;
     520                    ptlTool.y = swpTool.y;
    514521                    // convert x, y to desktop points
    515522                    WinMapWindowPoints(WinQueryWindow(pttd->ptiMouseOver->hwndTool,
    516523                                                      QW_PARENT), // hwndFrom
    517524                                       HWND_DESKTOP,            // hwndTo
    518                                        &ptlTooltip,
     525                                       &ptlTool,
    519526                                       1);
    520                     ptlTooltip.x += ((swpTool.cx - cx) / 2L);
    521                     if (pttd->ptiMouseOver->ulFlags & TTF_CENTERBELOW)
    522                         ptlTooltip.y -= cy;
    523                     else
    524                         ptlTooltip.y += swpTool.cy;
    525                 }
    526                 else
    527                 {
    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;
    531538                }
    532539
     
    852859                    case TOOLTIP_ID_TIMER_INITIAL:
    853860                        // _Pmpf(("WM_TIMER: Stopping initial timer: %d", usTimer));
    854                         _Pmpf((__FUNCTION__ ": TOOLTIP_ID_TIMER_INITIAL"));
     861                        // _Pmpf((__FUNCTION__ ": TOOLTIP_ID_TIMER_INITIAL"));
    855862                        WinStopTimer(pttd->hab,
    856863                                     hwndTooltip,
     
    11601167                        if (pti->hwndTool == pqmsg->hwnd)
    11611168                        {
    1162                             _Pmpf((__FUNCTION__ ": found tool"));
     1169                            // _Pmpf((__FUNCTION__ ": found tool"));
    11631170                            pttd->ptiMouseOver = pti;
    11641171                            break;
     
    11821189                        memcpy(&pttd->ptlPointerLast, &ptlPointer, sizeof(POINTL));
    11831190
    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));
    11861193                        if (    (pttd->ptiMouseOver)
    11871194                             && (pttd->fIsActive)
     
    12901297                    // compose values for that msg
    12911298                    TOOLTIPTEXT ttt = {0};
    1292                     _Pmpf(("TTM_GETTEXT: PSZ_TEXTCALLBACK... sending TTN_NEEDTEXT"));
     1299                    // _Pmpf(("TTM_GETTEXT: PSZ_TEXTCALLBACK... sending TTN_NEEDTEXT"));
    12931300                    ttt.hwndTooltip = hwndTooltip;
    12941301                    ttt.hwndTool = pti->hwndTool;
     
    15211528
    15221529            case TTM_SHOWTOOLTIPNOW:
    1523                 _Pmpf((__FUNCTION__ ": TTM_SHOWTOOLTIPNOW %d", mp1));
     1530                // _Pmpf((__FUNCTION__ ": TTM_SHOWTOOLTIPNOW %d", mp1));
    15241531                TtmShowTooltip(hwndTooltip, pttd, (BOOL)mp1);
    15251532            break;
  • trunk/src/helpers/cnrh.c

    r21 r29  
    14571457 *      -- PRECORDCORE precc: current record core, as
    14581458 *                     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)
    14601467 *
    14611468 *      If the callback returns anything != 0, this
     
    14761483
    14771484ULONG cnrhForAllRecords(HWND hwndCnr,
    1478                         PRECORDCORE preccParent,
    1479                         PFNCBRECC pfncbRecc,
     1485                        PRECORDCORE preccParent,    // in: NULL for root
     1486                        PFNCBRECC pfncbRecc,        // in: callback
    14801487                        ULONG ulUser1,
    14811488                        ULONG ulUser2)
  • trunk/src/helpers/gpih.c

    r25 r29  
    361361    POINTL ptl1;
    362362
    363     for (us = 0; us < usWidth; us++)
     363    for (us = 0;
     364         us < usWidth;
     365         us++)
    364366    {
    365367        GpiSetColor(hps, lColorLeft);
     368        // draw left line
    366369        ptl1.x = rcl2.xLeft;
    367370        ptl1.y = rcl2.yBottom;
     
    369372        ptl1.y = rcl2.yTop;     // V0.9.7 (2000-12-20) [umoeller]
    370373        GpiLine(hps, &ptl1);
     374        // go right -> draw top
    371375        ptl1.x = rcl2.xRight;   // V0.9.7 (2000-12-20) [umoeller]
    372376        GpiLine(hps, &ptl1);
     377        // go down -> draw right
    373378        GpiSetColor(hps, lColorRight);
    374379        ptl1.y = rcl2.yBottom;
    375380        GpiLine(hps, &ptl1);
     381        // go left -> draw bottom
    376382        ptl1.x = rcl2.xLeft;
    377383        GpiLine(hps, &ptl1);
Note: See TracChangeset for help on using the changeset viewer.