/* gtkmm example Copyright (C) 2002 gtkmm development team
*
* 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; either version 2 of the License, or
* (at your option) any later version.
*
* 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 General Public License along
* with this program; if not, see .
*/
#ifndef GTKMM_EXAMPLE_TREEMODEL_DND_H
#define GTKMM_EXAMPLE_TREEMODEL_DND_H
#include
class TreeModel_Dnd : public Gtk::TreeStore
{
protected:
TreeModel_Dnd();
public:
//Tree model columns:
class ModelColumns : public Gtk::TreeModel::ColumnRecord
{
public:
ModelColumns()
{ add(m_col_id); add(m_col_name); add(m_col_draggable); add(m_col_receivesdrags); }
Gtk::TreeModelColumn m_col_id;
Gtk::TreeModelColumn m_col_name;
Gtk::TreeModelColumn m_col_draggable;
Gtk::TreeModelColumn m_col_receivesdrags;
};
ModelColumns m_Columns;
static Glib::RefPtr create();
protected:
//Overridden virtual functions:
bool row_draggable_vfunc(const Gtk::TreeModel::Path& path) const override;
bool row_drop_possible_vfunc(const Gtk::TreeModel::Path& dest, const Glib::ValueBase& value) const override;
};
#endif //GTKMM_EXAMPLE_TREEMODEL_DND_H