cstring header was included. (Compile in Debian)
[gtkmmProject.git] / src / TestWidget.h
blobd18d1d562a91b68c40318af2426f76d8ecd2f58d
1 #ifndef _GTK_TestWidget_H
2 #define _GTK_TestWidget_H
4 #include <gtkmm.h>
5 #include <gtkmm/window.h>
6 #include <gtkmm/treeview.h>
7 #include <gtkmm/button.h>
8 #include <gtkmm/treemodel.h>
9 #include <gtkmm/treestore.h>
11 #include <iostream>
13 using std::cout;
15 class TestWidget : public Gtk::Window
17 public:
18 TestWidget (void);
19 virtual ~TestWidget (void);
21 private:
23 // Signal handlers
25 virtual void onCancel (void);
26 virtual void onApply (void);
27 virtual void onOk (void);
28 virtual void on_treeview_row_activated (const Gtk::TreeModel::Path& path, Gtk::TreeViewColumn* column);
30 private:
32 // Variables
34 class ModelColumns : public Gtk::TreeModel::ColumnRecord
36 public:
37 ModelColumns() { add(m_col_id); add(m_col_name); }
39 Gtk::TreeModelColumn<int> m_col_id;
40 Gtk::TreeModelColumn<Glib::ustring> m_col_name;
43 ModelColumns m_Columns;
45 Gtk::TreeView treeView;
46 Glib::RefPtr<Gtk::TreeStore> pTreeModel;
48 Gtk::VBox vBox;
49 Gtk::HPaned hPaned;
50 Gtk::Frame frame;
51 Gtk::ScrolledWindow scWindow;
52 Gtk::HButtonBox buttonBox;
53 Gtk::Button pbOk;
54 Gtk::Button pbCancel;
55 Gtk::Button pbApply;
58 #endif