# HG changeset patch # User Claus Gittinger # Date 1208961145 -7200 # Node ID 8f9071993f390ce3efc9ad0e6ea22126242f864a # Parent 65df50a477bc0678260ab93b13441a4a680b2c54 workstation: care for pen when drawing text. diff -r 65df50a477bc -r 8f9071993f39 WinWorkstation.st --- a/WinWorkstation.st Tue Apr 22 18:17:47 2008 +0200 +++ b/WinWorkstation.st Wed Apr 23 16:32:25 2008 +0200 @@ -10211,6 +10211,7 @@ SetTextColor(hDC, gcData->fgColor); SetBkColor(hDC, gcData->bgColor); #endif + GcDataGetPen(hDC, gcData); cls = __qClass(aString); @@ -10281,6 +10282,7 @@ } } ret:; + GcDataReleasePen(hDC, gcData); #if 0 SelectObject(hDC, hOldFont); #endif @@ -13812,25 +13814,25 @@ initializeDefaultKeyboardMappingsIn:aKeyboardMap #( - Copy Ctrlc "copy selection to buffer" - Cut Ctrlx "cut selection into buffer" - Paste Ctrlv "paste buffer or external selection" - UserInterrupt CtrlCancel "Break - interrupt window process (win standard" - UserInterrupt Pause "interrupt window process (smalltalk special)" - $0 KeyPad0 "NumLocked numeric keypad keys..." - $1 KeyPad1 - $2 KeyPad2 - $3 KeyPad3 - $4 KeyPad4 - $5 KeyPad5 - $6 KeyPad6 - $7 KeyPad7 - $8 KeyPad8 - $9 KeyPad9 + Copy Ctrlc "copy selection to buffer" + Cut Ctrlx "cut selection into buffer" + Paste Ctrlv "paste buffer or external selection" + UserInterrupt CtrlCancel "Break - interrupt window process (win standard" + UserInterrupt Pause "interrupt window process (smalltalk special)" + $0 KeyPad0 "NumLocked numeric keypad keys..." + $1 KeyPad1 + $2 KeyPad2 + $3 KeyPad3 + $4 KeyPad4 + $5 KeyPad5 + $6 KeyPad6 + $7 KeyPad7 + $8 KeyPad8 + $9 KeyPad9 ) pairWiseDo:[:eachMapping :eachKey| - aKeyboardMap - bindValue:eachMapping to:eachKey. - ]. + aKeyboardMap + bindValue:eachMapping to:eachKey. + ]. " Screen default initializeDefaultKeyboardMappingsIn:Screen default keyboardMap @@ -14168,13 +14170,13 @@ windows displays ...)" displayId notNil ifTrue:[ - "/ already connected - trying to trick me ? - ^ self + "/ already connected - trying to trick me ? + ^ self ]. displayId := self primInitializeFor:aDisplayName. displayId isNil ifTrue:[ - self class deviceOpenErrorSignal raiseWith:aDisplayName + self class deviceOpenErrorSignal raiseWith:aDisplayName ]. dispatching := false. @@ -16719,135 +16721,135 @@ |minW minH maxW maxH| minExt notNil ifTrue:[ - minW := minExt x. - minH := minExt y. + minW := minExt x. + minH := minExt y. ]. maxExt notNil ifTrue:[ - maxW := maxExt x. - maxH := maxExt y. + maxW := maxExt x. + maxH := maxExt y. ]. %{ if (__isExternalAddress(aWindowId)) { - HWND win = _HWNDVal(aWindowId); - - if (win) { - int bw = 0; - int flag = 0; - int __left, __top, __width, __height; - int winStyleBits; - int winExStyleBits; - localWindowInfo *lI; - - bw = GetWindow_bw(win); - winStyleBits = GetWindowLong(win, GWL_STYLE); - winExStyleBits = GetWindowLong(win, GWL_EXSTYLE); - lI = GETLOCALWINDOWINFOPTR(win); - if (! lI) { - console_fprintf(stderr, "WinWorkstation [info]: oops - no localInfo in mapView\n"); - RETURN (self); - } - - if (__bothSmallInteger(x, y)) { - __left = __intVal(x) + bw; - __top = __intVal(y) + bw; - } else { - __left = __top = 0; - flag |= SWP_NOMOVE; - } - if (__bothSmallInteger(w, h)) { - __width = __intVal(w) - bw - bw; - __height = __intVal(h) - bw - bw; - } else { - __width = __height = 100; - flag |= SWP_NOSIZE; - } - - if (__bothSmallInteger(minW, minH)) { - RECT rec; - - rec.left = 0; - rec.top = 0; - rec.right = __intVal(minW); - rec.bottom = __intVal(minH); + HWND win = _HWNDVal(aWindowId); + + if (win) { + int bw = 0; + int flag = 0; + int __left, __top, __width, __height; + int winStyleBits; + int winExStyleBits; + localWindowInfo *lI; + + bw = GetWindow_bw(win); + winStyleBits = GetWindowLong(win, GWL_STYLE); + winExStyleBits = GetWindowLong(win, GWL_EXSTYLE); + lI = GETLOCALWINDOWINFOPTR(win); + if (! lI) { + console_fprintf(stderr, "WinWorkstation [info]: oops - no localInfo in mapView\n"); + RETURN (self); + } + + if (__bothSmallInteger(x, y)) { + __left = __intVal(x) + bw; + __top = __intVal(y) + bw; + } else { + __left = __top = 0; + flag |= SWP_NOMOVE; + } + if (__bothSmallInteger(w, h)) { + __width = __intVal(w) - bw - bw; + __height = __intVal(h) - bw - bw; + } else { + __width = __height = 100; + flag |= SWP_NOSIZE; + } + + if (__bothSmallInteger(minW, minH)) { + RECT rec; + + rec.left = 0; + rec.top = 0; + rec.right = __intVal(minW); + rec.bottom = __intVal(minH); #ifdef ADJUSTWINDOW - AdjustWindowRectEx(&rec, winStyleBits, 0, winExStyleBits); -#endif - lI->minWidth = rec.right - rec.left; - lI->minHeight = rec.bottom - rec.top; - } - if (__bothSmallInteger(maxW, maxH)) { - RECT rec; - - rec.left = 0; - rec.top = 0; - rec.right = __intVal(maxW); - rec.bottom = __intVal(maxH); + AdjustWindowRectEx(&rec, winStyleBits, 0, winExStyleBits); +#endif + lI->minWidth = rec.right - rec.left; + lI->minHeight = rec.bottom - rec.top; + } + if (__bothSmallInteger(maxW, maxH)) { + RECT rec; + + rec.left = 0; + rec.top = 0; + rec.right = __intVal(maxW); + rec.bottom = __intVal(maxH); #ifdef ADJUSTWINDOW - AdjustWindowRectEx(&rec, winStyleBits, 0, winExStyleBits); -#endif - lI->maxWidth = rec.right - rec.left; - lI->maxHeight = rec.bottom - rec.top; - } + AdjustWindowRectEx(&rec, winStyleBits, 0, winExStyleBits); +#endif + lI->maxWidth = rec.right - rec.left; + lI->maxHeight = rec.bottom - rec.top; + } #ifdef ADJUSTWINDOW - if (flag != (SWP_NOMOVE | SWP_NOSIZE)) { - RECT rec; - int __left0, __top0, __width0, __height0; - - __left0 = __left; - __top0 = __top; - __width0 = __width; - __height0 = __height; - - rec.left = __left-2; - rec.top = __top-2; - rec.right = rec.left + __width; - rec.bottom = rec.top + __height; - AdjustWindowRectEx(&rec, winStyleBits, 0, winExStyleBits); - - __left = rec.left; - __top = rec.top; - __width = rec.right - rec.left; - __height = rec.bottom - rec.top; - - CPRINTF(("mapView %x %d/%d %d/%d -> %d/%d %d/%d\n", - win, - __left0, __top0, __width0, __height0, - __left, __top, __width, __height)); - } -#else - CPRINTF(("mapView %x %d/%d %d/%d\n", - win, - __left, __top, __width, __height)); -#endif - - flag |= SWP_NOACTIVATE | SWP_NOSENDCHANGING | SWP_NOZORDER | SWP_NOOWNERZORDER; - - if (aBoolean == true) { - /* iconified */ + if (flag != (SWP_NOMOVE | SWP_NOSIZE)) { + RECT rec; + int __left0, __top0, __width0, __height0; + + __left0 = __left; + __top0 = __top; + __width0 = __width; + __height0 = __height; + + rec.left = __left-2; + rec.top = __top-2; + rec.right = rec.left + __width; + rec.bottom = rec.top + __height; + AdjustWindowRectEx(&rec, winStyleBits, 0, winExStyleBits); + + __left = rec.left; + __top = rec.top; + __width = rec.right - rec.left; + __height = rec.bottom - rec.top; + + CPRINTF(("mapView %x %d/%d %d/%d -> %d/%d %d/%d\n", + win, + __left0, __top0, __width0, __height0, + __left, __top, __width, __height)); + } +#else + CPRINTF(("mapView %x %d/%d %d/%d\n", + win, + __left, __top, __width, __height)); +#endif + + flag |= SWP_NOACTIVATE | SWP_NOSENDCHANGING | SWP_NOZORDER | SWP_NOOWNERZORDER; + + if (aBoolean == true) { + /* iconified */ // SetWindowPos(win, (HWND)0, // __left, __top, __width, __height, // flag); // ShowWindow(win, SW_SHOWMINIMIZED); - ShowWindowAsync(win, SW_SHOWMINNOACTIVE); + ShowWindowAsync(win, SW_SHOWMINNOACTIVE); /* - enqEvent(0, win, WM_SHOWWINDOW, FALSE, 0, 0, 0, 0, EV_NOTIME); + enqEvent(0, win, WM_SHOWWINDOW, FALSE, 0, 0, 0, 0, EV_NOTIME); */ - } else { - /* normal */ - SetWindowPos(win, (HWND)0, - __left, __top, __width, __height, - flag); + } else { + /* normal */ + SetWindowPos(win, (HWND)0, + __left, __top, __width, __height, + flag); /* - enqEvent(0, win, WM_SHOWWINDOW, TRUE, 0, 0, 0, 0, EV_NOTIME); + enqEvent(0, win, WM_SHOWWINDOW, TRUE, 0, 0, 0, 0, EV_NOTIME); */ - //ShowWindow(win, SW_RESTORE); - // ShowWindowAsync(win, SW_RESTORE); - ShowWindowAsync(win, SW_SHOWNOACTIVATE); - } - } - RETURN ( self ); + //ShowWindow(win, SW_RESTORE); + // ShowWindowAsync(win, SW_RESTORE); + ShowWindowAsync(win, SW_SHOWNOACTIVATE); + } + } + RETURN ( self ); } %} ! @@ -16887,29 +16889,29 @@ if (__isExternalAddress(aWindowId) && __bothSmallInteger(x, y) && __bothSmallInteger(w, h)) { - HWND win = _HWNDVal(aWindowId); - int bw = 0; - - if (win) { - bw = GetWindow_bw(win); - - rec.left = __intVal(x) + bw; - rec.top = __intVal(y) + bw; - rec.right = rec.left + __intVal(w) - bw - bw; - rec.bottom = rec.top + __intVal(h) - bw - bw; - if (GetParent(win) == 0) { + HWND win = _HWNDVal(aWindowId); + int bw = 0; + + if (win) { + bw = GetWindow_bw(win); + + rec.left = __intVal(x) + bw; + rec.top = __intVal(y) + bw; + rec.right = rec.left + __intVal(w) - bw - bw; + rec.bottom = rec.top + __intVal(h) - bw - bw; + if (GetParent(win) == 0) { #ifdef ADJUSTWINDOW - AdjustWindowRectEx(&rec,GetWindowLong(win,GWL_STYLE),0,GetWindowLong(win,GWL_EXSTYLE)); -#endif - } - CPRINTF(("moveresize %x x:%d y:%d w:%d h:%d -> x:%d y:%d w:%d h:%d\n",win,__intVal(x),__intVal(y),__intVal(w),__intVal(h),rec.left,rec.top, - rec.right - rec.left, rec.bottom - rec.top)); - SetWindowPos(win, (HWND)0, - rec.left, rec.top, - rec.right - rec.left, rec.bottom - rec.top, - SWP_NOSENDCHANGING | SWP_NOACTIVATE | SWP_NOZORDER | SWP_NOOWNERZORDER); - } - RETURN ( self ); + AdjustWindowRectEx(&rec,GetWindowLong(win,GWL_STYLE),0,GetWindowLong(win,GWL_EXSTYLE)); +#endif + } + CPRINTF(("moveresize %x x:%d y:%d w:%d h:%d -> x:%d y:%d w:%d h:%d\n",win,__intVal(x),__intVal(y),__intVal(w),__intVal(h),rec.left,rec.top, + rec.right - rec.left, rec.bottom - rec.top)); + SetWindowPos(win, (HWND)0, + rec.left, rec.top, + rec.right - rec.left, rec.bottom - rec.top, + SWP_NOSENDCHANGING | SWP_NOACTIVATE | SWP_NOZORDER | SWP_NOOWNERZORDER); + } + RETURN ( self ); } %} ! @@ -16922,29 +16924,29 @@ if (__isExternalAddress(aWindowId) && __bothSmallInteger(x, y)) { - HWND win = _HWNDVal(aWindowId); - int bw = 0; - - if (win) { - bw = GetWindow_bw(win); - - rec.left = __intVal(x) + bw; - rec.top = __intVal(y) + bw; - if (GetParent(win) == 0) { - rec.right = rec.left + 10; /* only needed to give adjust some valid numbers */ - rec.bottom = rec.top + 10; + HWND win = _HWNDVal(aWindowId); + int bw = 0; + + if (win) { + bw = GetWindow_bw(win); + + rec.left = __intVal(x) + bw; + rec.top = __intVal(y) + bw; + if (GetParent(win) == 0) { + rec.right = rec.left + 10; /* only needed to give adjust some valid numbers */ + rec.bottom = rec.top + 10; #ifdef ADJUSTWINDOW - AdjustWindowRectEx(&rec, GetWindowLong(win,GWL_STYLE), 0, GetWindowLong(win,GWL_EXSTYLE)); -#endif - } - CPRINTF(("move %x x:%d y:%d -> x:%d y:%d\n", win, - __intVal(x), __intVal(y), rec.left, rec.top)); - SetWindowPos(win, (HWND)0, - rec.left, rec.top, - 0, 0, - SWP_NOSENDCHANGING | SWP_NOACTIVATE | SWP_NOSIZE | SWP_NOZORDER | SWP_NOOWNERZORDER); - } - RETURN ( self ); + AdjustWindowRectEx(&rec, GetWindowLong(win,GWL_STYLE), 0, GetWindowLong(win,GWL_EXSTYLE)); +#endif + } + CPRINTF(("move %x x:%d y:%d -> x:%d y:%d\n", win, + __intVal(x), __intVal(y), rec.left, rec.top)); + SetWindowPos(win, (HWND)0, + rec.left, rec.top, + 0, 0, + SWP_NOSENDCHANGING | SWP_NOACTIVATE | SWP_NOSIZE | SWP_NOZORDER | SWP_NOOWNERZORDER); + } + RETURN ( self ); } %} ! @@ -17813,7 +17815,7 @@ !WinWorkstation class methodsFor:'documentation'! version - ^ '$Header: /cvs/stx/stx/libview/WinWorkstation.st,v 1.361 2008-02-28 17:02:25 stefan Exp $' + ^ '$Header: /cvs/stx/stx/libview/WinWorkstation.st,v 1.362 2008-04-23 14:32:25 cg Exp $' ! ! WinWorkstation initialize! diff -r 65df50a477bc -r 8f9071993f39 resources/de.rs --- a/resources/de.rs Tue Apr 22 18:17:47 2008 +0200 +++ b/resources/de.rs Wed Apr 23 16:32:25 2008 +0200 @@ -3,7 +3,7 @@ ; ; German ; -; $Header: /cvs/stx/stx/libview/resources/de.rs,v 1.18 2007-03-01 14:48:30 cg Exp $ +; $Header: /cvs/stx/stx/libview/resources/de.rs,v 1.19 2008-04-23 14:32:25 cg Exp $ ; ; this file contains 8bit national characters; ; DONT EDIT this file with an old vi ! @@ -169,6 +169,13 @@ 'Special Characters' 'Sonderzeichen' 'Show Character Set' 'Zeichensatz anzeigen' +'Compare with Clipboard' 'Vergleichen mit Clipboard' +'Open Workspace with It' 'Workspace mit Selektion öffnen' +'Insert new UUID' 'Neue UUID einfügen' +'Paste Previous' 'Alten Text einfügen' +'Clipboard History' 'Clipboard Historie' + +'Join Lines' 'Zeilen zusammenfassen' 'line number:' 'Zeilennummer:' 'line number (or +/- relativeNr):' 'Zeilennummer (oder +/- relative Nr.):'