summaryrefslogtreecommitdiff
path: root/src/user/settings/editor.cpp
diff options
context:
space:
mode:
authorBenji Dial <benji6283@gmail.com>2021-03-11 22:00:22 -0500
committerBenji Dial <benji6283@gmail.com>2021-03-11 22:00:22 -0500
commit5fcf57739e68a8b5053e03778aaee0eed445babd (patch)
treee7a8bab18668d112e58b1b48190195035c71fa8a /src/user/settings/editor.cpp
parent0f2398d1f622cce37925f52d978d92e6cce1c7a9 (diff)
downloadportland-os-5fcf57739e68a8b5053e03778aaee0eed445babd.tar.gz
settings editor, and lots of changes in service of that
Diffstat (limited to 'src/user/settings/editor.cpp')
-rw-r--r--src/user/settings/editor.cpp30
1 files changed, 30 insertions, 0 deletions
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 <raleigh/w/padding.h>
+#include <raleigh/w/button.h>
+#include <raleigh/w/label.h>
+#include <raleigh/w/vbox.h>
+#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<widget &> *list = new dllist<widget &>();
+ 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