GTK+ IOStream
Beta
<< GTK+ >> add C++ IOStream operators to GTK+. Now with extra abilities ... like network serialisation
Main Page
Namespaces
Classes
Files
Examples
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
SeparatorTest.C
Go to the documentation of this file.
1
/* Copyright 2000-2013 Matt Flax <flatmax@flatmax.org>
2
This file is part of GTK+ IOStream class set
3
4
GTK+ IOStream is free software; you can redistribute it and/or modify
5
it under the terms of the GNU General Public License as published by
6
the Free Software Foundation; either version 2 of the License, or
7
(at your option) any later version.
8
9
GTK+ IOStream is distributed in the hope that it will be useful,
10
but WITHOUT ANY WARRANTY; without even the implied warranty of
11
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
GNU General Public License for more details.
13
14
You have received a copy of the GNU General Public License
15
along with GTK+ IOStream
16
*/
17
/* Compile with ...
18
g++ -ggdb `gtk-config --cflags` LabelsTest.C -o LabelsTest `gtk-config --libs`
19
*/
20
#include "
gtkInterface.H
"
21
#include "
Buttons.H
"
22
#include "
Labels.H
"
23
#include "
Separator.H
"
24
25
static
void
quit
(
void
*wid, gpointer data){
26
gtk_main_quit();
27
}
28
29
int
main
(
int
argc,
char
*argv[]){
30
31
gtk_init( &argc, &argv );
// init GTK
32
33
GtkInterface
topWindow;
// Create the top box
34
35
VBox
vBox; vBox.
show
(); vBox.
setDefaultStart
(
true
);
// show the vBox and set default to pack in the start of the box
36
Labels
labs; labs<<
"separator below"
<<
"separator above"
;
37
38
// create a quit buttons and add two labels to a shown VBox
39
// At the same time, add them to the HBox and show it
40
// At the same time, add it to the top window
41
vBox<<labs.
next
();
// add a label to the vBox
42
43
HSeparator
hSep(1);
// create one separator
44
45
vBox <<hSep.
current
();
// add the separator to the vbox
46
47
vBox << labs.
next
();
// add another label
48
49
topWindow << (vBox
// show the vbox with labels
50
<< (
Buttons
()<<
BUTTONLABELSTRUCT
(
"Quit"
,
quit
, NULL)));
// show the hbox with labels and buttons
51
52
gtk_main();
// run GTK+
53
}
54
55
Generated on Tue Jun 4 2013 11:03:27 for GTK+ IOStream by
1.8.3.1