Changeset 12530
- Timestamp:
- Dec 2, 1999, 5:34:43 PM (25 years ago)
- Location:
- tags/trunk/src/user32
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified tags/trunk/src/user32/button.cpp ¶
r12414 r12530 1 /* $Id: button.cpp,v 1.2 0 1999-11-24 18:21:34cbratschi Exp $ */1 /* $Id: button.cpp,v 1.21 1999-12-02 16:34:42 cbratschi Exp $ */ 2 2 /* File: button.cpp -- Button type widgets 3 3 * … … 1021 1021 parent = GetParent(hwnd); 1022 1022 /* assure that starting control is not disabled or invisible */ 1023 start = sibling = GetNextDlgGroupItem( parent, hwnd, TRUE );1023 //start = sibling = GetNextDlgGroupItem( parent, hwnd, TRUE ); 1024 1024 //@YD: bugfix 1025 1025 //CB: doesn't work! 1026 //start = sibling = GetNextDlgGroupItem( parent, hwnd, FALSE );1026 start = sibling = GetNextDlgGroupItem( parent, hwnd, FALSE ); 1027 1027 do 1028 1028 { -
TabularUnified tags/trunk/src/user32/caret.cpp ¶
r12034 r12530 1 /* $Id: caret.cpp,v 1. 7 1999-10-25 20:17:16 sandervlExp $ */1 /* $Id: caret.cpp,v 1.8 1999-12-02 16:34:43 cbratschi Exp $ */ 2 2 3 3 /* … … 37 37 static int CaretWidth, CaretHeight; 38 38 static int CaretPosX, CaretPosY; 39 static BOOL CaretIsVisible;39 static INT CaretIsVisible; //visible if > 0 40 40 41 41 #pragma data_seg() … … 62 62 if (rc) 63 63 { 64 hwndCaret = hwnd; 65 hbmCaret = hBmp; 66 CaretWidth = width; 67 CaretHeight = height; 64 hwndCaret = hwnd; 65 hbmCaret = hBmp; 66 CaretWidth = width; 67 CaretHeight = height; 68 CaretIsVisible = 0; 68 69 } 69 70 … … 83 84 CaretWidth = 0; 84 85 CaretHeight = 0; 85 CaretIsVisible = FALSE;86 CaretIsVisible = 0; 86 87 87 88 rc = _DestroyCaret(); … … 218 219 dprintf(("USER32: ShowCaret %x", hwnd)); 219 220 220 CaretIsVisible = TRUE; 221 rc = _ShowCaret (Win32BaseWindow::Win32ToOS2Handle (hwnd)); 221 CaretIsVisible++; 222 if (CaretIsVisible == 1) 223 rc = _ShowCaret (Win32BaseWindow::Win32ToOS2Handle (hwnd)); 224 else 225 rc = TRUE; 222 226 223 227 return (rc); … … 230 234 dprintf(("USER32: HideCaret")); 231 235 232 CaretIsVisible = FALSE; 233 rc = _HideCaret (Win32BaseWindow::Win32ToOS2Handle (hwnd)); 236 CaretIsVisible--; 237 if (CaretIsVisible == 0) 238 rc = _HideCaret (Win32BaseWindow::Win32ToOS2Handle (hwnd)); 239 else 240 rc = TRUE; 234 241 235 242 return (rc); … … 239 246 { 240 247 CURSORINFO cursorInfo; 248 INT x; 241 249 242 250 if ((hwndFocus != 0) && (hwndCaret == hwndFocus) && … … 247 255 CreateCaret (hwndCaret, hbmCaret, CaretWidth, CaretHeight); 248 256 SetCaretPos (CaretPosX, CaretPosY); 249 if (CaretIsVisible )250 ShowCaret (hwndCaret);251 } 252 } 257 if (CaretIsVisible > 0) 258 _ShowCaret(Win32BaseWindow::Win32ToOS2Handle(hwndCaret)); 259 } 260 } -
TabularUnified tags/trunk/src/user32/edit.cpp ¶
r12508 r12530 1 /* $Id: edit.cpp,v 1.2 0 1999-12-01 18:23:27cbratschi Exp $ */1 /* $Id: edit.cpp,v 1.21 1999-12-02 16:34:43 cbratschi Exp $ */ 2 2 /* 3 3 * Edit control … … 21 21 new in Win98, Win2k: for single line too 22 22 - WinNT/Win2k: higher size limits (single: 0x7FFFFFFE, multi: none) 23 - problems with OS/2 PM font kerning:24 T abbedTextOutA25 GetTextExtentPoint32A26 WINE code uses relative positions -> rewrite to absolute!23 - problems with selection update: perhaps an Open32 bug 24 TextOutA: draws at wrong position 25 I've removed the workarounds, it makes no sense to fix GDI32 bugs here 26 -> rewrite TextOut and TabbedTextOut 27 27 */ 28 28 … … 1032 1032 rc->top = es->format_rect.top; 1033 1033 rc->bottom = rc->top + es->line_height; 1034 1034 1035 rc->left = (scol == 0) ? es->format_rect.left : SLOWORD(EDIT_EM_PosFromChar(hwnd, es, line_index + scol, TRUE)); 1035 1036 rc->right = (ecol == -1) ? es->format_rect.right : SLOWORD(EDIT_EM_PosFromChar(hwnd, es, line_index + ecol, TRUE))+1; … … 1099 1100 1100 1101 EDIT_GetLineRect(hwnd, es, 0, start, end, &line_rect); 1101 1102 //CB: fix 1 pixel vertical line bug1103 line_rect.left--;1104 line_rect.right++;1105 1102 1106 1103 if (IntersectRect(&rc, &line_rect, &es->format_rect)) … … 1152 1149 if (sl == el) { 1153 1150 EDIT_GetLineRect(hwnd, es, sl, sc, ec, &rcLine); 1154 1155 //CB: fix 1 pixel vertical line bug1156 rcLine.left--;1157 rcLine.right++;1158 1159 1151 1160 1152 if (IntersectRect(&rcUpdate, &rcWnd, &rcLine)) … … 1582 1574 s = MIN(li + ll, MAX(li, s)); 1583 1575 e = MIN(li + ll, MAX(li, e)); 1576 1584 1577 if (rev && (s != e) && 1585 ((es->flags & EF_FOCUSED) || (es->style & ES_NOHIDESEL))) {1586 x += EDIT_PaintText(hwnd, es, dc, x, y, line, 0, s - li, FALSE);1587 x += EDIT_PaintText(hwnd, es, dc, x, y, line, s - li, e - s, TRUE);1588 x += EDIT_PaintText(hwnd, es, dc, x, y, line, e - li, li + ll - e, FALSE);1589 } else1590 x +=EDIT_PaintText(hwnd, es, dc, x, y, line, 0, ll, FALSE);1578 ((es->flags & EF_FOCUSED) || (es->style & ES_NOHIDESEL))) 1579 { 1580 x += EDIT_PaintText(hwnd, es, dc, x, y, line, 0, s - li, FALSE); 1581 x += EDIT_PaintText(hwnd, es, dc, x, y, line, s - li, e - s, TRUE); 1582 x += EDIT_PaintText(hwnd, es, dc, x, y, line, e - li, li + ll - e, FALSE); 1583 } else EDIT_PaintText(hwnd, es, dc, x, y, line, 0, ll, FALSE); 1591 1584 } 1592 1585 … … 1603 1596 INT ret; 1604 1597 INT li; 1605 SIZE size;1606 1598 1607 1599 if (!count) … … 1617 1609 ret = (INT)LOWORD(TabbedTextOutA(dc, x, y, es->text + li + col, count, 1618 1610 es->tabs_count, es->tabs, es->format_rect.left - es->x_offset)); 1619 } else { 1620 LPSTR text = EDIT_GetPasswordPointer_SL(hwnd, es); 1621 TextOutA(dc, x, y, text + li + col, count); 1622 GetTextExtentPoint32A(dc, text + li + col, count, &size); 1623 ret = size.cx; 1624 if (es->style & ES_PASSWORD) 1625 HeapFree(es->heap, 0, text); 1611 } else 1612 { 1613 LPSTR text = EDIT_GetPasswordPointer_SL(hwnd, es); 1614 POINT pt; 1615 UINT oldAlign = GetTextAlign(dc); 1616 1617 MoveToEx(dc,x,y,NULL); 1618 SetTextAlign(dc,(oldAlign & ~TA_NOUPDATECP) | TA_UPDATECP); 1619 1620 TextOutA(dc,x,y,text+li+col,count); 1621 GetCurrentPositionEx(dc,&pt); 1622 SetTextAlign(dc,oldAlign); 1623 ret = pt.x-x; 1624 if (es->style & ES_PASSWORD) 1625 HeapFree(es->heap, 0, text); 1626 1626 } 1627 1627 if (rev) { … … 2197 2197 x = LOWORD(GetTabbedTextExtentA(dc, es->text + li, index - li, 2198 2198 es->tabs_count, es->tabs)) - es->x_offset; 2199 } else {2200 LPSTR text = EDIT_GetPasswordPointer_SL(hwnd, es);2201 if (index < es->x_offset) {2202 GetTextExtentPoint32A(dc, text + index, 2203 es->x_offset - index,&size);2204 x = -size.cx;2205 } else {2206 GetTextExtentPoint32A(dc, text + es->x_offset,2207 index - es->x_offset,&size);2208 x= size.cx;2209 2210 2211 2212 2199 } else 2200 { 2201 LPSTR text = EDIT_GetPasswordPointer_SL(hwnd, es); 2202 2203 GetTextExtentPoint32A(dc,text,index,&size); 2204 x = size.cx; 2205 if (es->x_offset) 2206 { 2207 GetTextExtentPoint32A(dc,text,es->x_offset,&size); 2208 x -= size.cx; 2209 } 2210 y = 0; 2211 if (es->style & ES_PASSWORD) 2212 HeapFree(es->heap, 0 ,text); 2213 2213 } 2214 2214 x += es->format_rect.left; … … 3778 3778 if (!GetTextMetricsA(dc, &tm)) 3779 3779 { 3780 SelectObject(dc,old_font);3780 if (font) SelectObject(dc,old_font); 3781 3781 ReleaseDC(hwnd,dc); 3782 3782
Note:
See TracChangeset
for help on using the changeset viewer.