/*
* EtherPix simulator
*
* Copyright 2017 Stefan Schuermans <stefan schuermans info>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, version 3 of the License.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <gtkmm.h>
#include "config.h"
#include "draw.h"
#include "transform.h"
/**
* @brief constructor
* @param[in] Gtk Window object (a C object)
* @param[in] builder reference to GTK builder object
*/
Draw::Draw(BaseObjectType *cobject,
const Glib::RefPtr<Gtk::Builder> &builder):
Gtk::DrawingArea(cobject),
m_builder(builder),
m_config(NULL)
{
reqUpdate();
}
/// virtual destructor
Draw::~Draw()
{
}
/// set configuration object
void Draw::setConfig(Config const&config)
{
m_config = &config;
reqUpdate();
}