- Timestamp:
- Sep 25, 2009, 3:25:38 PM (16 years ago)
- Location:
- trunk/src/plugins/org.eclipse.swt
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/plugins/org.eclipse.swt/Eclipse SWT PI/pm/org/eclipse/swt/internal/pm/OS.java
r185 r191 150 150 public static final int WS_CLIPCHILDREN = 0x20000000; 151 151 public static final int WS_CLIPSIBLINGS = 0x10000000; 152 //public static final int WS_PARENTCLIP = 0x08000000;152 public static final int WS_PARENTCLIP = 0x08000000; 153 153 // public static final int WS_SAVEBITS = 0x04000000; 154 154 public static final int WS_SYNCPAINT = 0x02000000; -
trunk/src/plugins/org.eclipse.swt/Eclipse SWT/pm/org/eclipse/swt/widgets/Composite.java
r188 r191 308 308 int count = getChildrenCount (); 309 309 if (count == 0) return; 310 //@@TODO(dmik): remove311 // if (count > 1 && hdwp == 0) {312 // hdwp = OS.BeginDeferWindowPos (count);313 // }314 310 if (count > 1 && pswp == 0) { 315 311 beginDeferWindowPos (this, count); 316 312 } 317 313 layout.layout (this, changed); 318 //@@TODO(dmik): remove319 // int oldHdwp = hdwp;320 // hdwp = 0;321 // if (oldHdwp != 0) OS.EndDeferWindowPos (oldHdwp);322 314 if (pswp != 0) { 323 315 endDeferWindowPos (this); … … 348 340 349 341 void releaseWidget () { 350 //@@TODO (dmik): remove351 // int oldHdwp = hdwp;352 // hdwp = 0;353 // if (oldHdwp != 0) OS.EndDeferWindowPos (oldHdwp);354 342 if (pswp != 0) { 355 343 endDeferWindowPos (this); … … 505 493 int widgetStyle () { 506 494 /* Temporary code to force SWT.CLIP_SIBLINGS */ 507 return super.widgetStyle (); // | OS.WS_CLIPCHILDREN;495 return super.widgetStyle ();// | OS.WS_CLIPCHILDREN | OS.WS_CLIPSIBLINGS; 508 496 } 509 497 … … 513 501 if ((style & SWT.NO_REDRAW_RESIZE) == 0) { 514 502 if (hooks (SWT.Paint)) { 515 OS.WinInvalidateRect (handle, null, false);503 OS.WinInvalidateRect (handle, null, false); 516 504 } 517 505 } … … 523 511 // And may be better to move this code to Decorations class... 524 512 MRESULT WM_ERASEBACKGROUND (int mp1, int mp2) { 513 //@@TODO (lpino): Remove log 525 514 // System.out.println("Composite::WM_ERASEBACKGROUND -> HANDLE = " + Integer.toHexString(handle)); 526 515 if ((state & CANVAS) != 0) { 527 //@@TODO(lpino): This invalidation forces a whole window repaint to prevent clipping errors when window is partially obscure 528 //it has a negative impact on performance. As my understanding improves maybe this problem can be solved 529 OS.WinInvalidateRect(handle, null, true); 530 // OS.WinUpdateWindow(handle); 531 return super.WM_ERASEBACKGROUND (mp1, mp2); 516 return MRESULT.FALSE; 517 // return super.WM_ERASEBACKGROUND (mp1, mp2); 532 518 } 533 519 RECTL rcl = new RECTL(); … … 633 619 return super.WM_PAINT (mp1, mp2); 634 620 } 621 635 622 /* 636 623 * This code is intentionally commented. Don't exit … … 643 630 // if (!hooks (SWT.Paint)) return null; 644 631 /* lazily obtain a long-term cached micro presentation space */ 645 // System.out.println("Composite::WM_PAINT -> HANDLE = " + Integer.toHexString(handle)); 632 646 633 GCData data = new GCData (); 647 634 if (hps == 0) { … … 650 637 data.doInit = true; 651 638 } 639 652 640 // /* Get the damage */ 653 641 int [] rgnRects = null; … … 671 659 } 672 660 673 // /* Set the clipping bits */ 661 /* Set the clipping bits */ 662 //@@TODO (lpino): Remove log 663 // System.out.println("Composite::WM_PAINT -> HANDLE = " + Integer.toHexString(handle)); 674 664 int oldBits = 0; 675 665 oldBits = OS.WinQueryWindowULong (handle, OS.QWL_STYLE); … … 677 667 OS.WinSetWindowULong (handle, OS.QWL_STYLE, newBits); 678 668 679 ///* Create the paint GC */669 /* Create the paint GC */ 680 670 data.rcl = new RECTL (); 681 671 data.hps = hps; … … 711 701 rcl.xRight = rgnRects [(i << 2) + 2]; 712 702 rcl.yTop = rgnRects [(i << 2) + 3]; 713 // System.out.println("Control::drawBackground -> xLeft = " + rcl.xLeft);714 // System.out.println("Control::drawBackground -> xRight = " + rcl.xRight);715 // System.out.println("Control::drawBackground -> yBottom = " + rcl.yBottom);716 // System.out.println("Control::drawBackground -> yTop = " + rcl.yTop);717 703 drawBackground (0, rcl); 718 704 event.x = rcl.xLeft; -
trunk/src/plugins/org.eclipse.swt/Eclipse SWT/pm/org/eclipse/swt/widgets/Decorations.java
r142 r191 94 94 public class Decorations extends Canvas { 95 95 //@@TODO(dmik) 96 //Image image;96 Image image; 97 97 Menu menuBar; 98 98 Menu [] menus; … … 262 262 checkWidget (); 263 263 RECTL rcl = new RECTL (); 264 rcl.xLeft = x; rcl.yBottom = y;265 rcl.xRight = x + width; rcl.yTop = y + height;264 rcl.xLeft = x; rcl.yBottom = y; 265 rcl.xRight = x + width; rcl.yTop = y + height; 266 266 267 267 /* Get the size of the scroll bars */ 268 if (horizontalBar != null) rcl. xRight += OS.WinQuerySysValue (OS.HWND_DESKTOP, OS.SV_CXVSCROLL);269 if (verticalBar != null) rcl. yTop += OS.WinQuerySysValue (OS.HWND_DESKTOP, OS.SV_CYHSCROLL);268 if (horizontalBar != null) rcl.yTop += OS.WinQuerySysValue (OS.HWND_DESKTOP, OS.SV_CYHSCROLL); 269 if (verticalBar != null) rcl.xRight += OS.WinQuerySysValue (OS.HWND_DESKTOP, OS.SV_CXVSCROLL); 270 270 /* Get the height of the menu bar */ 271 271 //@@TEMP(lpino): I'm not sure if we need to calculate the height of the menu using SV_CYMENU' 272 272 // if (hasMenu) { 273 // RECT testRect = new RECT();274 // OS. SetRect (testRect, 0, 0, rect.right - rect.left, rect.bottom - rect.top);273 // RECTL testRect = new RECTL (); 274 // OS.WinSetRect (testRect, 0, 0, rcl.xRight - rcl.xLeft, rcl.yTop - rcl.yBottom); 275 275 // OS.SendMessage (handle, OS.WM_NCCALCSIZE, 0, testRect); 276 276 // while ((testRect.bottom - testRect.top) < height) { 277 // rect.top -= OS. GetSystemMetrics (OS.SM_CYMENU) - OS.GetSystemMetrics (OS.SM_CYBORDER);277 // rect.top -= OS.WinQuerySysValue (handleFrame, OS.SV_CYMENU) - OS.WinQuerySysValue (handleFrame, OS.SV_CYBORDER); 278 278 // OS.SetRect(testRect, 0, 0, rect.right - rect.left, rect.bottom - rect.top); 279 279 // OS.SendMessage (handle, OS.WM_NCCALCSIZE, 0, testRect); … … 396 396 OS.WinSendMsg (frameHandle, OS.WM_UPDATEFRAME, fcdata.flCreateFlags, 0); 397 397 /* 398 * Create a clien dwindow.398 * Create a client window. 399 399 */ 400 400 handle = OS.WinCreateWindow ( … … 423 423 if (parent == null) return; 424 424 setParent (); 425 //setSystemMenu ();425 setSystemMenu (); 426 426 } 427 427 … … 1026 1026 } 1027 1027 1028 //@@TODO (dmik): later1029 1028 ///** 1030 1029 // * Sets the receiver's menu bar to the argument, which … … 1281 1280 1282 1281 int windowProc (int msg, int mp1, int mp2) { 1283 //@@TODO (dmik): remove1284 1282 switch (msg) { 1285 //@@TODO(dmik)1286 1283 case OS.WM_USER: 1287 1284 case OS.WM_USER+1: … … 1504 1501 } 1505 1502 1503 //MRESULT WM_ERASEBACKGROUND (int mp1, int mp2) { 1504 // System.out.println("Decorations::WM_ERASEBACKGROUND -> HANDLE = " + Integer.toHexString(handle)); 1505 // if ((state & CANVAS) != 0) { 1506 // return super.WM_ERASEBACKGROUND (mp1, mp2); 1507 // } 1508 // RECTL rcl = new RECTL(); 1509 // OS.objcpy (rcl, mp2); 1510 // drawBackground (mp1, rcl); 1511 // return MRESULT.FALSE; 1512 //} 1513 1506 1514 MRESULT WM_SETFOCUS (int mp1, int mp2) { 1507 1515 MRESULT result = super.WM_SETFOCUS (mp1, mp2); -
trunk/src/plugins/org.eclipse.swt/Eclipse SWT/pm/org/eclipse/swt/widgets/Group.java
r186 r191 294 294 } 295 295 296 //LRESULT WM_PRINTCLIENT (int wParam, int lParam) { 297 // LRESULT result = super.WM_PRINTCLIENT (wParam, lParam); 298 // if (result != null) return result; 299 // /* 300 // * Feature in Windows. In version 6.00 of COMCTL32.DLL, 301 // * when WM_PRINTCLIENT is sent from a child BS_GROUP 302 // * control to a parent BS_GROUP, the parent BS_GROUP 303 // * clears the font from the HDC. Normally, group boxes 304 // * in Windows do not have children so this behavior is 305 // * undefined. When the parent of a BS_GROUP is not a 306 // * BS_GROUP, there is no problem. The fix is to save 307 // * and restore the current font. 308 // */ 309 // if (COMCTL32_MAJOR >= 6) { 310 // int hFont = OS.GetCurrentObject (wParam, OS.OBJ_FONT); 311 // int code = callWindowProc (OS.WM_PRINTCLIENT, wParam, lParam); 312 // OS.SelectObject (wParam, hFont); 313 // return new LRESULT (code); 314 // } 315 // return result; 296 //MRESULT WM_ERASEBACKGROUND (int mp1, int mp2) { 297 // System.out.println("Group::WM_ERASEBACKGROUND -> HANDLE = " + Integer.toHexString(handle)); 298 //// if ((state & CANVAS) != 0) { 299 //// //@@TODO(lpino): This invalidation forces a whole window repaint to prevent clipping errors when window is partially obscure 300 //// //it has a negative impact on performance. As my understanding improves maybe this problem can be solved 301 ////// OS.WinInvalidateRect(handle, null, true); 302 ////// OS.WinUpdateWindow(handle); 303 ////// OS.WinFillRect(mp1, mp2, getBackgroundPixel ()); 304 //// return MRESULT.TRUE; 305 ////// return super.WM_ERASEBACKGROUND (mp1, mp2); 306 //// } 307 //// RECTL rcl = new RECTL(); 308 //// OS.objcpy (rcl, mp2); 309 //// drawBackground (mp1, rcl); 310 // return MRESULT.TRUE; 316 311 //} 317 312 … … 332 327 return new MRESULT (code); 333 328 } 334 335 } 329 //MRESULT WM_PAINT (int mp1, int mp2) { 330 // System.out.println("Group::WM_PAINT -> HANDLE = " + Integer.toHexString(handle)); 331 // GCData data = new GCData (); 332 // if (hps == 0) { 333 // hps = internal_new_GC (data); 334 // if (hps == 0) SWT.error(SWT.ERROR_NO_HANDLES); 335 // data.doInit = true; 336 // } 337 // 338 // /* Create the paint GC */ 339 // data.rcl = new RECTL (); 340 // data.hps = hps; 341 // 342 // drawBackground(hps); 343 // /* Dispose the paint GC */ 344 // System.out.println("Group::WM_PAINT -> HPS = " + Integer.toHexString(hps)); 345 // callWindowProc(OS.WM_PAINT, mp1, mp2); 346 // return MRESULT.ZERO; 347 //} 348 } -
trunk/src/plugins/org.eclipse.swt/Eclipse SWT/pm/org/eclipse/swt/widgets/TabItem.java
r170 r191 206 206 this.control = control; 207 207 int index = parent.indexOf (this); 208 OS.WinSendMsg (parent.handle, OS.BKM_SETPAGEWINDOWHWND, this.parent.itemsID[index], control.handle); 208 OS.WinSendMsg (parent.handle, OS.BKM_SETPAGEWINDOWHWND, this.parent.itemsID[index], control.handle); 209 209 if (index != parent.getSelectionIndex ()) { 210 210 if (newControl != null) newControl.setVisible (false);
Note:
See TracChangeset
for help on using the changeset viewer.