#include<iostream>
#include<gtkmm.h>
using namespace std;

int main (int argc, char** argv) {
	Gtk::Main kit(argc, argv);
	
	Gtk::TreeModelColumn<bool> visible;
	Gtk::TreeModelColumn<bool> active;
	Gtk::TreeModelColumn<Glib::ustring> description;	
	Gtk::TreeModel::ColumnRecord columns;
	columns.add(visible);
	columns.add(active);
	columns.add(description);
	
	Glib::RefPtr<Gtk::ListStore> liststore = Gtk::ListStore::create (columns);
	Glib::RefPtr<Gtk::TreeModelFilter> filtered_liststore = Gtk::TreeModelFilter::create (liststore);
	filtered_liststore->set_visible_column (0);
	
	Gtk::TreeModel::Row row = *(liststore->append());
	row[visible] = false;
	row[active] = true;
	row[description] = "First";
	
	row = *(liststore->append());
	row[visible] = false;
	row[active] = true;
	row[description] = "Second";
	
	row = *(liststore->append());
	row[visible] = true;
	row[active] = true;
	row[description] = "Third";
	
	row = *(liststore->append());
	row[visible] = true;
	row[active] = true;
	row[description] = "Fourth";

	Gtk::TreeView full_view;
	Gtk::TreeView filtered_view;
	full_view.set_model (liststore);
	filtered_view.set_model (filtered_liststore);
	full_view.append_column_editable ("Active", active);
	full_view.append_column ("Description", description);
	filtered_view.append_column_editable ("Active", active);
	filtered_view.append_column ("Description", description);
	
	Gtk::HBox box;
	box.pack_start (filtered_view);
	box.pack_start (full_view);
	
	Gtk::Window window;
	window.add (box);
	window.show_all();
	
	Gtk::Main::run(window);
}

