[go: up one dir, main page]

Menu

[r239]: / gtk-ctafconf / src / main.cc  Maximize  Restore  History

Download this file

78 lines (63 with data), 2.0 kB

 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
/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
/*
* main.cc
* Copyright (C) GESTES Cedric 2008 <ctaf42@gmail.com>
*
* main.cc is free software.
*
* You may redistribute it and/or modify it under the terms of the
* GNU General Public License, as published by the Free Software
* Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* main.cc is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with main.cc. If not, write to:
* The Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor
* Boston, MA 02110-1301, USA.
*/
#include <gtkmm.h>
#include <iostream>
#include "gui-factory.h"
#include "config-parser.h"
#ifdef ENABLE_NLS
# include <libintl.h>
#endif
int
main (int argc, char *argv[])
{
Gtk::Main kit(argc, argv);
Gtk::Window dialog;
Gtk::Notebook notebook;
GuiFactory gui_factory(notebook);
/* ConfigParserCtafconf cp_ctafconf(gui_factory); */
/* ConfigParserEmacs cp_emacs(gui_factory); */
dialog.add(notebook);
dialog.set_default_size(640, 480);
ConfigParser config;
config.parse("er.tpl");
/* cp_ctafconf.load("user-profile.ct-tpl"); */
/* cp_emacs.load("emacs.ct-tpl"); */
gui_factory.add_frame("bob");
gui_factory.add_string("str1", "blabla");
gui_factory.add_string("str2");
std::vector<std::string> strings;
strings.push_back("tata");
strings.push_back("toto");
strings.push_back("titi");
gui_factory.add_singlechoice("combotext", strings, "titi");
std::vector<std::string> strings2;
strings2.push_back("tata");
strings2.push_back("titi");
gui_factory.add_frame("bob2");
gui_factory.add_multichoice("tree", strings, strings2);
gui_factory.add_checkbox("str2", 1);
dialog.show_all();
kit.run(dialog);
return 0;
}