Mercurial > projects > mde
diff mde/gui/content/ContentText.d @ 59:672b6b162a36
Added very basic (and currently useless) content support.
author | Diggory Hardy <diggory.hardy@gmail.com> |
---|---|
date | Sat, 14 Jun 2008 17:52:22 +0100 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mde/gui/content/ContentText.d Sat Jun 14 17:52:22 2008 +0100 @@ -0,0 +1,39 @@ +/* LICENSE BLOCK +Part of mde: a Modular D game-oriented Engine +Copyright © 2007-2008 Diggory Hardy + +This program is free software: you can redistribute it and/or modify it under the terms +of the GNU General Public License as published by the Free Software Foundation, either +version 2 of the License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; +without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +See the GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see <http://www.gnu.org/licenses/>. */ + +/** The content system − text. + */ +module mde.gui.content.ContentText; + +/** Text content. */ +/* May end up extending a universal content type. + * Services like copy/paste could work on universal content. + * + * NOTE: Needs to be a reference type really. + * Could alternately be: + * alias ContentTextStruct* ContentText + * where ContentTextStruct is a struct. */ +class ContentText /+ : Content +/ +{ + + /// Get the text. + char[] text () { + return text_; + } + +protected: + //NOTE: need to allow cache-invalidating when text changes! + const char[] text_ = "\"a@b\" − an example"; +}