- Timestamp:
- Jul 14, 2009, 9:09:16 PM (16 years ago)
- 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
r165 r169 184 184 185 185 // RECT insetRect = new RECT (), itemRect = new RECT (); 186 // OS.WinSendMsg (handle, OS.BKM_CALCPAGERECT, rcl, false);187 186 // OS.SendMessage (handle, OS.TCM_ADJUSTRECT, 0, insetRect); 188 187 // int width = insetRect.left - insetRect.right, height = 0; … … 192 191 // width = Math.max (width, itemRect.right - insetRect.right); 193 192 // } 194 //Point size;193 Point size; 195 194 // if (layout != null) { 196 195 // size = layout.computeSize (this, wHint, hHint, changed); … … 208 207 // return new Point (width, height); 209 208 //} 210 // 209 211 210 //public Rectangle computeTrim (int x, int y, int width, int height) { 212 211 // checkWidget (); … … 234 233 } 235 234 // PSZ tabText = new PSZ("Hello"); 236 int pageID = OS.WinSendMsg (handle, OS.BKM_INSERTPAGE, 0, OS.MPFROM2SHORT((short)(OS.BKA_AUTOPAGESIZE | OS.BKA_MAJOR | OS.BKA_STATUSTEXTON),(short)OS.BKA_LAST));235 int pageID = OS.WinSendMsg (handle, OS.BKM_INSERTPAGE, 0, OS.MPFROM2SHORT((short)(OS.BKA_AUTOPAGESIZE | OS.BKA_MAJOR),(short)OS.BKA_LAST)); 237 236 //@@INFO(lpino): All tabs are gray to keep a consistent look with the rests of the platforms 238 237 OS.WinSendMsg (handle, OS.BKM_SETTABCOLOR, pageID , 0x00C0C0C0); … … 308 307 } 309 308 310 //public Rectangle getClientArea () {311 //checkWidget ();309 public Rectangle getClientArea () { 310 checkWidget (); 312 311 // if (parent.hdwp != 0) { 313 312 // int oldHdwp = parent.hdwp; … … 317 316 // parent.hdwp = OS.BeginDeferWindowPos (count); 318 317 // } 319 // RECT rect = new RECT (); 320 // OS.GetClientRect (handle, rect); 321 // OS.SendMessage (handle, OS.TCM_ADJUSTRECT, 0, rect); 322 // int width = rect.right - rect.left; 323 // int height = rect.bottom - rect.top; 324 // return new Rectangle (rect.left, rect.top, width, height); 325 //} 318 RECTL rect = new RECTL (); 319 320 SWP swp = new SWP (); 321 OS.WinQueryWindowPos (handle, swp); 322 323 rect.yBottom = rect.xLeft = 0; 324 rect.xRight = swp.cx; 325 rect.yTop = swp.cy; 326 327 OS.WinSendMsg(handle, OS.BKM_CALCPAGERECT, rect, true); 328 329 int width = rect.xRight - rect.xLeft; 330 int height = rect.yTop - rect.yBottom; 331 // System.out.println("XLEFT = " + rect.xLeft); 332 // System.out.println("YTOP = " + rect.yTop); 333 // System.out.println("XRIGHT = " + rect.xRight); 334 // System.out.println("YBOTTOM = " + rect.yBottom); 335 // System.out.println("width = " + width); 336 // System.out.println("height = " + height); 337 // 338 return new Rectangle (rect.xLeft, rect.yTop, width, height); 339 } 326 340 327 341 /** … … 692 706 (short)OS.BKA_MAJORTAB); 693 707 694 OS.WinSendMsg(handle, OS.BKM_SETDIMENSIONS, 695 OS.MPFROM2SHORT((short)0, (short)0), 696 (short)OS.BKA_MINORTAB); 708 OS.WinSendMsg(handle, OS.BKM_SETDIMENSIONS, OS.MPFROM2SHORT((short)0, (short)0),(short)OS.BKA_MINORTAB); 697 709 return true; 698 710 } … … 736 748 //} 737 749 // 738 //LRESULT WM_SIZE (int wParam, int lParam) {739 // LRESULT result = super.WM_SIZE (wParam, lParam);750 MRESULT WM_SIZE (int mp1, int mp2) { 751 MRESULT result = super.WM_SIZE (mp1, mp2); 740 752 // /* 741 753 // * It is possible (but unlikely), that application … … 754 766 // } 755 767 // } 756 //return result;757 //}758 // 768 return result; 769 } 770 759 771 //LRESULT WM_WINDOWPOSCHANGING (int wParam, int lParam) { 760 772 // LRESULT result = super.WM_WINDOWPOSCHANGING (wParam, lParam); … … 804 816 int code = mp1 >> 16; 805 817 switch (code) { 806 case OS.BKN_PAGESELECTED: 818 case OS.BKN_PAGESELECTED: 819 // break; 807 820 case OS.BKN_PAGESELECTEDPENDING: 808 821 TabItem item = null; … … 824 837 postEvent (SWT.Selection, event); 825 838 } 839 break; 826 840 case OS.BKN_NEWPAGESIZE: 841 // System.out.println("resize"); 842 break; 827 843 // if (isDisposed ()) return result; 828 844 // 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
r166 r169 206 206 this.control = control; 207 207 int index = parent.indexOf (this); 208 OS.WinSendMsg (parent.handle, OS.BKM_SETPAGEWINDOWHWND, this.parent.itemsID[index], control.handle); 208 209 if (index != parent.getSelectionIndex ()) { 209 210 if (newControl != null) newControl.setVisible (false);
Note:
See TracChangeset
for help on using the changeset viewer.