comparison dwt/widgets/Decorations.d @ 58:a5c274fa5af9

extended helloworld crashing
author Frank Benoit <benoit@tionex.de>
date Sat, 12 Jan 2008 07:02:08 +0100
parents 6e625fa1612d
children 8cec8f536af3
comparison
equal deleted inserted replaced
57:d69eb5077fbb 58:a5c274fa5af9
168 style |= SWT.TITLE; 168 style |= SWT.TITLE;
169 } 169 }
170 return style; 170 return style;
171 } 171 }
172 172
173 protected void checkSubclass () { 173 override protected void checkSubclass () {
174 if (!isValidSubclass ()) error (SWT.ERROR_INVALID_SUBCLASS); 174 if (!isValidSubclass ()) error (SWT.ERROR_INVALID_SUBCLASS);
175 } 175 }
176 176
177 void _setImages (Image [] images) { 177 void _setImages (Image [] images) {
178 if (images !is null && images.length > 1) { 178 if (images !is null && images.length > 1) {
227 return 0; 227 return 0;
228 } 228 }
229 return data1.width > data2.width || data1.height > data2.height ? -1 : 1; 229 return data1.width > data2.width || data1.height > data2.height ? -1 : 1;
230 } 230 }
231 231
232 Control computeTabGroup () { 232 override Control computeTabGroup () {
233 return this; 233 return this;
234 } 234 }
235 235
236 Control computeTabRoot () { 236 override Control computeTabRoot () {
237 return this; 237 return this;
238 } 238 }
239 239
240 void createAccelGroup () { 240 void createAccelGroup () {
241 if (accelGroup !is null) return; 241 if (accelGroup !is null) return;
244 //FIXME - what should we do for Decorations 244 //FIXME - what should we do for Decorations
245 auto shellHandle = topHandle (); 245 auto shellHandle = topHandle ();
246 OS.gtk_window_add_accel_group (cast(GtkWindow*)shellHandle, accelGroup); 246 OS.gtk_window_add_accel_group (cast(GtkWindow*)shellHandle, accelGroup);
247 } 247 }
248 248
249 void createWidget (int index) { 249 override void createWidget (int index) {
250 super.createWidget (index); 250 super.createWidget (index);
251 text = ""; 251 text = "";
252 } 252 }
253 253
254 void destroyAccelGroup () { 254 void destroyAccelGroup () {
418 public bool getMinimized () { 418 public bool getMinimized () {
419 checkWidget(); 419 checkWidget();
420 return minimized; 420 return minimized;
421 } 421 }
422 422
423 char[] getNameText () { 423 override char[] getNameText () {
424 return getText (); 424 return getText ();
425 } 425 }
426 426
427 /** 427 /**
428 * Returns the receiver's text, which is the string that the 428 * Returns the receiver's text, which is the string that the
440 public char[] getText () { 440 public char[] getText () {
441 checkWidget(); 441 checkWidget();
442 return text; 442 return text;
443 } 443 }
444 444
445 public bool isReparentable () { 445 override public bool isReparentable () {
446 checkWidget (); 446 checkWidget ();
447 return false; 447 return false;
448 } 448 }
449 449
450 bool isTabGroup () { 450 override bool isTabGroup () {
451 return true; 451 return true;
452 } 452 }
453 453
454 bool isTabItem () { 454 override bool isTabItem () {
455 return false; 455 return false;
456 } 456 }
457 457
458 Decorations menuShell () { 458 override Decorations menuShell () {
459 return this; 459 return this;
460 } 460 }
461 461
462 void removeMenu (Menu menu) { 462 void removeMenu (Menu menu) {
463 if (menus is null) return; 463 if (menus is null) return;
467 return; 467 return;
468 } 468 }
469 } 469 }
470 } 470 }
471 471
472 void releaseChildren (bool destroy) { 472 override void releaseChildren (bool destroy) {
473 if (menuBar !is null) { 473 if (menuBar !is null) {
474 menuBar.release (false); 474 menuBar.release (false);
475 menuBar = null; 475 menuBar = null;
476 } 476 }
477 super.releaseChildren (destroy); 477 super.releaseChildren (destroy);
484 } 484 }
485 menus = null; 485 menus = null;
486 } 486 }
487 } 487 }
488 488
489 void releaseHandle () { 489 override void releaseHandle () {
490 super.releaseHandle (); 490 super.releaseHandle ();
491 vboxHandle = null; 491 vboxHandle = null;
492 } 492 }
493 493
494 void releaseWidget () { 494 override void releaseWidget () {
495 super.releaseWidget (); 495 super.releaseWidget ();
496 image = null; 496 image = null;
497 images = null; 497 images = null;
498 savedFocus = null; 498 savedFocus = null;
499 defaultButton = saveDefault = null; 499 defaultButton = saveDefault = null;
739 } 739 }
740 } 740 }
741 } 741 }
742 } 742 }
743 743
744 bool traverseItem (bool next) { 744 override bool traverseItem (bool next) {
745 return false; 745 return false;
746 } 746 }
747 747
748 bool traverseReturn () { 748 override bool traverseReturn () {
749 Button button = defaultButton !is null ? defaultButton: saveDefault; 749 Button button = defaultButton !is null ? defaultButton: saveDefault;
750 if (button is null || button.isDisposed ()) return false; 750 if (button is null || button.isDisposed ()) return false;
751 /* 751 /*
752 * Bug in GTK. When a default button that is disabled is 752 * Bug in GTK. When a default button that is disabled is
753 * activated using the Enter key, GTK GP's. The fix is to 753 * activated using the Enter key, GTK GP's. The fix is to