#include #include #include #include #include #include #include "light_on_list.hpp" namespace cx_light { light_on_list::light_on_list(light target) { this->target = target.copy(); this->center = new Gtk::Box(); this->center->set_margin(5); this->center->set_spacing(10); this->center->set_orientation(Gtk::Orientation::HORIZONTAL); this->set_margin_bottom(5); this->set_child(*this->center); this->title = new Gtk::Label(this->target->get_name()); this->center->append(*this->title); this->show = new Gtk::Button("Show"); this->center->append(*this->show); this->edit = new Gtk::Button("Edit"); this->center->append(*this->edit); } light_on_list::~light_on_list() { delete this->center; delete this->title; delete this->show; delete this->edit; delete this->target; } int light_on_list::width() { return 200; } int light_on_list::height() { return 40; } }