#include <G4Xt.hh>
Inheritance diagram for G4Xt:
Public Member Functions | |
void | PutStringInResourceDatabase (char *) |
G4bool | Inited () |
void * | GetEvent () |
void | FlushAndWaitExecution () |
virtual | ~G4Xt () |
Static Public Member Functions | |
G4Xt * | getInstance () |
G4Xt * | getInstance (int, char **, char *) |
Private Member Functions | |
G4Xt (int, char **, char *) | |
Static Private Attributes | |
G4Xt * | instance = NULL |
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Definition at line 134 of file G4Xt.cc. References instance.
|
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Definition at line 81 of file G4Xt.cc. References G4VInteractorManager::AddDispatcher(), appContext, argn, args, G4DispatchFunction, G4VInteractorManager::SetArguments(), G4VInteractorManager::SetMainInteractor(), topWidget, and XtInited. Referenced by getInstance().
00088 { 00089 if(XtInited==FALSE) { //Xt should be Inited once ! 00090 if(a_argn!=0) { //Save args. 00091 args = (char**)malloc(a_argn * sizeof(char*)); 00092 if(args!=NULL) { 00093 argn = a_argn; 00094 for(int argi=0;argi<a_argn;argi++) { 00095 args[argi] = (char*)NewString (a_args[argi]); 00096 } 00097 } 00098 } 00099 #if XtSpecificationRelease == 4 00100 Cardinal narg; 00101 narg = (Cardinal)a_argn; 00102 #else 00103 int narg; 00104 narg = a_argn; 00105 #endif 00106 Arg xargs[1]; 00107 XtSetArg (xargs[0],XtNgeometry,"100x100"); 00108 topWidget = XtAppInitialize (&appContext,a_class, 00109 NULL,(Cardinal)0, 00110 &narg,a_args,NULL, 00111 xargs,1); 00112 if(topWidget==NULL) { 00113 G4cout << "G4Xt : Unable to init Xt." << G4endl; 00114 } 00115 // Restore a_args. XtAppInitialize corrupts the given ones !!! 00116 if( (a_argn!=0) && (args!=NULL)) { 00117 for(int argi=0;argi<a_argn;argi++) { 00118 if(args[argi]!=NULL) 00119 strcpy(a_args[argi],args[argi]); 00120 else 00121 a_args[argi] = NULL; 00122 } 00123 } 00124 // If topWidget not realized, pbs with Inventor shells. 00125 XtSetMappedWhenManaged (topWidget,False); 00126 XtRealizeWidget (topWidget); 00127 XtInited = TRUE; 00128 } 00129 SetArguments (argn,args); 00130 SetMainInteractor (topWidget); 00131 AddDispatcher ((G4DispatchFunction)XtDispatchEvent); 00132 } |
Here is the call graph for this function:
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Implements G4VInteractorManager. Definition at line 183 of file G4Xt.cc. References topWidget.
00187 { 00188 if(topWidget==NULL) return; 00189 XSync(XtDisplay(topWidget),False); 00190 } |
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Implements G4VInteractorManager. Definition at line 152 of file G4Xt.cc. References appContext, and topWidget. Referenced by G4UIXm::GetHelpChoice(), G4UIXaw::GetHelpChoice(), G4UIXm::SecondaryLoop(), G4UIXaw::SecondaryLoop(), G4UIXm::SessionStart(), and G4UIXaw::SessionStart().
00156 { 00157 static XEvent event; 00158 if(appContext==NULL) return NULL; 00159 if(topWidget==NULL) return NULL; 00160 XtAppNextEvent (appContext, &event); 00161 return &event; 00162 } |
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Definition at line 67 of file G4Xt.cc. References G4Xt(), and instance.
|
Here is the call graph for this function:
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Definition at line 59 of file G4Xt.cc. Referenced by G4UIXaw::G4UIXaw(), G4UIXm::G4UIXm(), G4UIXm::GetHelpChoice(), G4UIXaw::GetHelpChoice(), G4UIXm::SecondaryLoop(), G4UIXaw::SecondaryLoop(), G4UIXm::SessionStart(), and G4UIXaw::SessionStart().
00063 { 00064 return G4Xt::getInstance (0,NULL,(char*)"Geant4"); 00065 } |
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Implements G4VInteractorManager. Definition at line 144 of file G4Xt.cc. References XtInited.
00148 { 00149 return XtInited; 00150 } |
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Reimplemented from G4VInteractorManager. Definition at line 164 of file G4Xt.cc. References topWidget.
00169 { 00170 if(topWidget==NULL) return; 00171 if(a_string==NULL) return; 00172 Display* dpy = XtDisplay(topWidget); 00173 XrmDatabase dbres = XrmGetStringDatabase (a_string); 00174 if(dbres==NULL) return; 00175 XrmDatabase database = XrmGetDatabase (dpy); 00176 if(database!=NULL) { 00177 XrmMergeDatabases (dbres,&database); 00178 } else { 00179 XrmSetDatabase (dpy,dbres); 00180 } 00181 } |
|
Definition at line 51 of file G4Xt.cc. Referenced by getInstance(), and ~G4Xt(). |