Import Geant4 5.2.0 source tree
This commit is contained in:
@@ -21,11 +21,11 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4UIArrayString.cc,v 1.6 2002/10/17 02:40:24 murakami Exp $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
// $Id: G4UIArrayString.cc,v 1.7 2003/06/16 16:55:58 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-02 $
|
||||
//
|
||||
|
||||
#include "g4std/iomanip"
|
||||
#include <iomanip>
|
||||
#include "G4UIArrayString.hh"
|
||||
|
||||
static const char strESC= '\033';
|
||||
@@ -179,12 +179,12 @@ void G4UIArrayString::Show(G4int ncol)
|
||||
colorWord= word(0,5);
|
||||
word.erase(0,5);
|
||||
}
|
||||
if(!colorWord.empty()) G4cout << colorWord << G4std::flush;
|
||||
if(!colorWord.empty()) G4cout << colorWord << std::flush;
|
||||
|
||||
G4cout << G4std::setiosflags(G4std::ios::left) << G4std::setw(GetNField(ix))
|
||||
<< word.c_str() << G4std::flush;
|
||||
G4cout << std::setiosflags(std::ios::left) << std::setw(GetNField(ix))
|
||||
<< word.c_str() << std::flush;
|
||||
// against problem w/ g++ iostream
|
||||
if(ix != nc) G4cout << " " << G4std::flush;
|
||||
if(ix != nc) G4cout << " " << std::flush;
|
||||
else G4cout << G4endl;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4UIWin32.cc,v 1.7 2001/07/11 10:01:21 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
// $Id: G4UIWin32.cc,v 1.9 2003/06/16 16:55:59 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-02 $
|
||||
//
|
||||
// G.Barrand
|
||||
|
||||
@@ -32,11 +32,7 @@
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include <windows.h>
|
||||
#include <windowsx.h>
|
||||
#include <wingdi.h>
|
||||
|
||||
#include "g4std/strstream"
|
||||
#include <strstream>
|
||||
|
||||
#include "G4UImanager.hh"
|
||||
#include "G4StateManager.hh"
|
||||
@@ -46,6 +42,8 @@
|
||||
|
||||
#include "G4UIWin32.hh"
|
||||
|
||||
#include <wingdi.h>
|
||||
|
||||
#define TEXT_MAX_LINES 300
|
||||
|
||||
class TextBuffer {
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4UIXaw.cc,v 1.5 2002/11/06 08:12:37 barrand Exp $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
// GEANT4 tag $Name: geant4-05-02 $
|
||||
//
|
||||
// G.Barrand
|
||||
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4UIXm.cc,v 1.8 2002/11/06 08:12:37 barrand Exp $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
// $Id: G4UIXm.cc,v 1.11 2003/06/16 16:56:00 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-02 $
|
||||
//
|
||||
// G.Barrand
|
||||
|
||||
@@ -30,7 +30,8 @@
|
||||
|
||||
#ifdef G4UI_BUILD_XM_SESSION
|
||||
|
||||
#include "g4std/strstream"
|
||||
#include "G4Types.hh"
|
||||
#include <strstream>
|
||||
|
||||
#include <string.h>
|
||||
|
||||
@@ -365,7 +366,7 @@ void G4UIXm::keyHandler (
|
||||
Widget a_widget
|
||||
,XtPointer a_tag
|
||||
,XEvent* a_event
|
||||
,Boolean* a_dispatch
|
||||
,Boolean*
|
||||
)
|
||||
/***************************************************************************/
|
||||
/*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/
|
||||
@@ -382,7 +383,7 @@ void G4UIXm::keyHandler (
|
||||
}
|
||||
/***************************************************************************/
|
||||
void clearButtonCallback (
|
||||
Widget a_widget
|
||||
Widget
|
||||
,XtPointer a_tag
|
||||
,XtPointer
|
||||
)
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4UIcsh.cc,v 1.6 2002/02/26 02:09:08 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
// $Id: G4UIcsh.cc,v 1.7 2003/06/16 16:56:01 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-02 $
|
||||
//
|
||||
|
||||
#include "G4UIcsh.hh"
|
||||
@@ -46,7 +46,7 @@ G4String G4UIcsh::GetCommandLine(const char* msg)
|
||||
//////////////////////////////////
|
||||
{
|
||||
MakePrompt(msg);
|
||||
G4cout << promptString << G4std::flush;
|
||||
G4cout << promptString << std::flush;
|
||||
|
||||
G4String newCommand;
|
||||
newCommand.readLine(G4cin, FALSE);
|
||||
|
||||
@@ -21,14 +21,15 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4UItcsh.cc,v 1.8 2002/10/17 02:41:22 murakami Exp $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
// $Id: G4UItcsh.cc,v 1.10 2003/06/16 16:56:02 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-02 $
|
||||
//
|
||||
|
||||
#ifndef WIN32
|
||||
|
||||
#include <ctype.h>
|
||||
#include "g4std/strstream"
|
||||
#include "G4Types.hh"
|
||||
#include <strstream>
|
||||
#include "G4StateManager.hh"
|
||||
#include "G4UIcommandStatus.hh"
|
||||
#include "G4UItcsh.hh"
|
||||
@@ -107,7 +108,7 @@ void G4UItcsh::MakePrompt(const char* msg)
|
||||
case 'h': // history#
|
||||
{
|
||||
char st[20];
|
||||
G4std::ostrstream os(st,20);
|
||||
std::ostrstream os(st,20);
|
||||
os << currentHistoryNo << '\0';
|
||||
promptString.append(st);
|
||||
i++;
|
||||
@@ -150,7 +151,7 @@ void G4UItcsh::InsertCharacter(char cc)
|
||||
G4cout << commandLine[i];
|
||||
for(i=cursorPosition-1; i<commandLine.length() ;i++)
|
||||
G4cout << AsciiBS;
|
||||
G4cout << G4std::flush;
|
||||
G4cout << std::flush;
|
||||
|
||||
// command line string...
|
||||
if(IsCursorLast()) { // add
|
||||
@@ -169,7 +170,7 @@ void G4UItcsh::BackspaceCharacter()
|
||||
|
||||
// display...
|
||||
if(IsCursorLast()) {
|
||||
G4cout << AsciiBS << ' ' << AsciiBS << G4std::flush;
|
||||
G4cout << AsciiBS << ' ' << AsciiBS << std::flush;
|
||||
} else {
|
||||
G4cout << AsciiBS;
|
||||
size_t i;
|
||||
@@ -180,7 +181,7 @@ void G4UItcsh::BackspaceCharacter()
|
||||
for(i=cursorPosition-2; i< commandLine.length() ;i++){
|
||||
G4cout << AsciiBS;
|
||||
}
|
||||
G4cout << G4std::flush;
|
||||
G4cout << std::flush;
|
||||
}
|
||||
|
||||
// command line string...
|
||||
@@ -204,7 +205,7 @@ void G4UItcsh::DeleteCharacter()
|
||||
for(i=cursorPosition-1; i< commandLine.length() ;i++){
|
||||
G4cout << AsciiBS;
|
||||
}
|
||||
G4cout << G4std::flush;
|
||||
G4cout << std::flush;
|
||||
|
||||
// command lin string...
|
||||
commandLine.erase(cursorPosition-1, 1);
|
||||
@@ -219,7 +220,7 @@ void G4UItcsh::ClearLine()
|
||||
for(i= cursorPosition; i>=2; i--) G4cout << AsciiBS;
|
||||
for(i=1; i<=G4int(commandLine.length()); i++) G4cout << ' ';
|
||||
for(i=1; i<=G4int(commandLine.length()); i++) G4cout << AsciiBS;
|
||||
G4cout << G4std::flush;
|
||||
G4cout << std::flush;
|
||||
|
||||
// command line string...
|
||||
commandLine.erase();
|
||||
@@ -236,7 +237,7 @@ void G4UItcsh::ClearAfterCursor()
|
||||
G4int i;
|
||||
for(i=cursorPosition; i<=G4int(commandLine.length()); i++) G4cout << ' ';
|
||||
for(i=commandLine.length(); i>=cursorPosition; i--) G4cout << AsciiBS;
|
||||
G4cout << G4std::flush;
|
||||
G4cout << std::flush;
|
||||
|
||||
// command line string...
|
||||
commandLine.erase(cursorPosition-1,
|
||||
@@ -250,10 +251,10 @@ void G4UItcsh::ClearScreen()
|
||||
if(! clearString.empty() ) {
|
||||
G4cout << clearString;
|
||||
|
||||
G4cout << promptString << commandLine << G4std::flush;
|
||||
G4cout << promptString << commandLine << std::flush;
|
||||
// reset cursur position
|
||||
for(G4int i=commandLine.length()+1; i>=cursorPosition+1; i--)
|
||||
G4cout << AsciiBS << G4std::flush;
|
||||
G4cout << AsciiBS << std::flush;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -263,7 +264,7 @@ void G4UItcsh::ForwardCursor()
|
||||
{
|
||||
if(IsCursorLast()) return;
|
||||
|
||||
G4cout << commandLine[(size_t)(cursorPosition-1)] << G4std::flush;
|
||||
G4cout << commandLine[(size_t)(cursorPosition-1)] << std::flush;
|
||||
cursorPosition++;
|
||||
}
|
||||
|
||||
@@ -274,7 +275,7 @@ void G4UItcsh::BackwardCursor()
|
||||
if(cursorPosition==1) return;
|
||||
|
||||
cursorPosition--;
|
||||
G4cout << AsciiBS << G4std::flush;
|
||||
G4cout << AsciiBS << std::flush;
|
||||
}
|
||||
|
||||
//////////////////////////////
|
||||
@@ -284,7 +285,7 @@ void G4UItcsh::MoveCursorTop()
|
||||
for(G4int i=cursorPosition; i>1; i--){
|
||||
G4cout << AsciiBS;
|
||||
}
|
||||
G4cout << G4std::flush;
|
||||
G4cout << std::flush;
|
||||
cursorPosition=1;
|
||||
}
|
||||
|
||||
@@ -295,7 +296,7 @@ void G4UItcsh::MoveCursorEnd()
|
||||
for(size_t i=cursorPosition-1; i<commandLine.length(); i++){
|
||||
G4cout << commandLine[i];
|
||||
}
|
||||
G4cout << G4std::flush;
|
||||
G4cout << std::flush;
|
||||
cursorPosition=commandLine.length()+1;
|
||||
}
|
||||
|
||||
@@ -314,7 +315,7 @@ void G4UItcsh::PreviousCommand()
|
||||
relativeHistoryIndex--;
|
||||
commandLine= RestoreHistory(currentHistoryNo+relativeHistoryIndex);
|
||||
|
||||
G4cout << commandLine << G4std::flush;
|
||||
G4cout << commandLine << std::flush;
|
||||
cursorPosition= commandLine.length()+1;
|
||||
}
|
||||
}
|
||||
@@ -333,7 +334,7 @@ void G4UItcsh::NextCommand()
|
||||
if(relativeHistoryIndex==0) commandLine= commandLineBuf;
|
||||
else commandLine= RestoreHistory(currentHistoryNo+relativeHistoryIndex);
|
||||
|
||||
G4cout << commandLine << G4std::flush;
|
||||
G4cout << commandLine << std::flush;
|
||||
cursorPosition= commandLine.length()+1;
|
||||
}
|
||||
}
|
||||
@@ -375,7 +376,7 @@ void G4UItcsh::ListMatchedCommand()
|
||||
// list matched dirs/commands
|
||||
ListCommand(vpath, vpath+vcmd);
|
||||
|
||||
G4cout << promptString << commandLine << G4std::flush;
|
||||
G4cout << promptString << commandLine << std::flush;
|
||||
}
|
||||
|
||||
////////////////////////////////
|
||||
@@ -473,7 +474,7 @@ void G4UItcsh::CompleteCommand()
|
||||
for(i=jt; i<=G4int(input.length())-1; i++) dspstr+= G4String(AsciiBS);
|
||||
|
||||
dspstr+= stream;
|
||||
G4cout << dspstr << G4std::flush;
|
||||
G4cout << dspstr << std::flush;
|
||||
|
||||
// command line string
|
||||
input.remove(jt);
|
||||
@@ -597,7 +598,7 @@ G4String G4UItcsh::GetCommandLine(const char* msg)
|
||||
MakePrompt(msg); // update
|
||||
relativeHistoryIndex= 0;
|
||||
|
||||
G4cout << promptString << G4std::flush;
|
||||
G4cout << promptString << std::flush;
|
||||
|
||||
G4String newCommand= ReadLine(); // read line...
|
||||
// multi-line
|
||||
@@ -606,7 +607,7 @@ G4String G4UItcsh::GetCommandLine(const char* msg)
|
||||
newCommand.remove(newCommand.length()-1);
|
||||
G4cout << G4endl;
|
||||
promptString= "? ";
|
||||
G4cout << promptString << G4std::flush;
|
||||
G4cout << promptString << std::flush;
|
||||
G4String newLine= ReadLine();
|
||||
newCommand.append(newLine);
|
||||
}
|
||||
|
||||
@@ -21,11 +21,12 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4UIterminal.cc,v 1.17 2001/11/26 19:15:08 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
// $Id: G4UIterminal.cc,v 1.19 2003/06/16 16:56:03 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-02 $
|
||||
//
|
||||
|
||||
#include "g4std/strstream"
|
||||
#include "G4Types.hh"
|
||||
#include <strstream>
|
||||
#include "G4StateManager.hh"
|
||||
#include "G4UIcommandTree.hh"
|
||||
#include "G4UIcommand.hh"
|
||||
@@ -204,7 +205,7 @@ G4String G4UIterminal::GetCommand(const char* msg)
|
||||
G4String ss= nC(1, nC.length()-1);
|
||||
G4int vl;
|
||||
const char* tt= ss;
|
||||
G4std::istrstream is((char*)tt);
|
||||
std::istrstream is((char*)tt);
|
||||
is >> vl;
|
||||
G4int nh= UI-> GetNumberOfHistory();
|
||||
if(vl>=0 && vl<nh) {
|
||||
@@ -245,7 +246,7 @@ G4String G4UIterminal::GetCommand(const char* msg)
|
||||
G4int G4UIterminal::ReceiveG4cout(G4String coutString)
|
||||
//////////////////////////////////////////////////////
|
||||
{
|
||||
G4std::cout << coutString << G4std::flush;
|
||||
std::cout << coutString << std::flush;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -253,7 +254,7 @@ G4int G4UIterminal::ReceiveG4cout(G4String coutString)
|
||||
G4int G4UIterminal::ReceiveG4cerr(G4String cerrString)
|
||||
//////////////////////////////////////////////////////
|
||||
{
|
||||
G4std::cerr << cerrString << G4std::flush;
|
||||
std::cerr << cerrString << std::flush;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VUIshell.cc,v 1.7 2002/04/26 21:28:26 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
// $Id: G4VUIshell.cc,v 1.8 2003/06/16 16:56:04 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-02 $
|
||||
//
|
||||
|
||||
#include "G4UImanager.hh"
|
||||
@@ -298,7 +298,7 @@ void G4VUIshell::ListCommand(const G4String& dir,
|
||||
// waring : not matched
|
||||
if(!isMatch && candidate.empty())
|
||||
G4cout << "<" << input
|
||||
<< ">: No such directory or command" << G4std::flush;
|
||||
<< ">: No such directory or command" << std::flush;
|
||||
|
||||
// display
|
||||
G4UIArrayString arrayString(stream);
|
||||
|
||||
Reference in New Issue
Block a user