35 #ifdef G4VIS_BUILD_OIX_DRIVER
40 #include <Inventor/Xt/SoXt.h>
48 inline bool soxt_dispatch_event(
void* a_event) {
49 return SoXt::dispatchEvent((XEvent*)a_event);
66 RemoveDispatcher(G4Xt::xt_dispatch_event);
70 AddDispatcher(soxt_dispatch_event);
75 G4cout <<
"TOP LEVEL WIDGET FOR SoXt::init() = " << top <<
G4endl;
77 if(std::getenv(
"XENVIRONMENT")==NULL) {
78 XrmDatabase database = XrmGetDatabase(XtDisplay(top));
80 XrmPutLineResource(&database,
"*topShadowColor:white");
81 XrmPutLineResource(&database,
"*bottomShadowColor:black");
82 XrmPutLineResource(&database,
"*foreground:black");
83 XrmPutLineResource(&database,
"*background:lightgrey");
84 XrmPutLineResource(&database,
"*borderColor:lightgrey");
85 XrmPutLineResource(&database,
"*fontList:-*-helvetica-bold-r-*-*-*-120-*-*-*-*-iso8859-1");
86 XrmPutLineResource(&database,
"*help_popup.title:Help");
87 XrmPutLineResource(&database,
"*helpCancel.labelString:Cancel");
88 XrmPutLineResource(&database,
"*helpText.editMode:multi_line_edit");
89 XrmPutLineResource(&database,
"*helpText.columns:60");
90 XrmPutLineResource(&database,
"*helpText.rows:20");
91 XrmPutLineResource(&database,
"*helpText.background:white");
92 XrmPutLineResource(&database,
"*helpText.fontList:*courier*-r-*--14-*");
93 XrmPutLineResource(&database,
"*helpText.maxLength:8000");
97 if(!SoXt::getTopLevelWidget())
SoXt::init(top);
110 G4OpenInventorSceneHandler* pScene = (G4OpenInventorSceneHandler*)&scene;
111 return new G4OpenInventorXtExtendedViewer (*pScene, name);