37#define NewString(str) \
38 ((str) != NULL ? (strcpy((char*)malloc((unsigned)strlen(str) + 1), str)) : NULL)
46,secondaryLoopEnabled(
TRUE)
47,alreadyInSecondaryLoop(
FALSE)
49,parentInteractor(NULL)
50,createdInteractor(NULL)
97 argv = (
char**)malloc(a_argc *
sizeof(
char*));
100 for(
G4int argi=0;argi<a_argc;argi++) {
113 if(a_argc!=NULL) *a_argc =
argc;
156 if(a_dispatcher==NULL)
return;
167 std::vector<G4DispatchFunction>::iterator it;
169 if (*it == a_dispatcher) {
184 for(
G4int count=0;count<dispatchern;count++) {
187 if(func(a_event)==
true)
return;
198 if(a_preAction==NULL)
return;
209 for(
G4int count=0;count<preActionn;count++) {
220 if(a_postAction==NULL)
return;
231 for(
G4int count=0;count<postActionn;count++) {
246 G4cout <<
"------------------------------------------" <<
G4endl;
247 G4cout <<
"You have entered a viewer secondary X event loop." <<
G4endl;
248 G4cout <<
"Quit it with an 'Escape' viewer button" <<
G4endl;
256 if(event==NULL)
break;
272 if(a_code==0) a_code = 1;
293 if(a_shell==NULL)
return;
295 shells.push_back(a_shell);
304 std::vector<G4Interactor>::iterator it;
306 if (*it == a_shell) {
G4bool(* G4DispatchFunction)(void *)
void(* G4SecondaryLoopAction)()
G4GLOB_DLL std::ostream G4cout
void AddDispatcher(G4DispatchFunction)
char ** GetArguments(int *)
void SetCreatedInteractor(G4Interactor)
void SetMainInteractor(G4Interactor)
void AddSecondaryLoopPostAction(G4SecondaryLoopAction)
void SetParentInteractor(G4Interactor)
void EnableSecondaryLoop()
G4Interactor parentInteractor
virtual void SecondaryLoop()
G4Interactor GetMainInteractor()
virtual ~G4VInteractorManager()
G4Interactor createdInteractor
G4Interactor GetParentInteractor()
void DisableSecondaryLoop()
std::vector< G4DispatchFunction > dispatchers
char * GetCreationString()
G4Interactor GetCreatedInteractor()
void SecondaryLoopPostActions()
int GetExitSecondaryLoopCode()
std::vector< G4SecondaryLoopAction > preActions
virtual void * GetEvent()=0
std::vector< G4SecondaryLoopAction > postActions
void SecondaryLoopPreActions()
G4bool secondaryLoopEnabled
void RemoveShell(G4Interactor)
G4Interactor mainInteractor
void DispatchEvent(void *)
void RemoveDispatcher(G4DispatchFunction)
std::vector< G4Interactor > shells
virtual G4bool Inited()=0
G4bool alreadyInSecondaryLoop
void AddSecondaryLoopPreAction(G4SecondaryLoopAction)
void SetCreationString(char *)
void SetArguments(int, char **)
void RequireExitSecondaryLoop(int)
void AddShell(G4Interactor)