GTK+ IOStream  Beta
<< GTK+ >> add C++ IOStream operators to GTK+. Now with extra abilities ... like network serialisation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
DrawingAreaTest.C
Go to the documentation of this file.
1 /* Copyright 2000-2012 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 #include "gtkInterface.H"
18 #include "DrawingArea.H"
19 #include "Buttons.H"
20 
21 // Quit button callback
22 static void quit(void *wid, gpointer data) {
23  gtk_main_quit();
24 }
25 
26 int main(int argc, char *argv[]) {
27 
28  gtk_init( &argc, &argv );
29 
30  GtkInterface topWindow;
31 
32 // gtk_widget_set_size_request (topWindow.win, 1000, 500);
33 
34  VBox vBox;
35 
36  vBox<<BoxIS(FALSE,FALSE, FALSE)<<(Buttons()<<BUTTONLABELSTRUCT((char*)"Quit", quit, NULL)); // show a quit button
37 
38  DrawingArea drawingArea; // The drawing area object
39 
40  vBox << BoxIS(TRUE, TRUE)<<drawingArea.getWidget(); // show the figure
41  vBox.show(); // show the vertical box
42  topWindow<< vBox; // add it to the top window
43 
44  gtk_main();
45 }