32 #ifdef G4VIS_BUILD_OIX_DRIVER
37 #include <Inventor/Xt/SoXt.h>
44 inline bool soxt_dispatch_event(
void* a_event) {
45 return SoXt::dispatchEvent((XEvent*)a_event);
60 RemoveDispatcher(G4Xt::xt_dispatch_event);
64 AddDispatcher(soxt_dispatch_event);
70 if(std::getenv(
"XENVIRONMENT")==NULL) {
71 XrmDatabase database = XrmGetDatabase(XtDisplay(top));
73 XrmPutLineResource(&database,
"*topShadowColor:white");
74 XrmPutLineResource(&database,
"*bottomShadowColor:black");
75 XrmPutLineResource(&database,
"*foreground:black");
76 XrmPutLineResource(&database,
"*background:lightgrey");
77 XrmPutLineResource(&database,
"*borderColor:lightgrey");
78 XrmPutLineResource(&database,
"*fontList:-*-helvetica-bold-r-*-*-*-120-*-*-*-*-iso8859-1");
79 XrmPutLineResource(&database,
"*help_popup.title:Help");
80 XrmPutLineResource(&database,
"*helpCancel.labelString:Cancel");
81 XrmPutLineResource(&database,
"*helpText.editMode:multi_line_edit");
82 XrmPutLineResource(&database,
"*helpText.columns:60");
83 XrmPutLineResource(&database,
"*helpText.rows:20");
84 XrmPutLineResource(&database,
"*helpText.background:white");
85 XrmPutLineResource(&database,
"*helpText.fontList:*courier*-r-*--14-*");
86 XrmPutLineResource(&database,
"*helpText.maxLength:8000");
90 if(!SoXt::getTopLevelWidget())
SoXt::init(top);
101 G4OpenInventorSceneHandler* pScene = (G4OpenInventorSceneHandler*)&scene;
102 return new G4OpenInventorXtViewer (*pScene, name);