blob: 1804a855dbe7692c7065a3f4db1d4dd4f86659ec (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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();
}
|