Main Page
Related Pages
Modules
+
Namespaces
Namespace List
+
Namespace Members
+
All
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
u
w
x
y
z
+
Functions
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
x
y
z
Variables
Enumerations
Enumerator
+
Classes
Class List
Class Hierarchy
+
Class Members
+
All
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
+
Functions
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
y
z
~
+
Variables
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
Enumerations
+
Enumerator
e
t
+
Files
File List
+
File Members
+
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Functions
_
a
b
c
d
e
f
g
h
i
j
l
m
n
p
q
r
s
t
u
v
w
y
Variables
+
Typedefs
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
+
Enumerator
e
+
Macros
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
IVT
src
gui
GTK
GTKApplicationHandler.cpp
Go to the documentation of this file.
1
// ****************************************************************************
2
// Filename: GTKApplicationHandler.cpp
3
// Author: Florian Hecht
4
// Date: 2009
5
// ****************************************************************************
6
7
8
#include "
GTKApplicationHandler.h
"
9
10
#include <locale.h>
11
12
#include <gtk/gtk.h>
13
#include <gtk/gtkmain.h>
14
15
static
char
app_name
[] =
"IVT_APPLICATION\0"
;
16
static
int
my_argc
= 1;
17
static
char
*
my_argv
[2] = {
app_name
, NULL};
18
19
CGTKApplicationHandler
*
CGTKApplicationHandler::m_pGTKApplicationHandler
= NULL;
20
21
CGTKApplicationHandler::CGTKApplicationHandler
(
int
argc,
char
**argv)
22
{
23
if
(argv != NULL)
24
{
25
gtk_init(&argc, &argv);
26
}
27
else
28
{
29
char
**ptr =
my_argv
;
30
gtk_init(&
my_argc
, &ptr);
31
32
}
33
34
// undo the setting of the locale by GTK
35
// this makes dialogs appear in english on any system
36
// but it doesn't screw with sscanf and fscanf, which
37
// is more important to us
38
setlocale(LC_ALL,
"C"
);
39
40
m_pGTKApplicationHandler
=
this
;
41
m_bExit
=
false
;
42
}
43
44
CGTKApplicationHandler::~CGTKApplicationHandler
()
45
{
46
m_pGTKApplicationHandler
= NULL;
47
}
48
49
bool
CGTKApplicationHandler::ProcessEventsAndGetExit
()
50
{
51
while
(gtk_events_pending())
52
gtk_main_iteration();
53
54
return
m_bExit
;
55
}
56
57
void
CGTKApplicationHandler::Reset
()
58
{
59
60
}
CGTKApplicationHandler
Definition:
GTKApplicationHandler.h:24
my_argv
static char * my_argv[2]
Definition:
GTKApplicationHandler.cpp:17
CGTKApplicationHandler::m_pGTKApplicationHandler
static CGTKApplicationHandler * m_pGTKApplicationHandler
Definition:
GTKApplicationHandler.h:39
CGTKApplicationHandler::Reset
void Reset()
Definition:
GTKApplicationHandler.cpp:57
CGTKApplicationHandler::m_bExit
bool m_bExit
Definition:
GTKApplicationHandler.h:38
app_name
static char app_name[]
Definition:
GTKApplicationHandler.cpp:15
CGTKApplicationHandler::~CGTKApplicationHandler
~CGTKApplicationHandler()
Definition:
GTKApplicationHandler.cpp:44
CGTKApplicationHandler::ProcessEventsAndGetExit
bool ProcessEventsAndGetExit()
Definition:
GTKApplicationHandler.cpp:49
GTKApplicationHandler.h
my_argc
static int my_argc
Definition:
GTKApplicationHandler.cpp:16
CGTKApplicationHandler::CGTKApplicationHandler
CGTKApplicationHandler(int argc=0, char **argv=0)
Definition:
GTKApplicationHandler.cpp:21
asr_ivt
Author(s): Allgeyer Tobias, Hutmacher Robin, Kleinert Daniel, Meißner Pascal, Scholz Jonas, Stöckle Patrick
autogenerated on Mon Feb 28 2022 21:44:00