control.hpp 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. #ifndef SOURCE_CONTROL_HPP_INCLUDED
  2. #define SOURCE_CONTROL_HPP_INCLUDED
  3. #include <string>
  4. #include <gtkmm/grid.h>
  5. #include <gtkmm/entry.h>
  6. #include <gtkmm/label.h>
  7. #include <gtkmm/scale.h>
  8. #include <gtkmm/button.h>
  9. #include <gtkmm/drawingarea.h>
  10. #include <gtkmm/adjustment.h>
  11. #include <cairomm/context.h>
  12. #include "light.hpp"
  13. namespace cx_light {
  14. class control: public Gtk::Grid {
  15. public:
  16. control(light*);
  17. ~control() override;
  18. void redraw(
  19. const Cairo::RefPtr<Cairo::Context> &context,
  20. int width,
  21. int height
  22. );
  23. private:
  24. std::string title;
  25. std::string address;
  26. Gtk::Label *description;
  27. Gtk::Scale *power;
  28. Gtk::Label *power_description;
  29. Gtk::Scale *color;
  30. Gtk::Label *color_description;
  31. Gtk::DrawingArea *drawing;
  32. Gtk::Button *apply;
  33. Gtk::Button *back;
  34. Glib::RefPtr<Gtk::Adjustment> *color_value;
  35. Glib::RefPtr<Gtk::Adjustment> *power_value;
  36. };
  37. }
  38. #endif