- Timestamp:
- Oct 23, 2009, 8:50:29 PM (16 years ago)
- Location:
- trunk/src/plugins/org.eclipse.swt/Eclipse SWT/pm/org/eclipse/swt/widgets
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/plugins/org.eclipse.swt/Eclipse SWT/pm/org/eclipse/swt/widgets/Control.java
r207 r212 3479 3479 // return null; 3480 3480 } 3481 3482 //LRESULT WM_MENUCHAR (int wParam, int lParam) {3483 // Display display = getDisplay ();3484 // display.mnemonicKeyHit = false;3485 // /*3486 // * Feature in Windows. When the user types Alt+<key>3487 // * and <key> does not match a mnemonic in the System3488 // * menu or the menu bar, Windows beeps. This beep is3489 // * unexpected and unwanted by applications that look3490 // * for Alt+<key>. The fix is to detect the case and3491 // * stop Windows from beeping by closing the menu.3492 // */3493 // int type = wParam >> 16;3494 // if (type == 0 || type == OS.MF_SYSMENU) {3495 // return new LRESULT (OS.MNC_CLOSE << 16);3496 // }3497 // return null;3498 //}3499 3481 3500 3482 MRESULT WM_MENUSELECT (int mp1, int mp2) { … … 3659 3641 3660 3642 MRESULT WM_PAINT (int mp1, int mp2) { 3643 // System.out.println("Control::WM_PAINT -> HANDLE = " + Integer.toHexString(handle)); 3661 3644 /* Exit early - don't draw the background */ 3662 3645 if (!hooks (SWT.Paint)) { … … 3745 3728 3746 3729 MRESULT WM_SETFOCUS (int mp1, int mp2) { 3730 // System.out.println("Control::WM_SETFOCUS -> handle = " + Integer.toHexString(mp1)); 3731 // System.out.println("Control::WM_SETFOCUS -> mp2 = " + OS.SHORT1FROMMP (mp2)); 3747 3732 callWindowProc (OS.WM_SETFOCUS, mp1, mp2); 3748 3733 Shell shell = getShell (); … … 3838 3823 // return null; 3839 3824 //} 3840 // 3825 //@@TODO (lpino): Complete including differences with Win32 (WM_SYSCHAR + WM_SYSKEYDOWN) 3841 3826 MRESULT WM_SYSCOMMAND (int mp1, int mp2) { 3842 3827 // /* … … 3859 3844 switch (cmd) { 3860 3845 case OS.SC_CLOSE: 3846 System.out.println("Control::WM_SYSCOMMAND -> SC_CLOSE"); 3861 3847 int hwndShell = menuShell ().handle; 3862 3848 // int bits = OS.WinQueryWindowULong (frameHandle, OS.QWL_STYLE); … … 3988 3974 return new MRESULT (result); 3989 3975 } 3976 3990 3977 MRESULT WM_FOCUSCHANGE (int mp1, int mp2) { 3991 3978 callWindowProc (OS.WM_FOCUSCHANGE, mp1, mp2); 3992 3979 return MRESULT.ZERO; 3993 3980 } 3981 3982 //@@TODO(lpino): Consider the process in Menu controls and ListBoxes 3994 3983 //MRESULT WM_ADJUSTWINDOWPOS (int mp1, int mp2) { 3995 3984 // System.out.println("Control:WM_ADJUSTWINDOWPOS"); … … 4034 4023 return null; 4035 4024 } 4036 //4037 //LRESULT wmNotifyChild (int wParam, int lParam) {4038 // return null;4039 //}4040 4025 4041 4026 MRESULT wmScrollChild (int mp1, int mp2) { -
trunk/src/plugins/org.eclipse.swt/Eclipse SWT/pm/org/eclipse/swt/widgets/Decorations.java
r194 r212 1206 1206 sendEvent (SWT.Show); 1207 1207 if (isDisposed ()) return; 1208 // OS.DrawMenuBar (handle); 1209 // OS.ShowWindow (handle, swFlags); 1208 1210 } 1209 1211 … … 1367 1369 switch (msg) { 1368 1370 case OS.WM_ACTIVATE: result = FRAME_WM_ACTIVATE (mp1, mp2); break; 1371 // case OS.WM_CLOSE: result = FRAME_WM_CLOSE (mp1, mp2); break; 1369 1372 case OS.WM_ADJUSTWINDOWPOS: result = FRAME_WM_ADJUSTWINDOWPOS (mp1, mp2); break; 1370 1373 case OS.WM_REALIZEPALETTE: result = FRAME_WM_REALIZEPALETTE (mp1, mp2); break; 1371 1374 case OS.WM_WINDOWPOSCHANGED: result = FRAME_WM_WINDOWPOSCHANGED (mp1, mp2); break; 1372 1375 case OS.WM_CHAR: result = FRAME_WM_CHAR (mp1, mp2); break; 1373 case OS.WM_ERASEBACKGROUND: result = FRAME_WM_ERASEBACKGROUND (mp1, mp2); break;1376 // case OS.WM_ERASEBACKGROUND: result = FRAME_WM_ERASEBACKGROUND (mp1, mp2); break; 1374 1377 case OS.WM_INITMENU: result = FRAME_WM_INITMENU (mp1, mp2); break; 1375 1378 } … … 1435 1438 sendEvent (SWT.Activate); 1436 1439 if (isDisposed ()) return MRESULT.ZERO; 1437 restoreFocus ();1440 if(restoreFocus ()) return MRESULT.ZERO;; 1438 1441 } 1439 1442 return null; … … 1504 1507 } 1505 1508 1506 MRESULT FRAME_WM_ERASEBACKGROUND (int mp1, int mp2) {1507 // @@TODO (lpino): Remove debug1508 //System.out.println("Decorations::WM_ERASEBACKGROUND -> HANDLE = " + Integer.toHexString(handle));1509 if ((state & CANVAS) != 0) {1510 return super.WM_ERASEBACKGROUND (mp1, mp2);1511 }1512 RECTL rcl = new RECTL();1513 OS.objcpy (rcl, mp2);1514 drawBackground (mp1, rcl);1515 return MRESULT.FALSE;1516 }1517 1518 MRESULT FRAME_WM_INITMENU (int mp1, int mp2) {1519 return MRESULT.FALSE;1509 // // MRESULT WM_ERASEBACKGROUND (int mp1, int mp2) { 1510 // // //@@TODO (lpino): Remove debug 1511 // // System.out.println("Decorations::WM_ERASEBACKGROUND -> HANDLE = " + Integer.toHexString(handle)); 1512 // // if ((state & CANVAS) != 0) { 1513 // // return super.WM_ERASEBACKGROUND (mp1, mp2); 1514 // // } 1515 // // RECTL rcl = new RECTL(); 1516 // // OS.objcpy (rcl, mp2); 1517 // // drawBackground (mp1, rcl); 1518 // // return MRESULT.FALSE; 1519 // // } 1520 // // 1521 MRESULT FRAME_WM_INITMENU (int mp1, int mp2) { 1522 return MRESULT.FALSE; 1520 1523 } 1521 1524 MRESULT WM_SETFOCUS (int mp1, int mp2) { -
trunk/src/plugins/org.eclipse.swt/Eclipse SWT/pm/org/eclipse/swt/widgets/Shell.java
r202 r212 461 461 * is currently unspecified. 462 462 */ 463 ///*464 //* Note: It is valid to attempt to dispose a widget465 //* more than once. If this happens, fail silently.466 //*/463 /* 464 * Note: It is valid to attempt to dispose a widget 465 * more than once. If this happens, fail silently. 466 */ 467 467 // if (!isValidWidget ()) return; 468 468 // if (!isValidThread ()) error (SWT.ERROR_THREAD_INVALID_ACCESS); … … 473 473 } 474 474 475 //@@TODO( dmik)475 //@@TODO(lpino): Use GpiSetPattern 476 476 //int findBrush (int pixel) { 477 477 // if (pixel == OS.GetSysColor (OS.COLOR_BTNFACE)) { … … 546 546 547 547 //@@TODO(dmik): what to do with TrimEnabled? 548 //public boolean getEnabled () {549 //checkWidget ();550 //if (!display.TrimEnabled) return super.getEnabled ();551 //return (state & DISABLED) == 0;552 //}548 public boolean getEnabled () { 549 checkWidget (); 550 if (!display.TrimEnabled) return super.getEnabled (); 551 return (state & DISABLED) == 0; 552 } 553 553 554 554 /**
Note:
See TracChangeset
for help on using the changeset viewer.