Changeset 138 for trunk/src


Ignore:
Timestamp:
May 18, 2009, 11:25:41 PM (16 years ago)
Author:
lpino
Message:
  • More details for missing implementations
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  
    421421//);
    422422//@@TODO(dmik): do something for MDI windows if needed   
    423 //    if (parent == null) return;
    424 //    setParent ();
     423    if (parent == null) return;
     424    setParent ();
    425425//    setSystemMenu ();
    426426}
    427427
    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 //}
    434428
    435429void destroyAcceleratorTable () {
     
    10971091}
    10981092
    1099 //@@TODO(dmik)
    11001093void setParent () {
    11011094        Display display = getDisplay ();
     
    11371130    if (hMenu == 0) return;
    11381131    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);
    11581152//              MENUITEMINFO info = new MENUITEMINFO ();
    11591153//              info.cbSize = MENUITEMINFO.sizeof;
     
    11721166//                      }
    11731167//              }
    1174 //      }
     1168        }
    11751169}
    11761170
     
    14581452MRESULT FRAME_WM_CHAR (int mp1, int mp2) {
    14591453//@@TODO (dmik): debug, remove   
    1460 //boolean keyUp = (OS.SHORT1FROMMP (mp1) & OS.KC_KEYUP) != 0;
     1454boolean keyUp = (OS.SHORT1FROMMP (mp1) & OS.KC_KEYUP) != 0;
    14611455//System.out.println("FRAME_WM_CHAR ("+this+"): keyup="+keyUp);
    14621456    /*
  • trunk/src/plugins/org.eclipse.swt/Eclipse SWT/pm/org/eclipse/swt/widgets/Display.java

    r136 r138  
    16321632 * </ul>
    16331633 */
    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 //}
     1634public 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}
    16391639
    16401640/**
  • trunk/src/plugins/org.eclipse.swt/Eclipse SWT/pm/org/eclipse/swt/widgets/Shell.java

    r135 r138  
    105105//    int hIMC;
    106106//    int [] brushes;
    107 //    boolean showWithParent;
     107    boolean showWithParent;
    108108//    int toolTipHandle, lpstrTip;
    109109    Control lastActive;
     
    523523 * @see Shell#setActive
    524524 */
    525 //@@TODO(dmik): later
    526 //public void forceActive () {
    527 //      checkWidget ();
    528 //      OS.SetForegroundWindow (handle);
    529 //}
     525
     526public void forceActive () {
     527        checkWidget ();
     528        OS.WinSetFocus (OS.HWND_DESKTOP, frameHandle);
     529}
    530530
    531531int getBounds (SWP swp)
     
    10251025    super.setVisible (visible);
    10261026//@@TODO(dmik): add modality support
    1027 //    if (showWithParent == visible) return;
    1028 //    showWithParent = visible;
     1027    if (showWithParent == visible) return;
     1028    showWithParent = visible;
    10291029//    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;
    10311031//    if ((style & mask) != 0) {
    10321032//        if (visible) {
     
    10341034//            Control control = display.getFocusControl ();
    10351035//            if (control != null && !control.isActive ()) bringToTop ();
    1036 //            OS.ReleaseCapture ();
     1036//            OS.WinSetCapture (OS.HWND_DESKTOP, OS.NULLHANDLE);
    10371037//        } else {
    10381038//            display.clearModal (this);
Note: See TracChangeset for help on using the changeset viewer.