- Timestamp:
- May 18, 2009, 11:25:41 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/Decorations.java
r109 r138 421 421 //); 422 422 //@@TODO(dmik): do something for MDI windows if needed 423 //if (parent == null) return;424 //setParent ();423 if (parent == null) return; 424 setParent (); 425 425 // setSystemMenu (); 426 426 } 427 427 428 //@@TODO(dmik): remove/later?429 //void createWidget () {430 // super.createWidget ();431 // swFlags = OS.IsWinCE ? OS.SW_SHOWMAXIMIZED : OS.SW_SHOWNOACTIVATE;432 // hAccel = -1;433 //}434 428 435 429 void destroyAcceleratorTable () { … … 1097 1091 } 1098 1092 1099 //@@TODO(dmik)1100 1093 void setParent () { 1101 1094 Display display = getDisplay (); … … 1137 1130 if (hMenu == 0) return; 1138 1131 int oldCount = OS.WinSendMsg(hMenu, OS.MM_QUERYITEMCOUNT, 0, 0); 1139 // if (OS.IsWinCE) return; 1140 // int hMenu = OS.GetSystemMenu (handle, false); 1141 // if (hMenu == 0) return; 1142 // int oldCount = OS.GetMenuItemCount (hMenu); 1143 // if ((style & SWT.RESIZE) == 0) { 1144 // OS.DeleteMenu (hMenu, OS.SC_SIZE, OS.MF_BYCOMMAND); 1145 // } 1146 // if ((style & SWT.MIN) == 0) { 1147 // OS.DeleteMenu (hMenu, OS.SC_MINIMIZE, OS.MF_BYCOMMAND); 1148 // } 1149 // if ((style & SWT.MAX) == 0) { 1150 // OS.DeleteMenu (hMenu, OS.SC_MAXIMIZE, OS.MF_BYCOMMAND); 1151 // } 1152 // if ((style & (SWT.MIN | SWT.MAX)) == 0) { 1153 // OS.DeleteMenu (hMenu, OS.SC_RESTORE, OS.MF_BYCOMMAND); 1154 // } 1155 // int newCount = OS.GetMenuItemCount (hMenu); 1156 // if ((style & SWT.CLOSE) == 0 || newCount != oldCount) { 1157 // OS.DeleteMenu (hMenu, OS.SC_TASKLIST, OS.MF_BYCOMMAND); 1132 int itemID = OS.WinSendMsg(hMenu, OS.MM_ITEMIDFROMPOSITION, 0, 0); 1133 MENUITEM info = new MENUITEM(); 1134 OS.WinSendMsg (hMenu, OS.MM_QUERYITEM, OS.MPFROM2SHORT ((short)itemID, (short)OS.TRUE), info); 1135 int hSubMenu = info.hwndSubMenu; 1136 if ((style & SWT.RESIZE) == 0) { 1137 OS.WinSendMsg(hSubMenu, OS.MM_REMOVEITEM, OS.MPFROM2SHORT((short)OS.SC_SIZE, (short)OS.FALSE), 0); 1138 } 1139 if ((style & SWT.MIN) == 0) { 1140 OS.WinSendMsg(hSubMenu, OS.MM_REMOVEITEM, OS.MPFROM2SHORT((short)OS.SC_MINIMIZE , (short)OS.FALSE), 0); 1141 } 1142 if ((style & SWT.MAX) == 0) { 1143 OS.WinSendMsg(hSubMenu, OS.MM_REMOVEITEM, OS.MPFROM2SHORT((short)OS.SC_MAXIMIZE , (short)OS.FALSE), 0); 1144 } 1145 if ((style & (SWT.MIN | SWT.MAX)) == 0) { 1146 OS.WinSendMsg(hSubMenu, OS.MM_REMOVEITEM, OS.MPFROM2SHORT((short)OS.SC_RESTORE , (short)OS.FALSE), 0); 1147 } 1148 1149 int newCount = OS.WinSendMsg (hSubMenu, OS.MM_QUERYITEMCOUNT, 0, 0); 1150 if ((style & SWT.CLOSE) == 0 || newCount != oldCount) { 1151 OS.WinSendMsg(hSubMenu, OS.MM_REMOVEITEM, OS.MPFROM2SHORT((short)OS.SC_TASKMANAGER , (short)OS.FALSE), 0); 1158 1152 // MENUITEMINFO info = new MENUITEMINFO (); 1159 1153 // info.cbSize = MENUITEMINFO.sizeof; … … 1172 1166 // } 1173 1167 // } 1174 //}1168 } 1175 1169 } 1176 1170 … … 1458 1452 MRESULT FRAME_WM_CHAR (int mp1, int mp2) { 1459 1453 //@@TODO (dmik): debug, remove 1460 //boolean keyUp = (OS.SHORT1FROMMP (mp1) & OS.KC_KEYUP) != 0;1454 boolean keyUp = (OS.SHORT1FROMMP (mp1) & OS.KC_KEYUP) != 0; 1461 1455 //System.out.println("FRAME_WM_CHAR ("+this+"): keyup="+keyUp); 1462 1456 /* -
trunk/src/plugins/org.eclipse.swt/Eclipse SWT/pm/org/eclipse/swt/widgets/Display.java
r136 r138 1632 1632 * </ul> 1633 1633 */ 1634 //public void setCursorLocation (Point point) {1635 //checkDevice ();1636 //if (point == null) error (SWT.ERROR_NULL_ARGUMENT);1637 // OS.SetCursorPos (point.x, point.y); WinSetPointerPos 1638 //}1634 public void setCursorLocation (Point point) { 1635 checkDevice (); 1636 if (point == null) error (SWT.ERROR_NULL_ARGUMENT); 1637 OS.WinSetPointerPos(OS.HWND_DESKTOP, point.x, point.y); 1638 } 1639 1639 1640 1640 /** -
trunk/src/plugins/org.eclipse.swt/Eclipse SWT/pm/org/eclipse/swt/widgets/Shell.java
r135 r138 105 105 // int hIMC; 106 106 // int [] brushes; 107 //boolean showWithParent;107 boolean showWithParent; 108 108 // int toolTipHandle, lpstrTip; 109 109 Control lastActive; … … 523 523 * @see Shell#setActive 524 524 */ 525 //@@TODO(dmik): later 526 //public void forceActive () {527 //checkWidget ();528 // OS.SetForegroundWindow (handle);529 //}525 526 public void forceActive () { 527 checkWidget (); 528 OS.WinSetFocus (OS.HWND_DESKTOP, frameHandle); 529 } 530 530 531 531 int getBounds (SWP swp) … … 1025 1025 super.setVisible (visible); 1026 1026 //@@TODO(dmik): add modality support 1027 //if (showWithParent == visible) return;1028 //showWithParent = visible;1027 if (showWithParent == visible) return; 1028 showWithParent = visible; 1029 1029 // if (!OS.IsWinCE) OS.ShowOwnedPopups (handle, visible); 1030 //int mask = SWT.PRIMARY_MODAL | SWT.APPLICATION_MODAL | SWT.SYSTEM_MODAL;1030 int mask = SWT.PRIMARY_MODAL | SWT.APPLICATION_MODAL | SWT.SYSTEM_MODAL; 1031 1031 // if ((style & mask) != 0) { 1032 1032 // if (visible) { … … 1034 1034 // Control control = display.getFocusControl (); 1035 1035 // if (control != null && !control.isActive ()) bringToTop (); 1036 // OS. ReleaseCapture ();1036 // OS.WinSetCapture (OS.HWND_DESKTOP, OS.NULLHANDLE); 1037 1037 // } else { 1038 1038 // display.clearModal (this);
Note:
See TracChangeset
for help on using the changeset viewer.