Geant4 11.1.1
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4Xt Class Reference

#include <G4Xt.hh>

+ Inheritance diagram for G4Xt:

Public Member Functions

void PutStringInResourceDatabase (char *)
 
G4bool Inited ()
 
void * GetEvent ()
 
void FlushAndWaitExecution ()
 
virtual ~G4Xt ()
 
- Public Member Functions inherited from G4VInteractorManager
 G4VInteractorManager ()
 
virtual ~G4VInteractorManager ()
 
void SetArguments (int, char **)
 
char ** GetArguments (int *)
 
void SetMainInteractor (G4Interactor)
 
G4Interactor GetMainInteractor ()
 
void AddDispatcher (G4DispatchFunction)
 
void RemoveDispatcher (G4DispatchFunction)
 
void AddSecondaryLoopPreAction (G4SecondaryLoopAction)
 
void AddSecondaryLoopPostAction (G4SecondaryLoopAction)
 
void AddShell (G4Interactor)
 
void RemoveShell (G4Interactor)
 
void EnableSecondaryLoop ()
 
void DisableSecondaryLoop ()
 
void SecondaryLoopPreActions ()
 
void SecondaryLoopPostActions ()
 
void RequireExitSecondaryLoop (int)
 
void DispatchEvent (void *)
 
virtual void SecondaryLoop ()
 
int GetExitSecondaryLoopCode ()
 
void PutStringInResourceDatabase (char *)
 
virtual G4bool Inited ()=0
 
virtual void * GetEvent ()=0
 
virtual void FlushAndWaitExecution ()=0
 
void SetParentInteractor (G4Interactor)
 
G4Interactor GetParentInteractor ()
 
void SetCreatedInteractor (G4Interactor)
 
G4Interactor GetCreatedInteractor ()
 
void SetCreationString (char *)
 
char * GetCreationString ()
 

Static Public Member Functions

static G4XtgetInstance ()
 
static G4XtgetInstance (int, char **, char *)
 
static bool xt_dispatch_event (void *a_event)
 

Detailed Description

Definition at line 48 of file G4Xt.hh.

Constructor & Destructor Documentation

◆ ~G4Xt()

G4Xt::~G4Xt ( )
virtual

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Definition at line 132 of file G4Xt.cc.

136{
137 if(this==instance) {
138 instance = NULL;
139 }
140}

Member Function Documentation

◆ FlushAndWaitExecution()

void G4Xt::FlushAndWaitExecution ( )
virtual

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Implements G4VInteractorManager.

Definition at line 181 of file G4Xt.cc.

185{
186 if(topWidget==NULL) return;
187 XSync(XtDisplay(topWidget),False);
188}

◆ GetEvent()

void * G4Xt::GetEvent ( )
virtual

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Implements G4VInteractorManager.

Definition at line 150 of file G4Xt.cc.

154{
155 static XEvent event;
156 if(appContext==NULL) return NULL;
157 if(topWidget==NULL) return NULL;
158 XtAppNextEvent (appContext, &event);
159 return &event;
160}

Referenced by G4UIXm::SessionStart().

◆ getInstance() [1/2]

G4Xt * G4Xt::getInstance ( )
static

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Definition at line 55 of file G4Xt.cc.

59{
60 return G4Xt::getInstance (0,NULL,(char*)"Geant4");
61}
static G4Xt * getInstance()
Definition: G4Xt.cc:55

Referenced by G4UIXm::G4UIXm(), getInstance(), G4OpenGLXmViewer::GetXmConnection(), G4OpenGLXmViewer::misc_callback(), session::session(), G4UIXm::SessionStart(), G4OpenGLXmViewer::ShowView(), and G4OpenGLXmViewer::~G4OpenGLXmViewer().

◆ getInstance() [2/2]

G4Xt * G4Xt::getInstance ( int  a_argn,
char **  a_args,
char *  a_class 
)
static

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Definition at line 63 of file G4Xt.cc.

70{
71 if (instance==NULL) {
72 instance = new G4Xt(a_argn,a_args,a_class);
73 }
74 return instance;
75}
Definition: G4Xt.hh:48

◆ Inited()

G4bool G4Xt::Inited ( )
virtual

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Implements G4VInteractorManager.

Definition at line 142 of file G4Xt.cc.

146{
147 return XtInited;
148}

◆ PutStringInResourceDatabase()

void G4Xt::PutStringInResourceDatabase ( char *  a_string)

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Definition at line 162 of file G4Xt.cc.

167{
168 if(topWidget==NULL) return;
169 if(a_string==NULL) return;
170 Display* dpy = XtDisplay(topWidget);
171 XrmDatabase dbres = XrmGetStringDatabase (a_string);
172 if(dbres==NULL) return;
173 XrmDatabase database = XrmGetDatabase (dpy);
174 if(database!=NULL) {
175 XrmMergeDatabases (dbres,&database);
176 } else {
177 XrmSetDatabase (dpy,dbres);
178 }
179}

Referenced by G4OpenGLXmViewer::GetXmConnection().

◆ xt_dispatch_event()

static bool G4Xt::xt_dispatch_event ( void *  a_event)
inlinestatic

Definition at line 58 of file G4Xt.hh.

58 {
59 return XtDispatchEvent((XEvent*)a_event);
60 }

The documentation for this class was generated from the following files: