| 1234567891011121314151617181920212223242526272829303132333435363738 |
- #include <gtkmm/grid.h>
- #include <gtkmm/label.h>
- #include <gtkmm/entry.h>
- #include <gtkmm/button.h>
- #include "light_adder.hpp"
- namespace cx_light {
- light_adder::light_adder() {
- this->title_label = new Gtk::Label("Title");
- this->title_entry = new Gtk::Entry();
- this->address_label = new Gtk::Label("Address");
- this->address_entry = new Gtk::Entry();
- this->add_button = new Gtk::Button("Add");
- this->attach(*this->title_label, 0, 0);
- this->attach(*this->title_entry, 1, 0);
- this->attach(*this->address_label, 0, 1);
- this->attach(*this->address_entry, 1, 1);
- this->attach(*this->add_button, 0, 2, 2, 1);
- }
- light_adder::~light_adder() {
- this->remove(*this->title_label);
- this->remove(*this->title_entry);
- this->remove(*this->address_label);
- this->remove(*this->address_entry);
- this->remove(*this->add_button);
- delete this->title_label;
- delete this->title_entry;
- delete this->address_label;
- delete this->address_entry;
- delete this->add_button;
- }
- }
|