|
|
@@ -0,0 +1,43 @@
|
|
|
+#include <vector>
|
|
|
+#include <gtkmm/box.h>
|
|
|
+#include <gtkmm/button.h>
|
|
|
+#include <gtkmm/orientable.h>
|
|
|
+
|
|
|
+#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<light_on_list *>;
|
|
|
+ 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);
|
|
|
+}
|
|
|
+
|
|
|
+}
|