-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpginfo.hpp
96 lines (71 loc) · 2.97 KB
/
pginfo.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
#ifndef GTKMM_EXAMPLEWINDOW_H
#define GTKMM_EXAMPLEWINDOW_H
#include <glibmm.h>
#include <gdkmm.h>
#include <gtkmm.h>
#include "model.hpp"
#include "personwindow.hpp"
#include "groupwindow.hpp"
class PGInfoWindow : public Gtk::Window
{
public:
PGInfoWindow(Model& model_in, int tile_ind_in);
virtual ~PGInfoWindow();
private:
void add_entry( const int res_id, const char* name );
void add_entry_g( const int res_id, const char* name );
// Signal handlers
virtual void on_button_quit();
virtual void on_button_delete();
virtual void on_notebook_switch_page(Gtk::Widget* page, guint page_num);
virtual void on_selection_changed();
virtual void on_selection_changed_g();
// Types and classes
typedef Glib::RefPtr<Gdk::Pixbuf> PixbufPtr;
Gtk::Notebook m_Notebook;
class ModelColumns : public Gtk::TreeModel::ColumnRecord
{
public:
ModelColumns()
{ add(m_col_id); add(m_dice_id); add(m_pixbuf); add(m_col_name); }
Gtk::TreeModelColumn<int> m_col_id;
Gtk::TreeModelColumn<int> m_dice_id;
Gtk::TreeModelColumn<PixbufPtr> m_pixbuf;
Gtk::TreeModelColumn<Glib::ustring> m_col_name;
};
class ModelColumns_g : public Gtk::TreeModel::ColumnRecord
{
public:
ModelColumns_g()
{ add(m_col_id); add(m_dice_id); add(m_pixbuf); add(m_col_name); }
Gtk::TreeModelColumn<int> m_col_id;
Gtk::TreeModelColumn<int> m_dice_id;
Gtk::TreeModelColumn<PixbufPtr> m_pixbuf;
Gtk::TreeModelColumn<Glib::ustring> m_col_name;
};
// Private members
Gtk::Box m_VBox;
Gtk::Box m_HBox;
// For residents list
ModelColumns m_Columns;
Gtk::ScrolledWindow m_ScrolledWindow;
Gtk::TreeView m_TreeView;
Glib::RefPtr<Gtk::ListStore> m_refTreeModel;
Glib::RefPtr<Gtk::TreeSelection> m_refTreeSelection;
PersonWindow m_PersonWindow;
// For group list
ModelColumns_g m_Columns_g;
Gtk::ScrolledWindow m_ScrolledWindow_g;
Gtk::TreeView m_TreeView_g;
Glib::RefPtr<Gtk::ListStore> m_refTreeModel_g;
Glib::RefPtr<Gtk::TreeSelection> m_refTreeSelection_g;
GroupWindow m_GroupWindow;
Gtk::Box m_ButtonBox;
Gtk::Button m_Button_Quit;
Gtk::Button m_Button_Delete;
Gtk::Box m_ButtonBox2;
Model* model;
int tile_ind;
};
#include "pginfo.impl.cpp"
#endif