Main Page | Namespace List | Class Hierarchy | Class List | File List | Class Members | File Members

src/aclvis/mainC.cpp

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 /***************************************************************************
00003  *
00004  * The IPPL Framework
00005  * 
00006  * This program was prepared by PSI. 
00007  * All rights in the program are reserved by PSI.
00008  * Neither PSI nor the author(s)
00009  * makes any warranty, express or implied, or assumes any liability or
00010  * responsibility for the use of this software
00011  *
00012  * Visit http://www.acl.lanl.gov/POOMS for more details
00013  *
00014  ***************************************************************************/
00015 
00016 // -*- C++ -*-
00017 /***************************************************************************
00018  *
00019  * The IPPL Framework
00020  * 
00021  *
00022  * Visit http://people.web.psi.ch/adelmann/ for more details
00023  *
00024  ***************************************************************************/
00025 
00026 //
00027 // README: Portions of this file are merged at file generation
00028 // time. Edits can be made *only* in between specified code blocks, look
00029 // for keywords <Begin user code> and <End user code>.
00030 //
00032 //
00033 // Created by Builder Xcessory 4.0 with ACL mods.
00034 // Generated by Code Generator Xcessory 2.0 (09/09/96).
00035 //
00037 
00038 //
00039 // Motif.
00040 //
00041 #include <X11/StringDefs.h>
00042 #include <Xm/Xm.h>
00043 #include <Xm/DialogS.h>
00044 #include <Xm/MwmUtil.h>
00045 #if (XmVersion >= 1002)
00046 #include <Xm/RepType.h>
00047 #endif
00048 #include "UIWindow.h"
00049 
00050 //
00051 // Common constant and pixmap declarations.
00052 //
00053 #include "defsC.h"
00054 
00055 //
00056 // Globally included information (change thru Output File Names Dialog).
00057 //
00058 
00059 
00060 //
00061 // Headers for classes used in this program.
00062 //
00063 #include "MainWindow.h"
00064 
00065 //
00066 // Convenience functions from utilities file.
00067 //
00068 extern void RegisterBxConverters(XtAppContext);
00069 extern XtPointer CONVERT(Widget, char *, char *, int, Boolean *);
00070 extern XtPointer DOUBLE(double);
00071 extern XtPointer SINGLE(float);
00072 extern void MENU_POST(Widget, XtPointer, XEvent *, Boolean *);
00073 extern Pixmap XPM_PIXMAP(Widget, char**);
00074 extern void SET_BACKGROUND_COLOR(Widget, ArgList, Cardinal*, Pixel);
00075 //
00076 // Function declarations for shell callbacks..
00077 //
00078 
00079 // Begin user code block <globals>
00080 #include <vtkXRenderWindow.h>
00081 #include <vtkXRenderWindowInteractor.h>
00082 vtkRenderMaster rm;
00083 vtkXRenderWindowInteractor *iren;
00084 vtkXRenderWindow *renWin;
00085 vtkRenderer *ren1;
00086 MainWindow *mainWindow;
00087 int aclvis_init ( int argc, char **argv ) {
00088 
00089 // End user code block <globals>
00090 //
00091 // Change this line via the Output Application Names Dialog.
00092 //
00093 #define BX_APP_CLASS "BuilderProduct"
00094 
00095   //int main ( int argc, char **argv )
00096   //{
00097     Widget       parent;
00098     XtAppContext app;
00099     Arg          args[256];
00100     Cardinal     ac;
00101     
00102     // Begin user code block <declarations>
00103     //    Visual *vis;
00104     Display *display;
00105     //    Colormap *col;
00106     //    int depth; 
00107 
00108     renWin = (vtkXRenderWindow *)rm.MakeRenderWindow();
00109     renWin->SetSize(520, 520);
00110     ren1 = renWin->MakeRenderer();
00111     ren1->SetBackground(0,0,0);
00112 
00113     // End user code block <declarations>
00114     
00115     // Initialize Xt. 
00116     //
00117     // The shell returned by XtAppInitialize is used as an unrealized
00118     // parent for multipple shell.  Each shell in this program
00119     // is created as a popup child of the main applicationShell.
00120     // This is a recommendation of Paul Asente & Ralph Swick in
00121     // "X Window System Toolkit", p. 677.
00122     
00123     parent = XtVaAppInitialize ( &app, BX_APP_CLASS, NULL, 0, 
00124 #ifndef XlibSpecificationRelease
00125     (Cardinal *) &argc, 
00126 #else
00127 #if (XlibSpecificationRelease>=5)
00128     &argc, 
00129 #else
00130     (Cardinal *) &argc, 
00131 #endif
00132 #endif
00133     argv, NULL, 
00134     NULL );
00135     
00136     RegisterBxConverters(app);
00137 #if (XmVersion >= 1002) 
00138     XmRepTypeInstallTearOffModelConverter();
00139 #endif
00140     
00141     // Begin user code block <create_shells>
00142     display = XtDisplay(parent);
00143     renWin->SetDisplayId(display);
00144     //    depth = renWin->GetDesiredDepth();
00145     //    vis = renWin->GetDesiredVisual();
00146     //    col = (Colormap *)renWin->GetDesiredColormap();
00147     
00148     // End user code block <create_shells>
00149     //
00150     // Instantiate the classes used in this program.
00151     //
00152     
00153     
00154     // Begin user code block <create_topLevelShell>
00155     // End user code block <create_topLevelShell>
00156     
00157     UIWindow *topLevelShell;
00158     
00159     ac = 0;
00160     XtSetArg(args[ac], XmNtitle, "ACLVIS"); ac++;
00161     XtSetArg(args[ac], XmNx, 3574); ac++;
00162     XtSetArg(args[ac], XmNy, 114); ac++;
00163     XtSetArg(args[ac], XmNwidth, 769); ac++;
00164     XtSetArg(args[ac], XmNheight, 584); ac++;
00165     topLevelShell = new UIWindow(parent, args, ac, app);
00166     
00167     MainWindow *_mainWindow = new MainWindow("mainWindow");
00168     
00169     // Begin user code block <new_mainWindow>
00170     mainWindow = _mainWindow;
00171     // End user code block <new_mainWindow>
00172     
00173     _mainWindow->create(topLevelShell->baseWidget());
00174     _mainWindow->manage();
00175     ac = 0;
00176     XtSetArg(args[ac], XmNx, 970); ac++;
00177     XtSetArg(args[ac], XmNy, 114); ac++;
00178     XtSetArg(args[ac], XmNwidth, 769); ac++;
00179     XtSetArg(args[ac], XmNheight, 584); ac++;
00180     XtSetValues(_mainWindow->baseWidget(), args, ac);
00181     topLevelShell->show();
00182     
00183     // Begin user code block <app_procedures>
00184     iren = (vtkXRenderWindowInteractor *)renWin->MakeRenderWindowInteractor();
00185     iren->SetWidget(_mainWindow->GetDrawingAreaWidget());
00186     iren->Initialize(app);
00187     renWin->Render();
00188     // End user code block <app_procedures>
00189     
00190     // Begin user code block <main_loop>
00191     // End user code block <main_loop>
00192     
00193     //    XtAppMainLoop(app);
00194     
00195     //
00196     // A return value even though the event loop never ends. 
00197     //
00198      return(0); 
00199 }
00200 
00201 /***************************************************************************
00202  * $RCSfile: mainC.cpp,v $   $Author: adelmann $
00203  * $Revision: 1.1.1.1 $   $Date: 2003/01/23 07:40:34 $
00204  * IPPL_VERSION_ID: $Id: mainC.cpp,v 1.1.1.1 2003/01/23 07:40:34 adelmann Exp $ 
00205  ***************************************************************************/

Generated on Fri Nov 2 01:25:53 2007 for IPPL by doxygen 1.3.5