Mercurial > projects > dwt-win
diff dwt/custom/CTabFolder.d @ 315:349b8c12e243
Sync dwt/custom with dwt-linux
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Tue, 07 Oct 2008 16:18:26 +0200 |
parents | fd9c62a2998e |
children |
line wrap: on
line diff
--- a/dwt/custom/CTabFolder.d Tue Oct 07 14:44:44 2008 +0200 +++ b/dwt/custom/CTabFolder.d Tue Oct 07 16:18:26 2008 +0200 @@ -12,7 +12,6 @@ *******************************************************************************/ module dwt.custom.CTabFolder; - import dwt.DWT; import dwt.DWTException; import dwt.accessibility.ACC; @@ -542,7 +541,7 @@ void antialias (int[] shape, RGB lineRGB, RGB innerRGB, RGB outerRGB, GC gc){ // Don't perform anti-aliasing on Mac and WPF because the platform // already does it. The simple style also does not require anti-aliasing. - if (simple || "carbon"==DWT.getPlatform() || "wpf"==DWT.getPlatform()) return; //$NON-NLS-1$ + if (simple || "carbon".equals(DWT.getPlatform()) || "wpf".equals(DWT.getPlatform())) return; //$NON-NLS-1$ // Don't perform anti-aliasing on low resolution displays if (getDisplay().getDepth() < 15) return; if (outerRGB !is null) { @@ -555,8 +554,10 @@ left = onBottom ? oldY <= shape[index+3] : oldY >= shape[index+3]; oldY = shape[index+1]; } - outer[index] = shape[index++] + (left ? -1 : +1); - outer[index] = shape[index++]; + outer[index] = shape[index] + (left ? -1 : +1); + index++; + outer[index] = shape[index]; + index++; } RGB from = lineRGB; RGB to = outerRGB; @@ -578,8 +579,10 @@ left = onBottom ? oldY <= shape[index+3] : oldY >= shape[index+3]; oldY = shape[index+1]; } - inner[index] = shape[index++] + (left ? +1 : -1); - inner[index] = shape[index++]; + inner[index] = shape[index] + (left ? +1 : -1); + index++; + inner[index] = shape[index]; + index++; } RGB from = lineRGB; RGB to = innerRGB; @@ -1307,7 +1310,7 @@ do { while (index < length_ && string[index] !is '&') index++; if (++index >= length_) return '\0'; - if (string[index] !is '&') return CharacterToLower(firstCodePoint( string[index..$])); + if (string[index] !is '&') return CharacterFirstToLower(string[index..$]); index++; } while (index < length_); return '\0'; @@ -1319,7 +1322,7 @@ while ((index < length_) && (string[index] !is '&')) index++; if (++index >= length_) return string; if (string[index] !is '&') { - return string[0 .. index-1] ~ string[index .. length_]; + return string.substring(0, index-1) ~ string.substring(index, length_); } index++; } while (index < length_); @@ -1644,7 +1647,7 @@ return -1; } void initAccessible() { - final Accessible accessible = getAccessible(); + Accessible accessible = getAccessible(); accessible.addAccessibleListener(new class() AccessibleAdapter { public void getName(AccessibleEvent e) { String name = null; @@ -1828,7 +1831,9 @@ addListener(DWT.Selection, new class(accessible) Listener { Accessible acc; - this( Accessible acc ){ this.acc = acc; } + this( Accessible a ){ + this.acc = a; + } public void handleEvent(Event event) { if (isFocusControl()) { if (selectedIndex is -1) { @@ -1842,7 +1847,7 @@ addListener(DWT.FocusIn, new class(accessible) Listener { Accessible acc; - this( Accessible acc ){ this.acc = acc; } + this( Accessible a ){ this.acc = a; } public void handleEvent(Event event) { if (selectedIndex is -1) { acc.setFocus(ACC.CHILDID_SELF); @@ -1852,6 +1857,7 @@ } }); } + void onKeyDown (Event event) { switch (event.keyCode) { case DWT.ARROW_LEFT: