comparison mde/gui/widget/TextWidget.d @ 131:9cff74f68b84

Major revisions to popup handling. Buttons can close menus now, plus some smaller impovements. Removed Widget module. Moved Widget.AWidget to AChildWidget.AChildWidget and Widget.AParentWidget to AParentWidget.AParentWidget. Removed ASingleParentWidget to improve code sharing. AChildWidget doesn't implement IParentWidget like AWidget did. New IPopupParentWidget extending IParentWidget for the WM and some widgets to handle popups. Cut old popup management code. New underMouse() function replacing highlight(); called on all widgets. Separate menu-popup and button widgets aren't needed for menus now. Functions returning content widgets have been moved to their own module. Cleaned up jobs.txt. Switched to 80 line length for Ddoc.
author Diggory Hardy <diggory.hardy@gmail.com>
date Wed, 21 Jan 2009 13:01:40 +0000
parents c5c38eaadb64
children 3468e9bfded1
comparison
equal deleted inserted replaced
130:c5c38eaadb64 131:9cff74f68b84
14 along with this program. If not, see <http://www.gnu.org/licenses/>. */ 14 along with this program. If not, see <http://www.gnu.org/licenses/>. */
15 15
16 /** Simple text widgets. */ 16 /** Simple text widgets. */
17 module mde.gui.widget.TextWidget; 17 module mde.gui.widget.TextWidget;
18 18
19 import mde.gui.widget.Widget; 19 import mde.gui.widget.AChildWidget;
20 import mde.gui.exception; 20 import mde.gui.exception;
21 import mde.gui.renderer.IRenderer; 21 import mde.gui.renderer.IRenderer;
22 import mde.content.AStringContent; 22 import mde.content.AStringContent;
23 23
24 import tango.util.log.Log : Log, Logger; 24 import tango.util.log.Log : Log, Logger;
26 static this () { 26 static this () {
27 logger = Log.getLogger ("mde.gui.widget.TextWidget"); 27 logger = Log.getLogger ("mde.gui.widget.TextWidget");
28 } 28 }
29 29
30 /** Base text widget. */ 30 /** Base text widget. */
31 class ATextWidget : AWidget 31 class ATextWidget : AChildWidget
32 { 32 {
33 /** Set the adapter first: 33 /** Set the adapter first:
34 * adapter = mgr.renderer.getAdapter (...); */ 34 * adapter = mgr.renderer.getAdapter (...); */
35 protected this (IWidgetManager mgr, IParentWidget parent, widgetID id) { 35 protected this (IWidgetManager mgr, IParentWidget parent, widgetID id) {
36 super (mgr, parent, id); 36 super (mgr, parent, id);