core_window.cpp 803 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. #include <gtkmm/widget.h>
  2. #include <gtkmm/button.h>
  3. #include <gtkmm/window.h>
  4. #include <gtkmm/box.h>
  5. #include <gtkmm/orientable.h>
  6. #include <iostream>
  7. #include "strings.hpp"
  8. #include "config.hpp"
  9. #include "core_window.hpp"
  10. #include "lights_list.hpp"
  11. namespace cx_light {
  12. core_window::core_window() {
  13. this->set_title(__(WINDOW_TITLE));
  14. this->set_default_size(400, 200);
  15. this->init_default();
  16. }
  17. core_window::~core_window() {
  18. delete this->center;
  19. }
  20. void core_window::init_default() {
  21. this->center = new Gtk::Box();
  22. this->center->set_orientation(Gtk::Orientation::HORIZONTAL);
  23. this->set_child(*this->center);
  24. this->create_lights_list();
  25. }
  26. void core_window::create_lights_list() {
  27. this->lights = new lights_list();
  28. this->center->append(*this->lights);
  29. }
  30. }