- Timestamp:
- Jun 16, 2009, 4:18:08 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/plugins/org.eclipse.swt/Eclipse SWT/pm/org/eclipse/swt/widgets/Scale.java
r151 r153 107 107 OS.WinSetWindowUShort (handle, OS.QWS_ID, (short)(handle & 0xFFFF)); 108 108 OS.WinSendMsg(handle, OS.SLM_SETTICKSIZE, OS.MPFROM2SHORT((short)OS.SMA_SETALLTICKS, (short)6), 0); 109 // OS.WinSendMsg(handle, OS.SLM_SETSLIDERINFO, OS.MPFROM2SHORT((short)OS.SMA_SLIDERARMPOSITION, (short)OS.SMA_INCREMENTVALUE), 1); 109 110 110 super.register (); 111 111 super.subclass (); … … 263 263 int posPixels = OS.SHORT1FROMMP(pixelInfo); 264 264 int totalPixels = ((pixelInfo & 0xFFFF0000)>>16) & 0xFFFF; 265 int pos = ((MAX_RANGE*posPixels)/totalPixels) +1;265 int pos = ((MAX_RANGE*posPixels)/totalPixels); 266 266 return pos; 267 267 } … … 395 395 int pixels = OS.WinSendMsg(handle, OS.SLM_QUERYSLIDERINFO, OS.MPFROM2SHORT((short)OS.SMA_SLIDERARMPOSITION, (short)OS.SMA_RANGEVALUE ), 0); 396 396 int totalPixels = ((pixels & 0xFFFF0000)>>16) & 0xFFFF; 397 int pixelPos = ( value*totalPixels)/MAX_RANGE;397 int pixelPos = ((value*totalPixels)/MAX_RANGE); 398 398 OS.WinSendMsg(handle, OS.SLM_SETSLIDERINFO, OS.MPFROM2SHORT((short)OS.SMA_SLIDERARMPOSITION, (short)OS.SMA_RANGEVALUE), pixelPos); 399 399 } … … 412 412 return TrackBarProc; 413 413 } 414 // 415 //LRESULT wmScrollChild (int wParam, int lParam) { 414 415 MRESULT wmControlChild (int mp1, int mp2) { 416 int code = OS.SHORT2FROMMP(mp1); 417 int pos = mp2; 418 System.out.println("Pos = " + pos); 419 Event event = new Event (); 420 // switch (code) { 421 // /* 422 // * This line is intentionally commented. Do not set the detail 423 // * field to DRAG to indicate that the dragging has ended when the 424 // * scroll bar is finally positioned in TB_THUMBPOSITION. 425 // */ 426 //// case OS.TB_THUMBPOSITION: break; 427 // case OS.TB_THUMBTRACK: event.detail = SWT.DRAG; break; 428 // case OS.TB_TOP: event.detail = SWT.HOME; break; 429 // case OS.TB_BOTTOM: event.detail = SWT.END; break; 430 // case OS.TB_LINEDOWN: event.detail = SWT.ARROW_DOWN; break; 431 // case OS.TB_LINEUP: event.detail = SWT.ARROW_UP; break; 432 // case OS.TB_PAGEDOWN: event.detail = SWT.PAGE_DOWN; break; 433 // case OS.TB_PAGEUP: event.detail = SWT.PAGE_UP; break; 434 // } 435 return null; 436 } 437 438 //MRESULT wmScrollChild (int mp1, int mp2) { 416 439 // 417 440 // /* Do nothing when scrolling is ending */ 418 // int code = wParam & 0xFFFF;419 // if (code == OS.TB_ENDTRACK) return null;420 // 441 //// int code = wParam & 0xFFFF; 442 //// if (code == OS.TB_ENDTRACK) return null; 443 // System.out.println("test"); 421 444 // /* 422 445 // * This code is intentionally commented. The event … … 425 448 // */ 426 449 // Event event = new Event (); 427 //// switch (code) {428 //// /*429 //// * This line is intentionally commented. Do not set the detail430 //// * field to DRAG to indicate that the dragging has ended when the431 //// * scroll bar is finally positioned in TB_THUMBPOSITION.432 //// */433 ////// case OS.TB_THUMBPOSITION: break;434 //// case OS.TB_THUMBTRACK: event.detail = SWT.DRAG; break;435 //// case OS.TB_TOP: event.detail = SWT.HOME; break;436 //// case OS.TB_BOTTOM: event.detail = SWT.END; break;437 //// case OS.TB_LINEDOWN: event.detail = SWT.ARROW_DOWN; break;438 //// case OS.TB_LINEUP: event.detail = SWT.ARROW_UP; break;439 //// case OS.TB_PAGEDOWN: event.detail = SWT.PAGE_DOWN; break;440 //// case OS.TB_PAGEUP: event.detail = SWT.PAGE_UP; break;441 //// }442 450 // 443 451 // /*
Note:
See TracChangeset
for help on using the changeset viewer.