comparison mde/content/miscContent.d @ 123:d3b2cefd46c9

minSizeChange() allows run-time changes to widgets' minimal size (except for shrinking in a GridLayoutWidget). FloatingAreaWidget: correct resize limiters AStringContent: allows space and ignores modifier keys
author Diggory Hardy <diggory.hardy@gmail.com>
date Sun, 04 Jan 2009 17:35:15 +0000
parents 1b1e2297e2fc
children 41582439a42b
comparison
equal deleted inserted replaced
122:f96e8d18c00a 123:d3b2cefd46c9
50 protected: 50 protected:
51 final Content[] list_; 51 final Content[] list_;
52 } 52 }
53 53
54 /** Created on errors to display and log a message. */ 54 /** Created on errors to display and log a message. */
55 class ErrorContent : IContent 55 class ErrorContent : Content
56 { 56 {
57 this (char[] msg) { 57 this (char[] name, char[] msg) {
58 this.msg = msg; 58 super (name);
59 this.msg = msg;
59 } 60 }
60 61
61 override char[] toString (uint i) { 62 override char[] toString (uint i) {
62 return i == 0 ? msg 63 return i == 0 ? msg
63 : i == 1 ? "Error" 64 : i == 1 ? name_
64 : null; 65 : null;
65 } 66 }
66 67
67 protected: 68 protected:
68 char[] msg; 69 char[] msg;
69 } 70 }
70 71
71 /** A Content with no value but able to pass on an event. 72 /** A Content with no value but able to pass on an event.
72 * 73 *
73 * The point being that a button can be tied to one of these. */ 74 * The point being that a button can be tied to one of these. */
74 alias Content EventContent; 75 class EventContent : Content {
76 this (char[] symbol) {
77 super (symbol);
78 }
79 }