Changeset 15
- Timestamp:
- 01/18/08 16:49:04 (8 months ago)
- Files:
-
- trunk/win32/dfl/control.d (modified) (1 diff)
- trunk/win32/dfl/internal/dlib.d (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/win32/dfl/control.d
r13 r15 4543 4543 onMouseDown(mea); 4544 4544 4545 if(ctrlStyle & ControlStyles.SELECTABLE)4546 SetFocus(hwnd);4545 //if(ctrlStyle & ControlStyles.SELECTABLE) 4546 // SetFocus(hwnd); // No, this goofs up stuff, including the ComboBox dropdown. 4547 4547 } 4548 4548 break; trunk/win32/dfl/internal/dlib.d
r7 r15 26 26 { 27 27 version(DFL_TANGO0951beta1) 28 { 28 29 version = DFL_TANGObefore099rc3; 30 version = DFL_TANGObefore0994; 31 } 29 32 else version(DFL_TANGO097rc1) 33 { 30 34 version = DFL_TANGObefore099rc3; 35 version = DFL_TANGObefore0994; 36 } 31 37 else version(DFL_TANGO098rc2) 38 { 32 39 version = DFL_TANGObefore099rc3; 40 version = DFL_TANGObefore0994; 41 } 42 else version(DFL_TANGObefore099rc3) 43 { 44 version = DFL_TANGObefore0994; 45 } 46 else version(DFL_TANGO0992) 47 { 48 version = DFL_TANGObefore0994; 49 } 50 else version(DFL_TANGO_0994) 51 { 52 } 33 53 34 54 … … 76 96 char[] getObjectString(Object o) 77 97 { 78 return o.toUtf8(); 98 version(DFL_TANGObefore0994) 99 { 100 return o.toUtf8(); 101 } 102 else 103 { 104 return o.toString(); 105 } 79 106 } 80 107 … … 121 148 alias tango.stdc.stringz.fromUtf8z stringFromStringz; 122 149 123 alias tango.stdc.stringz.toUtf8z stringToStringz; 150 version(DFL_TANGObefore0994) 151 { 152 alias tango.stdc.stringz.toUtf8z stringToStringz; 153 } 154 else 155 { 156 alias tango.stdc.stringz.toStringz stringToStringz; 157 } 124 158 125 159 … … 143 177 scope mypath = new FilePath(p2); 144 178 mypath.join(p1); 145 return mypath.toUtf8();179 return getObjectString(mypath); 146 180 } 147 181 … … 165 199 dchar[1] result; 166 200 uint x; 167 tango.text.convert.Utf.toUtf32(input[idx .. input.length], result, &x); 201 version(DFL_TANGObefore0994) 202 { 203 tango.text.convert.Utf.toUtf32(input[idx .. input.length], result, &x); 204 } 205 else 206 { 207 tango.text.convert.Utf.toString32(input[idx .. input.length], result, &x); 208 } 168 209 idx += x; 169 210 return result[0]; 170 211 } 171 212 172 alias tango.text.convert.Utf.toUtf8 utf16stringtoUtf8string; 173 174 alias tango.text.convert.Utf.toUtf16 utf8stringtoUtf16string; 213 version(DFL_TANGObefore0994) 214 { 215 alias tango.text.convert.Utf.toUtf8 utf16stringtoUtf8string; 216 } 217 else 218 { 219 alias tango.text.convert.Utf.toString utf16stringtoUtf8string; 220 } 221 222 version(DFL_TANGObefore0994) 223 { 224 alias tango.text.convert.Utf.toUtf16 utf8stringtoUtf16string; 225 } 226 else 227 { 228 alias tango.text.convert.Utf.toString16 utf8stringtoUtf16string; 229 } 175 230 176 231 wchar* utf8stringToUtf16stringz(char[] s) 177 232 { 178 233 wchar[] ws; 179 ws = tango.text.convert.Utf.toUtf16(s); 234 version(DFL_TANGObefore0994) 235 { 236 ws = tango.text.convert.Utf.toUtf16(s); 237 } 238 else 239 { 240 ws = tango.text.convert.Utf.toString16(s); 241 } 180 242 ws ~= '\0'; 181 243 return ws.ptr; 182 244 } 183 245 184 alias tango.text.convert.Utf.toUtf8 utf32stringtoUtf8string; 185 186 alias tango.text.convert.Utf.toUtf32 utf8stringtoUtf32string; 246 version(DFL_TANGObefore0994) 247 { 248 alias tango.text.convert.Utf.toUtf8 utf32stringtoUtf8string; 249 } 250 else 251 { 252 alias tango.text.convert.Utf.toString utf32stringtoUtf8string; 253 } 254 255 version(DFL_TANGObefore0994) 256 { 257 alias tango.text.convert.Utf.toUtf32 utf8stringtoUtf32string; 258 } 259 else 260 { 261 alias tango.text.convert.Utf.toString32 utf8stringtoUtf32string; 262 } 187 263 188 264 … … 222 298 alias tango.text.convert.Integer.toInt!(char) stringToInt; 223 299 224 alias tango.text.convert.Integer.toUtf8 stringToInt; 300 version(DFL_TANGObefore0994) 301 { 302 alias tango.text.convert.Integer.toUtf8 stringToInt; 303 } 304 else 305 { 306 alias tango.text.convert.Integer.toString stringToInt; 307 } 225 308 226 309 char[] uintToHexString(uint num) … … 263 346 class DObject 264 347 { 265 //alias toUtf8 toString; // Doesn't let you override. 266 char[] toString() { return super.toUtf8(); } 267 override char[] toUtf8() { return toString(); } 348 version(DFL_TANGObefore0994) 349 { 350 //alias toUtf8 toString; // Doesn't let you override. 351 char[] toString() { return super.toUtf8(); } 352 override char[] toUtf8() { return toString(); } 353 } 354 else 355 { 356 // No need to override. 357 } 268 358 } 269 359 }
