#include #include #include #include #include using namespace raleigh; widget *make_line(const char *str) { return new label(str); } void main(const char *text) { dllist box_widgets; char *const data = strdup(text); char *this_string = data; while (*this_string) { char *i = this_string; while (1) { if (!i[0]) { box_widgets.add_back(*make_line(this_string)); this_string = i; break; } if ((i[0] == '\\') && (i[1] == 'n')) { i[0] = '\0'; box_widgets.add_back(*make_line(this_string)); this_string = i + 2; break; } ++i; } } vbox box(box_widgets); padding p(box, 4); window w(p); w.show(); start_runtime(); }