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 SecondaryLoopPostActions()
void DisableSecondaryLoop()
void EnableSecondaryLoop()
std::vector< G4SecondaryLoopAction > preActions
G4bool alreadyInSecondaryLoop
void AddShell(G4Interactor)
void RemoveShell(G4Interactor)
G4Interactor GetParentInteractor()
void(* G4SecondaryLoopAction)()
virtual void * GetEvent()=0
G4Interactor parentInteractor
G4Interactor GetCreatedInteractor()
void SetCreatedInteractor(G4Interactor)
void AddSecondaryLoopPreAction(G4SecondaryLoopAction)
void AddDispatcher(G4DispatchFunction)
char * GetCreationString()
void SetCreationString(char *)
void SetParentInteractor(G4Interactor)
std::vector< G4Interactor > shells
virtual ~G4VInteractorManager()
int GetExitSecondaryLoopCode()
void SetMainInteractor(G4Interactor)
void DispatchEvent(void *)
G4bool(* G4DispatchFunction)(void *)
virtual G4bool Inited()=0
G4Interactor createdInteractor
G4bool secondaryLoopEnabled
G4GLOB_DLL std::ostream G4cout
std::vector< G4SecondaryLoopAction > postActions
G4Interactor GetMainInteractor()
G4Interactor mainInteractor
void SetArguments(int, char **)
char ** GetArguments(int *)
void RequireExitSecondaryLoop(int)
void RemoveDispatcher(G4DispatchFunction)
std::vector< G4DispatchFunction > dispatchers
void AddSecondaryLoopPostAction(G4SecondaryLoopAction)
void SecondaryLoopPreActions()