Ignore:
Timestamp:
Mar 13, 2001, 9:56:01 AM (24 years ago)
Author:
umoeller
Message:

Mistc. updates for WarpIN, new features.

File:
1 edited

Legend:

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

    r35 r46  
    774774 *
    775775 *      Invoking this function on a container in Tree view
    776  *      will result in not much but display flickering anyways.
     776 *      will result in not much but display flickering anyway.
    777777 *
    778778 *      This returns the number of records which were processed.
     
    968968 *
    969969 *@@changed V0.9.4 (2000-08-07) [umoeller]: now posting scroll messages to avoid sync errors
     970 *@@changed V0.9.9 (2001-03-12) [umoeller]: this never worked for root records in tree view if KeepParent == TRUE, fixed
    970971 */
    971972
     
    10011002
    10021003    // query record location and size of container
    1003     if (!WinSendMsg(hwndCnr, CM_QUERYRECORDRECT, &rclRecord, &qRect))
     1004    if (!WinSendMsg(hwndCnr,
     1005                    CM_QUERYRECORDRECT,
     1006                    &rclRecord,
     1007                    &qRect))
    10041008        return 1;
    1005     if (!WinSendMsg(hwndCnr, CM_QUERYVIEWPORTRECT, &rclCnr, MPFROM2SHORT(CMA_WINDOW, FALSE)) )
     1009
     1010    if (!WinSendMsg(hwndCnr,
     1011                    CM_QUERYVIEWPORTRECT,
     1012                    &rclCnr,
     1013                    MPFROM2SHORT(CMA_WINDOW, FALSE)) )
    10061014        return 2;
    10071015
     
    10161024    if (KeepParent)
    10171025    {
    1018         if (!WinSendMsg(hwndCnr, CM_QUERYCNRINFO, (MPARAM)&CnrInfo, (MPARAM)sizeof(CnrInfo)))
     1026        if (!WinSendMsg(hwndCnr,
     1027                        CM_QUERYCNRINFO,
     1028                        (MPARAM)&CnrInfo,
     1029                        (MPARAM)sizeof(CnrInfo)))
    10191030            return 4;
    10201031        else
     
    10361047                                                 MPFROM2SHORT(CMA_PARENT,
    10371048                                                              CMA_ITEMORDER));
    1038         qRect2.fsExtent = fsExtent;
    1039 
    1040         // now query PARENT record location and size of container
    1041         if (!WinSendMsg(hwndCnr, CM_QUERYRECORDRECT, &rclParentRecord, &qRect2))
    1042             return 5;
    1043 
    1044         ptlParentRecord.x = (rclParentRecord.xLeft);
    1045         ptlParentRecord.y = (rclParentRecord.yTop);
    1046         // ptlParentRecord.x = (rclParentRecord.xLeft + rclParentRecord.xRight) / 2;
    1047         // ptlParentRecord.y = (rclParentRecord.yBottom + rclParentRecord.yTop) / 2;
    1048         rclCnr2 = rclCnr;
    1049         WinOffsetRect(hab, &rclCnr2, 0, -lYOfs);
    1050         // if ( (rclParentRecord.yBottom - rclRecord.yBottom) > (rclCnr.yTop - rclCnr.yBottom) )
    1051         if (!(WinPtInRect(hab, &rclCnr2, &ptlParentRecord)))
     1049        if (qRect2.pRecord)     // V0.9.9 (2001-03-12) [umoeller]
    10521050        {
    1053             lYOfs = (rclCnr.yTop - rclParentRecord.yTop) // this would suffice
    1054                   - (rclRecord.yTop - rclRecord.yBottom);  // but we make the previous rcl visible too
     1051            qRect2.fsExtent = fsExtent;
     1052
     1053            // now query PARENT record location and size of container
     1054            if (!WinSendMsg(hwndCnr, CM_QUERYRECORDRECT, &rclParentRecord, &qRect2))
     1055                return 5;
     1056
     1057            ptlParentRecord.x = (rclParentRecord.xLeft);
     1058            ptlParentRecord.y = (rclParentRecord.yTop);
     1059            // ptlParentRecord.x = (rclParentRecord.xLeft + rclParentRecord.xRight) / 2;
     1060            // ptlParentRecord.y = (rclParentRecord.yBottom + rclParentRecord.yTop) / 2;
     1061            rclCnr2 = rclCnr;
     1062            WinOffsetRect(hab, &rclCnr2, 0, -lYOfs);
     1063            // if ( (rclParentRecord.yBottom - rclRecord.yBottom) > (rclCnr.yTop - rclCnr.yBottom) )
     1064            if (!(WinPtInRect(hab, &rclCnr2, &ptlParentRecord)))
     1065            {
     1066                lYOfs = (rclCnr.yTop - rclParentRecord.yTop) // this would suffice
     1067                      - (rclRecord.yTop - rclRecord.yBottom);  // but we make the previous rcl visible too
     1068            }
    10551069        }
    10561070    }
Note: See TracChangeset for help on using the changeset viewer.