Geant4 11.2.2
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 *)
 
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 120 of file G4Xt.cc.

123{
124 if (this == instance) {
125 instance = NULL;
126 }
127}

Member Function Documentation

◆ FlushAndWaitExecution()

void G4Xt::FlushAndWaitExecution ( )
virtual

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

Implements G4VInteractorManager.

Definition at line 165 of file G4Xt.cc.

168{
169 if (topWidget == NULL) return;
170 XSync(XtDisplay(topWidget), False);
171}

◆ GetEvent()

void * G4Xt::GetEvent ( )
virtual

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

Implements G4VInteractorManager.

Definition at line 136 of file G4Xt.cc.

139{
140 static XEvent event;
141 if (appContext == NULL) return NULL;
142 if (topWidget == NULL) return NULL;
143 XtAppNextEvent(appContext, &event);
144 return &event;
145}

Referenced by G4UIXm::SessionStart().

◆ getInstance() [1/2]

G4Xt * G4Xt::getInstance ( )
static

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

Definition at line 54 of file G4Xt.cc.

57{
58 return G4Xt::getInstance(0, NULL, (char*)"Geant4");
59}
static G4Xt * getInstance()
Definition G4Xt.cc:54

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 61 of file G4Xt.cc.

64{
65 if (instance == NULL) {
66 instance = new G4Xt(a_argn, a_args, a_class);
67 }
68 return instance;
69}
Definition G4Xt.hh:49

◆ Inited()

G4bool G4Xt::Inited ( )
virtual

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

Implements G4VInteractorManager.

Definition at line 129 of file G4Xt.cc.

132{
133 return XtInited;
134}

◆ PutStringInResourceDatabase()

void G4Xt::PutStringInResourceDatabase ( char * a_string)

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

Definition at line 147 of file G4Xt.cc.

150{
151 if (topWidget == NULL) return;
152 if (a_string == NULL) return;
153 Display* dpy = XtDisplay(topWidget);
154 XrmDatabase dbres = XrmGetStringDatabase(a_string);
155 if (dbres == NULL) return;
156 XrmDatabase database = XrmGetDatabase(dpy);
157 if (database != NULL) {
158 XrmMergeDatabases(dbres, &database);
159 }
160 else {
161 XrmSetDatabase(dpy, dbres);
162 }
163}

Referenced by G4OpenGLXmViewer::GetXmConnection().

◆ xt_dispatch_event()

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

Definition at line 59 of file G4Xt.hh.

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

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