Mercurial > projects > mde
diff mde/gui/content/Content.d @ 65:891211f034f2
Changes to widgets: widgets may now get strings as creation data. Strings for TextWidgets can be set in files (in a temporary mannor).
author | Diggory Hardy <diggory.hardy@gmail.com> |
---|---|
date | Sun, 29 Jun 2008 15:40:37 +0100 |
parents | 7cab2af4ba21 |
children | 159775502bb4 |
line wrap: on
line diff
--- a/mde/gui/content/Content.d Sun Jun 29 11:55:55 2008 +0100 +++ b/mde/gui/content/Content.d Sun Jun 29 15:40:37 2008 +0100 @@ -48,6 +48,16 @@ char[] toString (); } +/** Get a content from the list (what list?). */ +ContentText getContentText (char[] id) { + return new ContentText (id); // forget the list for now +} + +/** ditto */ +ContentInt getContentInt (char[] id) { + return new ContentInt (42); // forget the list for now +} + /** Text content. */ /* May end up extending a universal content type. * Services like copy/paste could work on universal content. @@ -58,10 +68,7 @@ * where ContentTextStruct is a struct. */ class ContentText : Content { - this () { - // NOTE: testing - text_ = "\"a@b\" − an example"; - } + this () {} this (char[] text) { text_ = text; } @@ -93,10 +100,7 @@ /** Integer content. */ class ContentInt : Content { - this () { - // NOTE: testing - int_ = -496; - } + this () {} this (int integer) { int_ = integer; }