/* -*- c++ -*- * Copyright (C) 2006, 2007 Andreas Persson * * 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, 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 program; see the file COPYING. If not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA. */ #ifndef GIGEDIT_DIMENSIONMANAGER_H #define GIGEDIT_DIMENSIONMANAGER_H #include #include #include #include #include #include #include #include class DimensionManager : public Gtk::Window { public: // triggered on all changes (i.e. dimension added or removed) sigc::signal articulation_changed_signal; DimensionManager(); void show(gig::Region* region); protected: gig::Region* region; Gtk::VBox vbox; Gtk::HButtonBox buttonBox; Gtk::ScrolledWindow scrolledWindow; Gtk::TreeView treeView; Gtk::Button addButton; Gtk::Button removeButton; class ModelColumns : public Gtk::TreeModel::ColumnRecord { public: ModelColumns() { add(m_dim_type); add(m_bits); add(m_zones); add(m_description); add(m_definition); } Gtk::TreeModelColumn m_dim_type; Gtk::TreeModelColumn m_bits; Gtk::TreeModelColumn m_zones; Gtk::TreeModelColumn m_description; Gtk::TreeModelColumn m_definition; } tableModel; class ComboModelColumns : public Gtk::TreeModel::ColumnRecord { public: ComboModelColumns() { add(m_type_id); add(m_type_name); } Gtk::TreeModelColumn m_type_id; Gtk::TreeModelColumn m_type_name; } comboModel; Glib::RefPtr refTableModel; void refreshManager(); void addDimension(); void removeDimension(); }; #endif // GIGEDIT_DIMENSIONMANAGER_H