Mercurial > projects > dwt2
comparison org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/widgets/Spinner.d @ 9:950d84783eac
Removing direct tango deps.
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Mon, 09 Mar 2009 14:26:40 +0100 |
parents | 4c0057e71936 |
children | 2e09b0e6857a |
comparison
equal
deleted
inserted
replaced
8:2847134a5fc0 | 9:950d84783eac |
---|---|
25 import org.eclipse.swt.widgets.Composite; | 25 import org.eclipse.swt.widgets.Composite; |
26 import org.eclipse.swt.widgets.TypedListener; | 26 import org.eclipse.swt.widgets.TypedListener; |
27 import org.eclipse.swt.widgets.Event; | 27 import org.eclipse.swt.widgets.Event; |
28 import org.eclipse.swt.widgets.Shell; | 28 import org.eclipse.swt.widgets.Shell; |
29 | 29 |
30 | |
31 import java.lang.all; | 30 import java.lang.all; |
32 import tango.text.convert.Integer : toString; | |
33 import tango.util.Convert; | |
34 | 31 |
35 /** | 32 /** |
36 * Instances of this class are selectable user interface | 33 * Instances of this class are selectable user interface |
37 * objects that allow the user to enter and modify numeric | 34 * objects that allow the user to enter and modify numeric |
38 * values. | 35 * values. |
329 OS.GetTextMetrics (hDC, &tm); | 326 OS.GetTextMetrics (hDC, &tm); |
330 height = tm.tmHeight; | 327 height = tm.tmHeight; |
331 RECT rect; | 328 RECT rect; |
332 int max; | 329 int max; |
333 OS.SendMessage (hwndUpDown , OS.UDM_GETRANGE32, null, &max); | 330 OS.SendMessage (hwndUpDown , OS.UDM_GETRANGE32, null, &max); |
334 String string = .toString( max ); | 331 String string = String_valueOf( max ); |
335 if (digits > 0) { | 332 if (digits > 0) { |
336 StringBuffer buffer = new StringBuffer (); | 333 StringBuffer buffer = new StringBuffer (); |
337 buffer.append (string); | 334 buffer.append (string); |
338 buffer.append (getDecimalSeparator ()); | 335 buffer.append (getDecimalSeparator ()); |
339 int count = digits - string.length; | 336 int count = digits - string.length; |
1028 OS.SendMessage (hwndUpDown , OS.IsWinCE ? OS.UDM_SETPOS : OS.UDM_SETPOS32, 0, value); | 1025 OS.SendMessage (hwndUpDown , OS.IsWinCE ? OS.UDM_SETPOS : OS.UDM_SETPOS32, 0, value); |
1029 } | 1026 } |
1030 if (setText) { | 1027 if (setText) { |
1031 String string; | 1028 String string; |
1032 if (digits is 0) { | 1029 if (digits is 0) { |
1033 string = .toString (value); | 1030 string = String_valueOf (value); |
1034 } else { | 1031 } else { |
1035 string = to!(String)(Math.abs (value)); | 1032 string = String_valueOf(Math.abs (value)); |
1036 String decimalSeparator = getDecimalSeparator (); | 1033 String decimalSeparator = getDecimalSeparator (); |
1037 int index = string.length - digits; | 1034 int index = string.length - digits; |
1038 StringBuffer buffer = new StringBuffer (); | 1035 StringBuffer buffer = new StringBuffer (); |
1039 if (value < 0) buffer.append ("-"); | 1036 if (value < 0) buffer.append ("-"); |
1040 if (index > 0) { | 1037 if (index > 0) { |