- Timestamp:
- Jun 9, 2009, 9:05:52 PM (16 years ago)
- Location:
- trunk/src/plugins/org.eclipse.swt
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/plugins/org.eclipse.swt/Eclipse SWT PI/pm/library/swt.c
r146 r149 357 357 } 358 358 359 JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_pm_OS_WinCreateWindow 359 JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_pm_OS_WinCreateWindow__ILorg_eclipse_swt_internal_pm_PSZ_2Lorg_eclipse_swt_internal_pm_PSZ_2IIIIIIIIII 360 360 (JNIEnv *env, jclass that, jint hwndParent, jobject pszClass, 361 361 jobject pszName, jint flStyle, jint x, jint y, jint cx, jint cy, jint hwndOwner, … … 396 396 if (pCtlData) 397 397 c_ppCtrlData = getSLDCDATAFields(env, pCtlData, &c_pCtrlData, &PGLOB(SLDCDATAFc)); 398 399 398 400 399 hwnd = (jint)WinCreateWindow((HWND)hwndParent, c_pszClass, c_pszName, flStyle, -
trunk/src/plugins/org.eclipse.swt/Eclipse SWT/pm/org/eclipse/swt/widgets/Scale.java
r147 r149 80 80 this.style = style; 81 81 SLDCDATA sldcData = new SLDCDATA(); 82 sldcData.usScale1Increments = 10; 83 //sldcData.usScale2Increments = 10; 84 sldcData.usScale1Spacing = 0; 85 //sldcData.usScale2Spacing = 0; 82 86 handle = OS.WinCreateWindow ( 83 87 parent.handle, … … 90 94 OS.HWND_BOTTOM, //OS.HWND_TOP, 91 95 0, 92 0,96 sldcData, 93 97 0 94 98 ); 95 // System.out.println("Class = " + windowClass ());96 //@@TODO (lpino): Remove97 // System.out.println("ERROR = " + OS.WinGetLastError(parent.getDisplay ().hab));98 99 if (handle == 0) error (SWT.ERROR_NO_HANDLES); 99 100 OS.WinSetWindowUShort (handle, OS.QWS_ID, (short)(handle & 0xFFFF)); 100 101 101 //@@TODO (dmik): debug code, remove when no more necessary 102 System.out.println ( 103 "Scale(parent, style): Scale has been created:\n" + 104 " hwnd = " + Integer.toHexString (handle) + "\n" + 105 " hwnd.parent = hwnd.owner = " + Integer.toHexString (parent.handle) + "\n" + 106 " class = " + windowClass() + "\n" + 107 " style = " + Integer.toHexString (widgetStyle()) 108 ); 102 OS.WinSendMsg(handle, OS.SLM_SETTICKSIZE, OS.MPFROM2SHORT((short)OS.SMA_SETALLTICKS, (short)2), 0); 109 103 super.register (); 110 104 super.subclass (); … … 172 166 173 167 void createHandle () { 168 System.out.println ("Scale:createHandle"); 174 169 super.createHandle (); 170 OS.WinSendMsg(handle, OS.SLM_SETTICKSIZE, OS.MPFROM2SHORT((short)OS.SMA_SETALLTICKS, (short)10), 0); 175 171 // OS.SendMessage (handle, OS.TBM_SETRANGEMAX, 0, 100); 176 172 // OS.SendMessage (handle, OS.TBM_SETPAGESIZE, 0, 10); … … 194 190 // * </ul> 195 191 // */ 196 //public int getIncrement () { 197 // checkWidget (); 192 public int getIncrement () { 193 checkWidget (); 194 return OS.WinSendMsg(handle, OS.SLM_QUERYSLIDERINFO, OS.MPFROM2SHORT((short)OS.SMA_SLIDERARMPOSITION, (short)OS.SMA_INCREMENTVALUE), 0); 198 195 // return OS.SendMessage (handle, OS.TBM_GETLINESIZE, 0, 0); 199 //}200 // 196 } 197 201 198 ///** 202 199 // * Returns the maximum value which the receiver will allow. … … 278 275 // * @see #addSelectionListener 279 276 // */ 280 //public void removeSelectionListener(SelectionListener listener) {281 //checkWidget ();282 //if (listener == null) error (SWT.ERROR_NULL_ARGUMENT);283 //if (eventTable == null) return;284 //eventTable.unhook (SWT.Selection, listener);285 //eventTable.unhook (SWT.DefaultSelection,listener);286 //}287 // 277 public void removeSelectionListener(SelectionListener listener) { 278 checkWidget (); 279 if (listener == null) error (SWT.ERROR_NULL_ARGUMENT); 280 if (eventTable == null) return; 281 eventTable.unhook (SWT.Selection, listener); 282 eventTable.unhook (SWT.DefaultSelection,listener); 283 } 284 288 285 ///** 289 286 // * Sets the amount that the receiver's value will be … … 390 387 // 391 388 int widgetStyle () { 392 int bits = super.widgetStyle () | OS.SLS_CENTER | OS.SLS_HOMELEFT | OS.SLS_PRIMARYSCALE1 | OS.SLS_PRIMARYSCALE2;393 if ((style & SWT.VERTICAL) != 0) return bits | OS.SLS_VERTICAL ;389 int bits = super.widgetStyle () | OS.SLS_CENTER | OS.SLS_HOMELEFT | OS.SLS_PRIMARYSCALE1; 390 if ((style & SWT.VERTICAL) != 0) return bits | OS.SLS_VERTICAL | OS.SLS_HOMETOP; 394 391 return bits; 395 392 }
Note:
See TracChangeset
for help on using the changeset viewer.