Mercurial > projects > mde
comparison mde/gui/WidgetManager.d @ 129:ad91de8867a0
Added a widget size printing debug function. Fixed a bug in SwitchWidget.
author | Diggory Hardy <diggory.hardy@gmail.com> |
---|---|
date | Thu, 15 Jan 2009 16:52:46 +0000 |
parents | 41582439a42b |
children | 9cff74f68b84 |
comparison
equal
deleted
inserted
replaced
128:41582439a42b | 129:ad91de8867a0 |
---|---|
27 | 27 |
28 import imde = mde.imde; | 28 import imde = mde.imde; |
29 import mde.lookup.Options; // miscOpts.L10n callback | 29 import mde.lookup.Options; // miscOpts.L10n callback |
30 import mde.content.Content; | 30 import mde.content.Content; |
31 import Items = mde.content.Items; // loadTranslation | 31 import Items = mde.content.Items; // loadTranslation |
32 debug import mde.content.miscContent; // Debug menu | |
32 | 33 |
33 import mde.file.mergetag.Reader; | 34 import mde.file.mergetag.Reader; |
34 import mde.file.mergetag.Writer; | 35 import mde.file.mergetag.Writer; |
35 import mde.setup.paths; | 36 import mde.setup.paths; |
36 | 37 |
69 fileName = file; | 70 fileName = file; |
70 miscOpts.L10n.addCallback (&reloadStrings); | 71 miscOpts.L10n.addCallback (&reloadStrings); |
71 | 72 |
72 clickCallbacks = new typeof(clickCallbacks); | 73 clickCallbacks = new typeof(clickCallbacks); |
73 motionCallbacks = new typeof(motionCallbacks); | 74 motionCallbacks = new typeof(motionCallbacks); |
75 | |
76 debug { | |
77 auto lWS = new EventContent ("logWidgetSize"); | |
78 lWS.addCallback (&logWidgetSize); | |
79 imde.menu.append (lWS); | |
80 } | |
74 } | 81 } |
75 | 82 |
76 /* Load the widgets' data from the file specified to the CTOR. | 83 /* Load the widgets' data from the file specified to the CTOR. |
77 * | 84 * |
78 * params: | 85 * params: |
372 clickCallbacks.removeKey(frame); | 379 clickCallbacks.removeKey(frame); |
373 motionCallbacks.removeKey(frame); | 380 motionCallbacks.removeKey(frame); |
374 } | 381 } |
375 //END IWidgetManager methods | 382 //END IWidgetManager methods |
376 | 383 |
384 debug void logWidgetSize (Content) { | |
385 logger.trace ("Current size: {,4},{,4}; minimal: {,4},{,4} - WidgetManager", w,h, mw,mh); | |
386 child.logWidgetSize; | |
387 } | |
388 | |
377 protected: | 389 protected: |
378 /** Second stage of loading the widgets. | 390 /** Second stage of loading the widgets. |
379 * | 391 * |
380 * loadDesign handles the data; this method needs to: | 392 * loadDesign handles the data; this method needs to: |
381 * --- | 393 * --- |