#include #include #include #include #include "lights_list.hpp" #include "light_on_list.hpp" #include "strings.hpp" #include "config.hpp" namespace cx_light { lights_list::lights_list() { this->lights = new std::vector; this->lights->clear(); this->set_size_request(light_on_list::width(), -1); this->set_orientation(Gtk::Orientation::VERTICAL); this->set_margin(DEFAULT_MARGIN); this->add_lights_container(); this->add_create_light_button(); } lights_list::~lights_list() { delete this->create_light; delete this->lights; delete this->lights_container; } void lights_list::add_lights_container() { this->lights_container = new Gtk::Box(); this->lights_container->set_orientation(Gtk::Orientation::VERTICAL); this->lights_container->set_size_request(-1, light_on_list::height()); this->append(*this->lights_container); } void lights_list::add_create_light_button() { this->create_light = new Gtk::Button(__(ADD_LIGHT)); this->append(*this->create_light); } }