38 #define NewString(str) \
39 ((str) != NULL ? (strcpy((char*)malloc((unsigned)strlen(str) + 1), str)) : NULL)
47 ,secondaryLoopEnabled(
TRUE)
48 ,alreadyInSecondaryLoop(
FALSE)
50 ,parentInteractor(NULL)
51 ,createdInteractor(NULL)
98 argv = (
char**)malloc(a_argc *
sizeof(
char*));
101 for(
G4int argi=0;argi<a_argc;argi++) {
114 if(a_argc!=NULL) *a_argc =
argc;
157 if(a_dispatcher==NULL)
return;
168 std::vector<G4DispatchFunction>::iterator it;
170 if (*it == a_dispatcher) {
185 for(
G4int count=0;count<dispatchern;count++) {
188 if(func(a_event)==
true)
return;
199 if(a_preAction==NULL)
return;
210 for(
G4int count=0;count<preActionn;count++) {
221 if(a_postAction==NULL)
return;
232 for(
G4int count=0;count<postActionn;count++) {
247 G4cout <<
"------------------------------------------" <<
G4endl;
248 G4cout <<
"You have entered a viewer secondary X event loop." <<
G4endl;
249 G4cout <<
"Quit it with an 'Escape' viewer button" <<
G4endl;
257 if(event==NULL)
break;
273 if(a_code==0) a_code = 1;
294 if(a_shell==NULL)
return;
296 shells.push_back(a_shell);
305 std::vector<G4Interactor>::iterator it;
307 if (*it == a_shell) {
void RemoveShell(G4Interactor)
void(* G4SecondaryLoopAction)()
std::vector< G4Interactor > shells
char * GetCreationString()
void SecondaryLoopPostActions()
void DisableSecondaryLoop()
G4Interactor GetMainInteractor()
void SetCreationString(char *)
G4Interactor createdInteractor
void AddShell(G4Interactor)
int GetExitSecondaryLoopCode()
virtual G4bool Inited()=0
char ** GetArguments(int *)
virtual ~G4VInteractorManager()
void SetMainInteractor(G4Interactor)
G4bool secondaryLoopEnabled
void AddSecondaryLoopPostAction(G4SecondaryLoopAction)
G4bool(* G4DispatchFunction)(void *)
void SetCreatedInteractor(G4Interactor)
G4GLOB_DLL std::ostream G4cout
std::vector< G4SecondaryLoopAction > postActions
void SetParentInteractor(G4Interactor)
virtual void * GetEvent()=0
void SetArguments(int, char **)
void AddSecondaryLoopPreAction(G4SecondaryLoopAction)
void AddDispatcher(G4DispatchFunction)
void EnableSecondaryLoop()
std::vector< G4SecondaryLoopAction > preActions
G4Interactor GetParentInteractor()
void RemoveDispatcher(G4DispatchFunction)
G4bool alreadyInSecondaryLoop
void SecondaryLoopPreActions()
std::vector< G4DispatchFunction > dispatchers
void RequireExitSecondaryLoop(int)
G4Interactor GetCreatedInteractor()
G4Interactor mainInteractor
void DispatchEvent(void *)
G4Interactor parentInteractor