-
Notifications
You must be signed in to change notification settings - Fork 0
/
C_GUI.cpp
70 lines (48 loc) · 1.98 KB
/
C_GUI.cpp
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
//////////////////////////////////////////////////////////////////////////////////
// [ C_GUI_Class_Source ]
//////////////////////////////////////////////////////////////////////////////////
#include "C_GUI.hpp"
//////////////////////////////////////////////////////////////////////////////////
// [ Konstructor ]
//////////////////////////////////////////////////////////////////////////////////
C_GUI::C_GUI(){
this->set_default_size(1000, 600);
/////////////////////////////////////////////////
// Button
sbutton.start.set_label("start");
sbutton.start.set_size_request(100, 30);
sbutton.stop.set_label("stop");
sbutton.stop.set_size_request(100, 30);
sbutton.stop.set_sensitive(false);
/////////////////////////////////////////////////
// scombo
scombo.interface.set_size_request(100, 30);
/////////////////////////////////////////////////
// TreeView
stview.host.view.setWindow(this);
stview.host.window.add(stview.host.view);
stview.host.window.set_policy(Gtk::POLICY_AUTOMATIC, Gtk::POLICY_AUTOMATIC);
auto column = stview.host.view.get_column(0);
column->set_title("Host");
stview.packet.view.setWindow(this);
stview.packet.window.add(stview.packet.view);
stview.packet.window.set_policy(Gtk::POLICY_AUTOMATIC, Gtk::POLICY_AUTOMATIC);
column = stview.packet.view.get_column(0);
column->set_title("Packet");
/////////////////////////////////////////////////
// Paned
spaned.ph.add1(stview.packet.window);
spaned.ph.add2(stview.host.window);
spaned.ph.set_position(300);
//////////////////////////////////////////////////////////////
// HeaderBar
set_titlebar(header);
header.set_title("sneaker");
header.set_subtitle("Welcome");
header.set_show_close_button();
header.pack_start(scombo.interface);
header.pack_start(sbutton.start);
header.pack_start(sbutton.stop);
///////////////////////////////////////////////////////
add(spaned.ph);
}