-
Notifications
You must be signed in to change notification settings - Fork 3
/
canviewer.cpp
44 lines (33 loc) · 1023 Bytes
/
canviewer.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
//============================================================================
// Name : canviewer.cpp
// Author : Tim Lucas Sabelmann
// Version :
// Copyright : E-Cap Mobility GmbH
// Description : Hello World in C++, Ansi-style
//============================================================================
#include <iostream>
#include <string>
#include <sstream>
#include <inttypes.h>
#include "gtkmm/MainWindow.hpp"
using namespace std;
int main(int argc, char *argv[])
{
try
{
auto app = Gtk::Application::create(argc, argv, "org.gtkmm.examples.base");
Glib::RefPtr<Gtk::Builder> builder = Gtk::Builder::create_from_file("window.glade");
gtkmm::MainWindow *window = nullptr;
builder->get_widget_derived("main_window", window);
app->run(*window);
}
catch(std::exception& e)
{
std::cerr << e.what() << std::endl;
}
catch(int e)
{
std::cerr << e << std::endl;
}
//auto items = Glib::RefPtr<Gtk::TreeModel>::cast_dynamic(builder->get_object("treestore1"));
}