Changeset 375 for branches/branch-1-0/src/helpers/textview.c
- Timestamp:
- Nov 30, 2008, 1:57:41 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/branch-1-0/src/helpers/textview.c
r374 r375 270 270 lstInit(&pxfd->llWords, 271 271 TRUE); // auto-free items 272 xstrInit(&pxfd->strOrigText, 0); // WarpIN V1.0.18 272 273 xstrInit(&pxfd->strViewText, 0); 273 274 } … … 420 421 *@@added V0.9.3 (2000-05-07) [umoeller] 421 422 *@@changed V0.9.20 (2002-08-10) [umoeller]: now stripping \xFF too 423 *@@changed V1.0.18 (2008-11-24) [pr]: fixes \xFF stripping @@fixes 1116 422 424 */ 423 425 … … 452 454 break; 453 455 454 case '\xFF': // V0.9.20 (2002-08-10) [umoeller]456 case TXVESC_CHAR: // V0.9.20 (2002-08-10) [umoeller] 455 457 AppendCharNoCheck(&pszNew, 456 458 &cbNew, 457 459 &pTarget, 458 460 ' '); 459 pSource ++;461 pSource += 3; // V1.0.18 460 462 break; 461 463 … … 2125 2127 * 2126 2128 *@@added V0.9.20 (2002-08-10) [umoeller] 2129 *@@changed WarpIN V1.0.18 (2008-11-29) [pr] 2127 2130 */ 2128 2131 … … 2136 2139 PSZ p; 2137 2140 2141 // WarpIN V1.0.18 2142 xstrcpy(&ptxvd->xfd.strOrigText, 2143 pcszText, 2144 0); 2145 2138 2146 switch (ptxvd->flStyle & XS_FORMAT_MASK) 2139 2147 { 2140 2148 case XS_PLAINTEXT: // 0x0100 2141 xstrcpy(pstr, 2142 pcszText, 2143 0); 2144 xstrConvertLineFormat(pstr, 2145 CRLF2LF); 2146 p = pstr->psz; 2147 while (p = strchr(p, '\xFF')) 2148 *p = ' '; 2149 break; 2150 2151 case XS_HTML: // 0x0200 2149 // WarpIN V1.0.18 2152 2150 if (p = strdup(pcszText)) 2153 2151 { 2154 PSZ p2 = p; 2155 while (p2 = strchr(p2, '\xFF')) 2156 *p2 = ' '; 2152 PSZ p2; 2153 for (p2 = p; p2 = strchr(p2, TXVESC_CHAR); *p2 = ' '); 2154 txvStripLinefeeds(&p, 4); 2155 xstrset(pstr, p); 2156 } 2157 break; 2158 2159 case XS_HTML: // 0x0200 2160 // WarpIN V1.0.18 2161 if (p = strdup(pcszText)) 2162 { 2163 PSZ p2; 2164 for (p2 = p; p2 = strchr(p2, TXVESC_CHAR); *p2 = ' '); 2157 2165 txvConvertFromHTML(&p, NULL, NULL, NULL); 2158 2166 xstrset(pstr, p); … … 2777 2785 *@@added V1.0.0 (2002-08-12) [umoeller] 2778 2786 *@@changed WarpIN V1.0.18 (2008-11-16) [pr]: added correct ID for horiz. scroll @@fixes 1086 2787 *@@changed WarpIN V1.0.18 (2008-11-16) [pr]: added Ctrl-Ins copy capability @@fixes 1116 2779 2788 */ 2780 2789 … … 2874 2883 2875 2884 usCmd = SB_SLIDERPOSITION; 2885 break; 2886 2887 // WarpIN V1.0.18 2888 case VK_INSERT: 2889 if (usFlags & KC_CTRL) 2890 { 2891 ulMsg = TXM_COPY; 2892 usID = 0; 2893 } 2876 2894 break; 2877 2895 … … 2971 2989 { 2972 2990 xstrClear(&ptxvd->xfd.strViewText); 2991 xstrClear(&ptxvd->xfd.strOrigText); // WarpIN V1.0.18 2973 2992 lstClear(&ptxvd->xfd.llRectangles); 2974 2993 lstClear(&ptxvd->xfd.llWords); … … 3036 3055 *@@changed V0.9.20 (2002-08-10) [umoeller]: added support for formatting HTML and plain text automatically 3037 3056 *@@changed V1.0.0 (2002-08-12) [umoeller]: optimized locality by moving big chunks into subfuncs 3057 *@@changed WarpIN V1.0.18 (2008-11-16) [pr]: added Ctrl-Ins copy capability @@fixes 1116 3058 *@@changed WarpIN V1.0.18 (2008-11-29) [pr]: added style set/query functions @@fixes 1116 3038 3059 */ 3039 3060 … … 3446 3467 sizeof(SIZEL)); 3447 3468 mrc = (MRESULT)TRUE; 3469 } 3470 break; 3471 3472 /* 3473 *@@ TXM_QUERYSTYLE: 3474 * returns the current style flags. 3475 * 3476 * This must be sent, not posted, to the control. 3477 * 3478 * Parameters: 3479 * 3480 * -- PULONG mp1: pointer to a ULONG buffer. 3481 * 3482 * Returns TRUE on success. 3483 * 3484 *@@added WarpIN V1.0.18 (2008-11-29) [pr] 3485 */ 3486 3487 case TXM_QUERYSTYLE: 3488 if ( (mp1) 3489 && (ptxvd = (PTEXTVIEWWINDATA)WinQueryWindowPtr(hwndTextView, QWL_PRIVATE)) 3490 ) 3491 { 3492 *((ULONG *) mp1) = ptxvd->flStyle; 3493 mrc = (MRESULT)TRUE; 3494 } 3495 break; 3496 3497 /* 3498 *@@ TXM_SETSTYLE: 3499 * sets the current style flags. 3500 * 3501 * This must be sent, not posted, to the control. 3502 * 3503 * Parameters: 3504 * 3505 * -- PULONG mp1: pointer to a ULONG buffer. 3506 * 3507 * Returns TRUE on success. 3508 * 3509 *@@added WarpIN V1.0.18 (2008-11-29) [pr] 3510 */ 3511 3512 case TXM_SETSTYLE: 3513 if ( (mp1) 3514 && (ptxvd = (PTEXTVIEWWINDATA)WinQueryWindowPtr(hwndTextView, QWL_PRIVATE)) 3515 ) 3516 { 3517 ptxvd->flStyle = *((ULONG *) mp1); 3518 mrc = (MRESULT)TRUE; 3519 } 3520 break; 3521 3522 /* 3523 *@@ TXM_COPY: 3524 * copies the unprocessed window text to the clipboard. 3525 * 3526 * Returns TRUE on success. 3527 * 3528 *@@added WarpIN V1.0.18 (2008-11-16) [pr] 3529 */ 3530 3531 case TXM_COPY: 3532 if (ptxvd = (PTEXTVIEWWINDATA)WinQueryWindowPtr(hwndTextView, QWL_PRIVATE)) 3533 { 3534 mrc = (MRESULT) winhSetClipboardText(ptxvd->hab, 3535 ptxvd->xfd.strOrigText.psz, 3536 strlen(ptxvd->xfd.strOrigText.psz)); 3448 3537 } 3449 3538 break;
Note:
See TracChangeset
for help on using the changeset viewer.