#include <G4UIXaw.hh>
Inheritance diagram for G4UIXaw:


Public Member Functions | |
| G4UIXaw (int, char **) | |
| ~G4UIXaw () | |
| G4UIsession * | SessionStart () |
| void | Prompt (G4String) |
| void | SessionTerminate () |
| void | PauseSessionStart (G4String) |
| Widget | GetDialog () |
Private Member Functions | |
| void | SecondaryLoop (G4String) |
| G4bool | GetHelpChoice (G4int &) |
| void | ExitHelp () |
Static Private Member Functions | |
| void | Callback (Widget, XtPointer, XtPointer) |
Private Attributes | |
| Widget | shell |
| Widget | dialog |
| G4bool | fHelp |
| G4int | fHelpChoice |
|
||||||||||||
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Definition at line 56 of file G4UIXaw.cc. References Callback(), dialog, G4Xt::getInstance(), G4VInteractorManager::GetMainInteractor(), and shell.
00060 :fHelp(false) 00061 ,fHelpChoice(0) 00062 /***************************************************************************/ 00064 { 00065 G4UImanager* UI = G4UImanager::GetUIpointer(); 00066 if(UI!=NULL) UI->SetSession(this); 00067 00068 G4Xt* interactorManager = G4Xt::getInstance (argc,argv,(char*)"Xaw"); 00069 Widget top = (Widget)interactorManager->GetMainInteractor(); 00070 00071 shell = XtAppCreateShell ("G4UIXaw","G4UIXaw",topLevelShellWidgetClass,XtDisplay(top),NULL,0); 00072 00073 Arg args[2]; 00074 XtSetArg (args[0],XtNlabel,"G4 command"); 00075 XtSetArg (args[1],XtNvalue,""); // Needed to have a text Area. 00076 dialog = XtCreateManagedWidget ("dialog",dialogWidgetClass,shell,args,2); 00077 00078 XawDialogAddButton (dialog,"Ok",Callback,(XtPointer)this); 00079 00080 XtRealizeWidget (shell); 00081 } |
Here is the call graph for this function:

|
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Definition at line 83 of file G4UIXaw.cc. References shell.
00087 {
00088 XtDestroyWidget (shell);
00089 G4UImanager* UI = G4UImanager::GetUIpointer();
00090 if(UI!=NULL) UI->SetSession(NULL);
00091 }
|
|
||||||||||||||||
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Definition at line 203 of file G4UIXaw.cc. References G4VBasicShell::ApplyShellCommand(), ConvertStringToInt(), dialog, exitHelp, exitPause, exitSession, fHelp, fHelpChoice, and GetDialog(). Referenced by G4UIXaw().
00210 {
00211 G4UIXaw* This = (G4UIXaw*)a_tag;
00212 Widget dialog = This->GetDialog();
00213 char* value = XawDialogGetValueString(dialog);
00214 if(value==NULL) return;
00215 G4String command (value);
00216
00217 if(This->fHelp==true) {
00218 exitHelp = true;
00219 This->fHelp = ConvertStringToInt(command.data(),This->fHelpChoice);
00220 } else {
00221 This->ApplyShellCommand (command,exitSession,exitPause);
00222 }
00223
00224 Arg args[1];
00225 XtSetArg (args[0],XtNvalue,"");
00226 XtSetValues (dialog,args,1);
00227
00228 a_widget = NULL;
00229 a_data = NULL;
00230 }
|
Here is the call graph for this function:

|
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Implements G4VBasicShell. Definition at line 194 of file G4UIXaw.cc.
00198 {
00199 }
|
|
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Definition at line 162 of file G4UIXaw.cc. References dialog. Referenced by Callback().
00166 {
00167 return dialog;
00168 }
|
|
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Implements G4VBasicShell. Definition at line 170 of file G4UIXaw.cc. References G4VInteractorManager::DispatchEvent(), exitHelp, fHelp, fHelpChoice, G4Xt::GetEvent(), G4Xt::getInstance(), and Prompt().
00175 {
00176 fHelp = true;
00177 //
00178 G4Xt* interactorManager = G4Xt::getInstance ();
00179 Prompt("Help");
00180 exitHelp = false;
00181 void* event;
00182 while((event = interactorManager->GetEvent())!=NULL) {
00183 interactorManager->DispatchEvent(event);
00184 if(exitHelp==true) break;
00185 }
00186 Prompt("session");
00187 //
00188 if(fHelp==false) return false;
00189 aInt = fHelpChoice;
00190 fHelp = false;
00191 return true;
00192 }
|
Here is the call graph for this function:

|
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Implements G4VBasicShell. Definition at line 129 of file G4UIXaw.cc. References SecondaryLoop().
00134 {
00135 if(a_state=="G4_pause> ") {
00136 SecondaryLoop ("Pause, type continue to exit this state");
00137 }
00138
00139 if(a_state=="EndOfEvent") {
00140 // Picking with feed back in event data Done here !!!
00141 SecondaryLoop ("End of event, type continue to exit this state");
00142 }
00143 }
|
Here is the call graph for this function:

|
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Definition at line 111 of file G4UIXaw.cc. References dialog. Referenced by GetHelpChoice(), SecondaryLoop(), and SessionStart().
00116 {
00117 Arg args[1];
00118 XtSetArg (args[0],XtNlabel,aPrompt.data());
00119 XtSetValues (dialog,args,1);
00120 }
|
|
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Definition at line 145 of file G4UIXaw.cc. References G4VInteractorManager::DispatchEvent(), exitPause, G4Xt::GetEvent(), G4Xt::getInstance(), and Prompt(). Referenced by PauseSessionStart().
00150 {
00151 G4Xt* interactorManager = G4Xt::getInstance ();
00152 Prompt (a_prompt);
00153 exitPause = false;
00154 void* event;
00155 while((event = interactorManager->GetEvent())!=NULL) {
00156 interactorManager->DispatchEvent(event);
00157 if(exitPause==true) break;
00158 }
00159 Prompt ("session");
00160 }
|
Here is the call graph for this function:

|
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Implements G4VBasicShell. Definition at line 93 of file G4UIXaw.cc. References G4VInteractorManager::DisableSecondaryLoop(), G4VInteractorManager::DispatchEvent(), G4VInteractorManager::EnableSecondaryLoop(), exitSession, G4Xt::GetEvent(), G4Xt::getInstance(), and Prompt().
00097 {
00098 G4Xt* interactorManager = G4Xt::getInstance ();
00099 Prompt ("session");
00100 exitSession = false;
00101 interactorManager->DisableSecondaryLoop ();
00102 void* event;
00103 while((event = interactorManager->GetEvent())!=NULL) {
00104 interactorManager->DispatchEvent(event);
00105 if(exitSession==true) break;
00106 }
00107 interactorManager->EnableSecondaryLoop ();
00108 return this;
00109 }
|
Here is the call graph for this function:

|
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Definition at line 122 of file G4UIXaw.cc.
00126 {
00127 }
|
|
|
Definition at line 69 of file G4UIXaw.hh. Referenced by Callback(), G4UIXaw(), GetDialog(), and Prompt(). |
|
|
Definition at line 70 of file G4UIXaw.hh. Referenced by Callback(), and GetHelpChoice(). |
|
|
Definition at line 71 of file G4UIXaw.hh. Referenced by Callback(), and GetHelpChoice(). |
|
|
Definition at line 69 of file G4UIXaw.hh. Referenced by G4UIXaw(), and ~G4UIXaw(). |
1.3.4