- Timestamp:
- Jun 12, 2008, 5:10:02 PM (17 years ago)
- Location:
- trunk/src/plugins/org.eclipse.swt/Eclipse SWT/pm/org/eclipse/swt/widgets
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/plugins/org.eclipse.swt/Eclipse SWT/pm/org/eclipse/swt/widgets/Control.java
r86 r98 2942 2942 MRESULT result = null; 2943 2943 switch (msg) { 2944 // case OS.WM_ADJUSTWINDOWPOS: result = WM_ADJUSTWINDOWPOS (mp1, mp2); break; 2944 2945 case OS.WM_CALCVALIDRECTS: result = WM_CALCVALIDRECTS (mp1, mp2); break; 2945 2946 case OS.WM_CHAR: result = WM_CHAR (mp1, mp2); break; … … 3072 3073 switch (OS.SHORT1FROMMP (mp2)) { 3073 3074 //@@TODO(dmik) 3074 //case OS.CMDSRC_MENU: 3075 case OS.CMDSRC_MENU: 3076 System.out.println("Control:WM_COMMAND - CMDSRC_MENU"); 3077 break; 3075 3078 // return null; 3079 case OS.CMDSRC_ACCELERATOR: 3080 System.out.println("Control:WM_COMMAND - CMDSRC_ACCELERATOR"); 3081 break; 3076 3082 case OS.CMDSRC_PUSHBUTTON: 3077 3083 //@@TODO(lpino) … … 3080 3086 case OS.CMDSRC_COLORDLG: 3081 3087 //case OS.CMDSRC_PRINTDLG: 3082 int hwndChild = OS.WinWindowFromID (handle, OS.SHORT1FROMMP (mp1)); 3083 Control control = WidgetTable.get (hwndChild); 3084 if (control == null) return null; 3085 return control.wmCommandChild (mp1, mp2); 3086 } 3087 return null; 3088 } 3089 System.out.println("Control:WM_COMMAND - Calling wmCommandChild"); 3090 int hwndChild = OS.WinWindowFromID (handle, OS.SHORT1FROMMP (mp1)); 3091 Control control = WidgetTable.get (hwndChild); 3092 System.out.println("Control:WM_COMMAND - Control handle = " + Integer.toHexString (handle)); 3093 System.out.println("Control:WM_COMMAND - Child handle = " + Integer.toHexString (hwndChild)); 3094 // System.out.println("Control:WM_COMMAND - Menu handle = " + Integer.toHexString (menu.handle)); 3095 if (control == null) return null; 3096 return control.wmCommandChild (mp1, mp2); 3097 3098 // return null; 3088 3099 } 3089 3100 … … 3095 3106 */ 3096 3107 // if (mp2 != handle) return null; 3108 boolean bIsWaiting = true; 3109 System.out.println("Control:WM_CONTEXTMENU - PARENT HANDLE = " + Integer.toHexString (handle)); 3110 int hab = parent.getDisplay ().hab; 3097 3111 //@@TODO(lpino) Remove debug msg 3098 // System.out.println("Control:WM_CONTEXTMENU - HANDLE = " + Integer.toHexString (handle));3112 System.out.println("Control:WM_CONTEXTMENU - MENU HANDLE = " + Integer.toHexString (menu.handle)); 3099 3113 short flOptions = OS.PU_HCONSTRAIN | OS.PU_VCONSTRAIN | OS.PU_MOUSEBUTTON1DOWN | OS.PU_KEYBOARD | OS.PU_MOUSEBUTTON1; 3100 3114 boolean rc = OS.WinPopupMenu(handle, handle, menu.handle, 0, OS.SHORT1FROMMP(mp1), OS.SHORT2FROMMP(mp1), flOptions); 3101 3115 // if (menu != null && !menu.isDisposed ()) { 3102 3116 // menu.setVisible (true); 3103 // return MRESULT.ZERO;3104 3117 // } 3118 // while(bIsWaiting){ 3119 // QMSG qmsg = new QMSG (); 3120 // 3121 // OS.WinGetMsg(hab,qmsg, 0, 0, 0); 3122 // if (qmsg.msg == OS.WM_COMMAND) 3123 // bIsWaiting = false; 3124 // OS.WinDispatchMsg(hab, qmsg); 3125 // System.out.println("Control:WM_CONTEXTMENU"); 3126 // } 3127 System.out.println("Control:WM_CONTEXTMENU - ABOUT TO RETURN" ); 3105 3128 return MRESULT.TRUE; 3106 3129 } … … 3230 3253 // return null; 3231 3254 //} 3232 // 3255 3233 3256 MRESULT WM_INITMENU (int mp1, int mp2) { 3234 3257 3235 3258 /* Ignore WM_INITMENU for an accelerator */ 3259 System.out.println("Control:WM_INITMENU " + OS.WinIsWindowVisible(mp2)); 3236 3260 Display display = getDisplay (); 3237 3261 if (display.accelKeyHit) return null; 3238 System.out.println("Control:WM_INITMENU " + OS.WinIsWindowVisible(mp2));3239 3262 // /* 3240 3263 // * If the high order word of LPARAM is non-zero, … … 3806 3829 3807 3830 MRESULT WM_MENUEND (int mp1, int mp2) { 3808 System.out.println("Control:WM_MENUEND ");3831 System.out.println("Control:WM_MENUEND - HANDLE = " + Integer.toHexString (mp2)); 3809 3832 return null; 3810 3833 } … … 4016 4039 } 4017 4040 4041 //MRESULT WM_ADJUSTWINDOWPOS (int mp1, int mp2) { 4042 // System.out.println("Control:WM_ADJUSTWINDOWPOS"); 4043 // SWP swp = new SWP (); 4044 // OS.objcpy (swp, mp1); 4045 // if ((swp.fl & OS.SWP_MINIMIZE) != 0) { 4046 // sendEvent (SWT.Iconify); 4047 // // widget could be disposed at this point 4048 // } else if ((swp.fl & OS.SWP_RESTORE) != 0 && getMinimized ()) { 4049 // sendEvent (SWT.Deiconify); 4050 // // widget could be disposed at this point 4051 // } 4052 // return null; 4053 //} 4054 4018 4055 //@@TODO(dmik): seems we don't need it (presparams replace this) 4019 4056 //LRESULT wmColorChild (int wParam, int lParam) { -
trunk/src/plugins/org.eclipse.swt/Eclipse SWT/pm/org/eclipse/swt/widgets/Decorations.java
r88 r98 393 393 if (frameHandle == 0) error (SWT.ERROR_NO_HANDLES); 394 394 //@@TODO (dmik): debug code, remove when no more necessary 395 //System.out.println (396 //"Decorations.createHandle(): WC_FRAME has been created:\n" +397 //" hwnd = " + Integer.toHexString (frameHandle) + "\n" +398 //" hwnd.parent = " + Integer.toHexString (hwndParent) + "\n" +399 //" hwnd.owner = " + Integer.toHexString (hwndOwner) + "\n" +400 //" class = " + windowFrameClass() + "\n" +401 //" style = " + Integer.toHexString (widgetFrameStyle())402 //);395 System.out.println ( 396 "Decorations.createHandle(): WC_FRAME has been created:\n" + 397 " hwnd = " + Integer.toHexString (frameHandle) + "\n" + 398 " hwnd.parent = " + Integer.toHexString (hwndParent) + "\n" + 399 " hwnd.owner = " + Integer.toHexString (hwndOwner) + "\n" + 400 " class = " + windowFrameClass() + "\n" + 401 " style = " + Integer.toHexString (widgetFrameStyle()) 402 ); 403 403 FRAMECDATA fcdata = new FRAMECDATA (); 404 404 fcdata.flCreateFlags = widgetFrameFlags (); … … 423 423 state |= CANVAS; 424 424 //@@TODO (dmik): debug code, remove when no more necessary 425 //System.out.println (426 //"Decorations.createHandle(): FID_CLIENT window has been created:\n" +427 //" hwnd = " + Integer.toHexString (handle) + "\n" +428 //" hwnd.parent = hwnd.owner = " + Integer.toHexString (frameHandle) + "\n" +429 //" class = " + windowClass() + "\n" +430 //" style = " + Integer.toHexString (widgetStyle())431 //);425 System.out.println ( 426 "Decorations.createHandle(): FID_CLIENT window has been created:\n" + 427 " hwnd = " + Integer.toHexString (handle) + "\n" + 428 " hwnd.parent = hwnd.owner = " + Integer.toHexString (frameHandle) + "\n" + 429 " class = " + windowClass() + "\n" + 430 " style = " + Integer.toHexString (widgetStyle()) 431 ); 432 432 //@@TODO(dmik): do something for MDI windows if needed 433 433 // if (parent == null) return; -
trunk/src/plugins/org.eclipse.swt/Eclipse SWT/pm/org/eclipse/swt/widgets/Menu.java
r90 r98 885 885 // } 886 886 } 887 888 } 887 } -
trunk/src/plugins/org.eclipse.swt/Eclipse SWT/pm/org/eclipse/swt/widgets/Shell.java
r84 r98 1119 1119 //} 1120 1120 1121 //@@TODO (dmik): later 1122 //LRESULT WM_COMMAND (int wParam, int lParam) { 1123 // if (OS.IsPPC) { 1124 // /* 1125 // * Note in WinCE PPC: Close the Shell when the "Done Button" has 1126 // * been pressed. lParam is either 0 (PocketPC 2002) or the handle 1127 // * to the Shell (PocketPC). 1128 // */ 1129 // int loWord = wParam & 0xFFFF; 1130 // if (loWord == OS.IDOK && (lParam == 0 || lParam == handle)) { 1131 // OS.PostMessage (handle, OS.WM_CLOSE, 0, 0); 1132 // return LRESULT.ZERO; 1133 // } 1134 // /* 1135 // * Note in WinCE PPC. menu events originate from the 1136 // * command bar. 1137 // */ 1138 // if (hwndCB != 0 && lParam == hwndCB) { 1139 // return super.WM_COMMAND (wParam, 0); 1140 // } 1141 // } 1142 // return super.WM_COMMAND (wParam, lParam); 1143 //} 1144 // 1121 MRESULT WM_COMMAND (int mp1, int mp2) { 1122 return super.WM_COMMAND (mp1, mp2); 1123 } 1124 1145 1125 //LRESULT WM_DESTROY (int wParam, int lParam) { 1146 1126 // LRESULT result = super.WM_DESTROY (wParam, lParam); … … 1270 1250 // return result; 1271 1251 //} 1272 1273 } 1252 MRESULT WM_CONTEXTMENU (int mp1, int mp2) { 1253 System.out.println("Shell:WM_CONTEXTMENU - HANDLE = " + Integer.toHexString (handle)); 1254 return MRESULT.TRUE; 1255 } 1256 }
Note:
See TracChangeset
for help on using the changeset viewer.