Changeset 29


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

Misc. updates.

Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/helpers/comctl.h

    r21 r29  
    441441    // #define TTF_IDISHWND            0x0001
    442442                // V0.9.7 (2001-01-03) [umoeller]: removed this win95 crap
    443     #define TTF_CENTERBELOW         0x0002
    444     #define TTF_CENTERABOVE         0x0004
     443    // #define TTF_CENTERBELOW         0x0002
     444    // #define TTF_CENTERABOVE         0x0004
    445445    // #define TTF_RTLREADING          0x0004
    446446                // V0.9.7 (2001-01-03) [umoeller]: removed this win95 crap
     447
    447448    #define TTF_SUBCLASS            0x0008
    448449    // non-Win95 flags
    449450    #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
    450456
    451457    #define PSZ_TEXTCALLBACK      (PSZ)-1
     
    467473        ULONG   ulFlags;
    468474                    // in: flags for the tool, any combination of:
    469                     // -- TTF_CENTERBELOW:  centers the tooltip window below the
    470                     //      tool specified by the hwndTool member.
    471                     // -- TTF_CENTERABOVE:  centers the tooltip window above the
    472                     //      tool specified by the hwndTool member.
    473475                    // -- TTF_SUBCLASS: Indicates that the tooltip control should
    474476                    //      subclass hwndTool to intercept messages,
    475477                    //      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;
    477479                    //      always position the tool tip such that it is never
    478480                    //      covered by the mouse pointer (for readability);
    479481                    //      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
    480488        HWND    hwndToolOwner;
    481489                    // in: handle to the window that contains the tool. If
  • trunk/include/helpers/wphandle.h

    r14 r29  
    7272    typedef struct _DrivDev
    7373    {
    74         BYTE  chName[4];  // = 'DRIV'
    75         USHORT usUnknown1[4];
     74        BYTE    chName[4];  // = 'DRIV'
     75        USHORT  usUnknown1[4];
    7676            // or BYTE  ch1[8], if you prefer
    77         ULONG ulSerialNr;
    78         USHORT usUnknown2[2];
     77        ULONG   ulSerialNr;
     78        USHORT  usUnknown2[2];
    7979            // or BYTE  ch2[4], if you prefer
    80         BYTE  szName[1];
     80        BYTE    szName[1];
    8181    } DRIV, *PDRIV;
    8282
  • 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.