Changeset 170 for trunk/src


Ignore:
Timestamp:
Jul 30, 2009, 10:52:54 PM (16 years ago)
Author:
lpino
Message:
  • More Notebook display fixes
Location:
trunk/src/plugins/org.eclipse.swt/Eclipse SWT/pm/org/eclipse/swt/widgets
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/plugins/org.eclipse.swt/Eclipse SWT/pm/org/eclipse/swt/widgets/TabFolder.java

    r169 r170  
    232232                itemsID = newIDs;
    233233        }
    234 //        PSZ tabText = new PSZ("Hello");
    235          int pageID = OS.WinSendMsg (handle, OS.BKM_INSERTPAGE, 0, OS.MPFROM2SHORT((short)(OS.BKA_AUTOPAGESIZE | OS.BKA_MAJOR),(short)OS.BKA_LAST));
     234         int pageID = OS.WinSendMsg (handle, OS.BKM_INSERTPAGE, 0, OS.MPFROM2SHORT((short)(OS.BKA_MAJOR),(short)OS.BKA_LAST));
    236235         //@@INFO(lpino): All tabs are gray to keep a consistent look with the rests of the platforms
    237236         OS.WinSendMsg (handle, OS.BKM_SETTABCOLOR, pageID , 0x00C0C0C0);
    238 //         OS.WinSendMsg (handle, OS.BKM_SETTABTEXT, pageID, tabText);
     237         //@@INFO(lpino): The background of empty tabs are set to gray
     238         OS.WinSendMsg (handle, OS.BKM_SETNOTEBOOKCOLORS, OS.SYSCLR_FIELDBACKGROUND , OS.BKA_BACKGROUNDPAGECOLORINDEX);
    239239        if (pageID == OS.NULLHANDLE) {
    240240                error (SWT.ERROR_ITEM_NOT_ADDED);
     
    309309public Rectangle getClientArea () {
    310310        checkWidget ();
    311 //      if (parent.hdwp != 0) {
    312 //              int oldHdwp = parent.hdwp;
    313 //              parent.hdwp = 0;
    314 //              OS.EndDeferWindowPos (oldHdwp);
    315 //              int count = parent.getChildrenCount ();
    316 //              parent.hdwp = OS.BeginDeferWindowPos (count);
    317 //      }
     311        if (parent != null && parent.pswp != 0) {
     312            endDeferWindowPos (parent);
     313            int count = parent.getChildrenCount ();
     314            beginDeferWindowPos (parent, count);
     315        }
     316       
    318317        RECTL rect = new RECTL ();
    319318       
    320319        SWP swp = new SWP ();
    321320        OS.WinQueryWindowPos (handle, swp);
    322        
     321               
    323322        rect.yBottom = rect.xLeft = 0;
    324323        rect.xRight = swp.cx;
     
    329328        int width = rect.xRight - rect.xLeft;
    330329        int height = rect.yTop - rect.yBottom;
     330        int y = swp.cy-height;
     331       
    331332//        System.out.println("XLEFT = " + rect.xLeft);
    332333//        System.out.println("YTOP = " + rect.yTop);
     
    335336//        System.out.println("width = " + width);
    336337//        System.out.println("height = " + height);
    337 //
    338         return new Rectangle (rect.xLeft, rect.yTop, width, height);
     338//        System.out.println("Delta = " + swp.y);
     339
     340        return new Rectangle (0, y, width, height);
    339341}
    340342
     
    817819        switch (code) {
    818820                case OS.BKN_PAGESELECTED:                   
    819 //                    break;
    820821                case OS.BKN_PAGESELECTEDPENDING:
    821822                        TabItem item = null;
     
    837838                                postEvent (SWT.Selection, event);
    838839                        }
    839                         break;
    840             case OS.BKN_NEWPAGESIZE:
     840//                        break;
     841//            case OS.BKN_NEWPAGESIZE:
    841842//                System.out.println("resize");
    842                 break;
     843//                break;
    843844         //     if (isDisposed ()) return result;
    844845        //      int index = OS.SendMessage (handle, OS.TCM_GETCURSEL, 0, 0);
  • trunk/src/plugins/org.eclipse.swt/Eclipse SWT/pm/org/eclipse/swt/widgets/TabItem.java

    r169 r170  
    33/*
    44 * OS/2 version.
    5  * Copyright (c) 2002, 2004 EclipseOS2 Team.
     5 * Copyright (c) 2002, 2009 EclipseOS2 Team.
    66 */
    77
Note: See TracChangeset for help on using the changeset viewer.