From: Tim R. <ti...@us...> - 2004-07-31 12:25:01
|
Update of /cvsroot/csdopenglnet/csdOpenGL/samples In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14219 Modified Files: gtkAdvanced.cs Log Message: bka Index: gtkAdvanced.cs =================================================================== RCS file: /cvsroot/csdopenglnet/csdOpenGL/samples/gtkAdvanced.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** gtkAdvanced.cs 31 Jul 2004 11:45:59 -0000 1.1 --- gtkAdvanced.cs 31 Jul 2004 12:24:42 -0000 1.2 *************** *** 7,10 **** --- 7,78 ---- public class GtkAdvanced : csdGL { + + protected Window window; + protected GtkGLArea glarea; + protected Entry rotX_entry; + protected Entry rotY_entry; + protected Entry rotZ_entry; + + public GtkAdvanced() { + Debug.Indent(); + Debug.WriteLine( "Entering GtkAdvaned()" ); + + Debug.WriteLine( "Init Application" ); + Application.Init(); + + Debug.WriteLine( "Init Window" ); + window = new Gtk.Window( "Gtk Frame" ); + window.ReallocateRedraws = true; + window.DeleteEvent += new DeleteEventHandler( OnDeleteEvent ); + window.Resize( 640, 480 ); + + Debug.WriteLine( "Init GtkGLArea" ); + glarea = new GtkGLArea(); + + Debug.WriteLine( "Init rotation entry fields" ); + rotX_entry = new Entry(); + rotY_entry = new Entry(); + rotZ_entry = new Entry(); + + Debug.WriteLine( "Init Table-Layout table1" ); + Table table1 = new Table( 2, 3, false ); + table1.Attach( new Label( "x-rotation: " ), 0, 1, 0, 1 ); + table1.Attach( rotX_entry, 1, 2, 0, 1 ); + table1.Attach( new Label( "y-rotation: " ), 0, 1, 1, 2 ); + table1.Attach( rotY_entry, 1, 2, 1, 2 ); + table1.Attach( new Label( "z-rotation: " ), 0, 1, 2, 3 ); + table1.Attach( rotZ_entry, 1, 2, 2, 3 ); + + Debug.WriteLine( "Init Table-Layout table2" ); + + Debug.WriteLine( "Init HBox-Layout hbox" ); + HBox hbox = new HBox( false, 2 ); + hbox.PackStart( table1, false, true, 5 ); + + Debug.WriteLine( "Init VBox-Layout vbox" ); + VBox vbox = new VBox( false, 2 ); + vbox.PackStart( glarea, true, true, 5 ); + vbox.PackEnd( hbox, false, true, 5 ); + + Debug.WriteLine( "Display Window" ); + window.Add( vbox ); + window.ShowAll(); + Debug.WriteLine( "MainLoop" ); + Application.Run (); + + Debug.WriteLine( "Exiting GtkAdvaned()" ); + Debug.Unindent(); + + } + + protected void OnDeleteEvent (object obj, DeleteEventArgs args) { + Debug.Indent(); + Debug.WriteLine( "Entering GtkAdvanced.OnDeleteEvent( object, DeleteEventArgs )" ); + + Application.Quit (); + + Debug.WriteLine( "Exiting GtkAdvanced.OnDeleteEvent( object, DeleteEventArgs )" ); + Debug.Unindent(); + } public static void Main( string[] args) { |