Import Geant4 1.0.0 source tree
This commit is contained in:
@@ -1,19 +1,20 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 GEANT4 collaboration.
|
||||
// the GEANT4 collaboration.
|
||||
//
|
||||
// By copying, distributing or modifying the Program (or any work
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4UIWin32.hh,v 1.3 1999/05/06 15:20:37 barrand Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
// $Id: G4UIWin32.hh,v 1.7.4.1 1999/12/07 20:49:08 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
//
|
||||
#ifndef G4UIWin32_h
|
||||
#define G4UIWin32_h
|
||||
|
||||
#if defined(G4UI_BUILD_WIN32_SESSION) || defined(G4UI_USE_WIN32)
|
||||
|
||||
#include <rw/tvhdict.h>
|
||||
#include "g4std/map"
|
||||
#include "g4std/vector"
|
||||
|
||||
#include "G4VBasicShell.hh"
|
||||
#include "G4VInteractiveSession.hh"
|
||||
@@ -22,19 +23,50 @@
|
||||
|
||||
class G4VInteractorManager;
|
||||
|
||||
class G4UIWin32 : public G4VBasicShell, public G4VInteractiveSession {
|
||||
public:
|
||||
G4UIWin32 (HINSTANCE,HINSTANCE,LPSTR,int);
|
||||
~G4UIWin32 ();
|
||||
// Class description :
|
||||
//
|
||||
// G4UIWin32 : class to handle a Windows interactive session.
|
||||
// G4UIWin32 is the Windows version of G4UIterminal.
|
||||
//
|
||||
// A command box is at disposal for entering/recalling Geant4 commands.
|
||||
// A menubar could be customized through the AddMenu, AddButton methods.
|
||||
// Note that there are corresponding Geant4 commands to add a
|
||||
// menus in the menubar and add buttons in a menu.
|
||||
// Ex :
|
||||
// /interactor/addMenu test Test
|
||||
// /interactor/addButton test Init /run/initialize
|
||||
// /interactor/addButton test "Set gun" "/control/execute gun.g4m"
|
||||
// /interactor/addButton test "Run one event" "/run/beamOn 1"
|
||||
//
|
||||
// Command completion, by typing "tab" key, is available on the
|
||||
// command line.
|
||||
//
|
||||
// Class description - end :
|
||||
|
||||
class G4UIWin32 : public G4VBasicShell, public G4VInteractiveSession {
|
||||
public: // With description
|
||||
G4UIWin32 (HINSTANCE,HINSTANCE,LPSTR,int);
|
||||
// The WinMain arguments have to be given.
|
||||
G4UIsession* SessionStart ();
|
||||
// To enter interactive Win32 loop ; waiting/executing command,...
|
||||
void AddMenu (const char*,const char*);
|
||||
// To add a pulldown menu in the menu bar.
|
||||
// First argument is the name of the menu.
|
||||
// Second argument is the label of the cascade button.
|
||||
// Ex : AddMenu("my_menu","My menu")
|
||||
void AddButton (const char*,const char*,const char*);
|
||||
// To add a push button in a pulldown menu.
|
||||
// First argument is the name of the menu.
|
||||
// Second argument is the label of the button.
|
||||
// Third argument is the Geant4 command executed when the button is fired.
|
||||
// Ex : AddButton("my_menu","Run","/run/beamOn 1");
|
||||
public:
|
||||
~G4UIWin32 ();
|
||||
void Prompt (G4String);
|
||||
void SessionTerminate ();
|
||||
void PauseSessionStart (G4String);
|
||||
G4int ReceiveG4cout(G4String);
|
||||
G4int ReceiveG4cerr(G4String);
|
||||
void AddMenu (const char*,const char*);
|
||||
void AddButton (const char*,const char*,const char*);
|
||||
G4String GetCommand (int);
|
||||
void TextAppendString(char*);
|
||||
private:
|
||||
@@ -46,7 +78,7 @@ private:
|
||||
HWND mainWindow;
|
||||
HWND textWindow,editWindow;
|
||||
HMENU menuBar,defaultMenu;
|
||||
RWTValHashDictionary<int,G4String> commands;
|
||||
G4std::map<int,G4String, G4std::less<int> > commands;
|
||||
void* textBuffer;
|
||||
int textRows,textCols;
|
||||
static LRESULT CALLBACK MainWindowProc(HWND,UINT,WPARAM,LPARAM);
|
||||
@@ -54,7 +86,7 @@ private:
|
||||
static LRESULT CALLBACK EditWindowProc(HWND,UINT,WPARAM,LPARAM);
|
||||
G4bool fHelp;
|
||||
G4int fHelpChoice;
|
||||
RWTValOrderedVector<G4String> fHistory;
|
||||
G4std::vector<G4String> fHistory;
|
||||
int fHistoryPos;
|
||||
};
|
||||
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 GEANT4 collaboration.
|
||||
// the GEANT4 collaboration.
|
||||
//
|
||||
// By copying, distributing or modifying the Program (or any work
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4UIXaw.hh,v 1.2 1999/04/13 01:26:24 yhajime Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
// $Id: G4UIXaw.hh,v 1.3.4.1 1999/12/07 20:49:08 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
//
|
||||
#ifndef G4UIXaw_h
|
||||
#define G4UIXaw_h
|
||||
@@ -20,6 +20,19 @@
|
||||
class G4UIsession;
|
||||
class G4UImanager;
|
||||
|
||||
// Class description :
|
||||
//
|
||||
// G4UIXaw : class to handle an interactive session.
|
||||
// G4UIXaw is the "Athena" version of G4UIterminal.
|
||||
// It has been provided at a time where no free Motif
|
||||
// where available. Now that some exists (lesstif),
|
||||
// G4UIXm should be prefered. The look and feel of
|
||||
// G4UIXaw is hugly...
|
||||
//
|
||||
// No command completion is available.
|
||||
//
|
||||
// Class description - end :
|
||||
|
||||
class G4UIXaw : public G4VBasicShell {
|
||||
public:
|
||||
G4UIXaw(int,char**);
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 GEANT4 collaboration.
|
||||
// the GEANT4 collaboration.
|
||||
//
|
||||
// By copying, distributing or modifying the Program (or any work
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4UIXm.hh,v 1.4 1999/05/11 13:26:29 barrand Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
// $Id: G4UIXm.hh,v 1.8.4.1 1999/12/07 20:49:08 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
//
|
||||
#ifndef G4UIXm_h
|
||||
#define G4UIXm_h
|
||||
|
||||
#if defined(G4UI_BUILD_XM_SESSION) || defined(G4UI_USE_XM)
|
||||
|
||||
#include <rw/tvhdict.h>
|
||||
#include "g4std/map"
|
||||
|
||||
#include <X11/Intrinsic.h>
|
||||
|
||||
@@ -22,18 +22,50 @@
|
||||
|
||||
class G4UIsession;
|
||||
|
||||
// Class description :
|
||||
//
|
||||
// G4UIXm : class to handle a Motif interactive session.
|
||||
// G4UIXm is the Motif version of G4UIterminal.
|
||||
//
|
||||
// A command box is at disposal for entering/recalling Geant4 commands.
|
||||
// A menubar could be customized through the AddMenu, AddButton methods.
|
||||
// Note that there are corresponding Geant4 commands to add a
|
||||
// menus in the menubar and add buttons in a menu.
|
||||
// Ex :
|
||||
// /interactor/addMenu test Test
|
||||
// /interactor/addButton test Init /run/initialize
|
||||
// /interactor/addButton test "Set gun" "/control/execute gun.g4m"
|
||||
// /interactor/addButton test "Run one event" "/run/beamOn 1"
|
||||
//
|
||||
// Command completion, by typing "tab" key, is available on the
|
||||
// command line.
|
||||
//
|
||||
// Class description - end :
|
||||
|
||||
class G4UIXm : public G4VBasicShell, public G4VInteractiveSession {
|
||||
public:
|
||||
public: // With description
|
||||
G4UIXm(int,char**);
|
||||
~G4UIXm();
|
||||
// (argv, argc) or (0, NULL) had to be given.
|
||||
G4UIsession* SessionStart();
|
||||
// To enter interactive X loop ; waiting/executing command,...
|
||||
void AddMenu(const char*,const char*);
|
||||
// To add a pulldown menu in the menu bar.
|
||||
// First argument is the name of the menu.
|
||||
// Second argument is the label of the cascade button.
|
||||
// Ex : AddMenu("my_menu","My menu")
|
||||
void AddButton(const char*,const char*,const char*);
|
||||
// To add a push button in a pulldown menu.
|
||||
// First argument is the name of the menu.
|
||||
// Second argument is the label of the button.
|
||||
// Third argument is the Geant4 command executed when the button is fired.
|
||||
// Ex : AddButton("my_menu","Run","/run/beamOn 1");
|
||||
public:
|
||||
~G4UIXm();
|
||||
void Prompt(G4String);
|
||||
void SessionTerminate();
|
||||
void PauseSessionStart(G4String);
|
||||
G4int ReceiveG4cout(G4String);
|
||||
G4int ReceiveG4cerr(G4String);
|
||||
void AddMenu(const char*,const char*);
|
||||
void AddButton(const char*,const char*,const char*);
|
||||
G4String GetCommand(Widget);
|
||||
private:
|
||||
void SecondaryLoop(G4String);
|
||||
@@ -41,7 +73,7 @@ private:
|
||||
void ExitHelp();
|
||||
private:
|
||||
Widget form,shell,command,menuBar,text;
|
||||
RWTValHashDictionary<Widget,G4String> commands;
|
||||
G4std::map<Widget,G4String, G4std::less<Widget> > commands;
|
||||
static void commandEnteredCallback(Widget,XtPointer,XtPointer);
|
||||
static void keyHandler(Widget,XtPointer,XEvent*,Boolean*);
|
||||
G4bool fHelp;
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 GEANT4 collaboration.
|
||||
// the GEANT4 collaboration.
|
||||
//
|
||||
// By copying, distributing or modifying the Program (or any work
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4UIterminal.hh,v 1.2 1999/04/13 01:26:25 yhajime Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
// $Id: G4UIterminal.hh,v 1.3.4.1 1999/12/07 20:49:08 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
//
|
||||
|
||||
#ifndef G4UIterminal_h
|
||||
@@ -16,17 +16,31 @@
|
||||
#include "G4UImanager.hh"
|
||||
#include <fstream.h>
|
||||
|
||||
// class description:
|
||||
//
|
||||
// This class inherits the class G4UIsession.
|
||||
// This is the class to use a character-terminal sesion.
|
||||
|
||||
class G4UIterminal : public G4VBasicShell
|
||||
{
|
||||
public:
|
||||
public: // with description
|
||||
G4UIterminal();
|
||||
~G4UIterminal();
|
||||
|
||||
G4UIsession * SessionStart();
|
||||
// A character-terminal session "terminalSession" is instantiated.
|
||||
// G4cout stream is redirected by default to the constructed instance.
|
||||
// Usage: G4UIsession * terminalSession = new G4UIterminal;
|
||||
// "terminalSession" is started.
|
||||
// Usage: terminalSession->SessionStart();
|
||||
// "terminalSession" is deleted.
|
||||
// Usage: delete terminalSession;
|
||||
//
|
||||
void PauseSessionStart(G4String);
|
||||
G4int ReceiveG4cout(G4String coutString);
|
||||
G4int ReceiveG4cerr(G4String cerrString);
|
||||
|
||||
// These methods are implementation of corresponding virtual methods
|
||||
// of G4UIsession class.
|
||||
private:
|
||||
G4UImanager * UI;
|
||||
G4String promptCharacter;
|
||||
|
||||
Reference in New Issue
Block a user