From 5fcf57739e68a8b5053e03778aaee0eed445babd Mon Sep 17 00:00:00 2001 From: Benji Dial Date: Thu, 11 Mar 2021 22:00:22 -0500 Subject: settings editor, and lots of changes in service of that --- src/user/settings/editor.cpp | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 src/user/settings/editor.cpp (limited to 'src/user/settings/editor.cpp') diff --git a/src/user/settings/editor.cpp b/src/user/settings/editor.cpp new file mode 100644 index 0000000..1804a85 --- /dev/null +++ b/src/user/settings/editor.cpp @@ -0,0 +1,30 @@ +#include +#include +#include +#include +#include "editor.h" + +bool editor_save(window_tag_t e) { + ((editor *)e)->set_data(); + return true; +} + +editor::editor() + : w(0) {} + +void editor::editing_widget_ready(widget &e, const char *s) { + label *l = new label(s); + padding *p = new padding(*l, 4); + + dllist *list = new dllist(); + list->add_back(*p); + list->add_back(e); + + vbox *box = new vbox(*list); + + w = new window(*box, RGB(bf, bf, bf), &editor_save, this); +} + +void editor::show() { + w->show(); +} \ No newline at end of file -- cgit v1.2.3