Ignore:
Timestamp:
Oct 6, 2009, 5:03:22 PM (15 years ago)
Author:
garnier
Message:

Geant4 update

Location:
trunk/source/interfaces/basic/include
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/interfaces/basic/include/G4UIExecutive.hh

    r1059 r1117  
    2424// ********************************************************************
    2525//
    26 // $Id: G4UIExecutive.hh,v 1.2 2009/05/15 07:15:16 kmura Exp $
     26// $Id: G4UIExecutive.hh,v 1.3 2009/05/28 06:13:03 kmura Exp $
    2727// GEANT4 tag $Name:  $
    2828//
     
    4242//     ...
    4343//     G4UIExecutive* myapp = new G4UIExecutive(argc, argv);
     44//     if (session->IsGUI())
     45//       // Do any extra for a GUI session
     46//
    4447//     myapp-> SessionStart();
    4548//     ...
     
    5962  G4UIsession* session;
    6063  G4VUIshell* shell;
     64  G4bool isGUI;
    6165
    6266public:
    6367  G4UIExecutive(G4int argc=1, char** argv=0);
    6468  ~G4UIExecutive();
     69
     70  G4bool IsGUI() const;
     71  G4UIsession* GetSession() const;
    6572
    6673  void SetPrompt(const G4String& prompt);
  • trunk/source/interfaces/basic/include/G4UIExecutive.icc

    r1058 r1117  
    2525//
    2626//
    27 // $Id: G4UIExecutive.icc,v 1.2 2009/05/15 07:15:16 kmura Exp $
     27// $Id: G4UIExecutive.icc,v 1.4 2009/05/28 06:13:03 kmura Exp $
    2828// GEANT4 tag $Name:  $
    2929//
     
    5555#endif
    5656
    57 
    5857/////////////////////////////////////////////////////
    59 #if defined(G4UI_USE_XM) || defined(G4UI_USE_WIN32) || defined(G4UI_USE_QT)
     58#if defined(G4UI_USE_XM) || defined(G4UI_USE_QT)
    6059G4UIExecutive::G4UIExecutive(G4int argc, char** argv)
    6160#else
    6261G4UIExecutive::G4UIExecutive(G4int, char**)
    6362#endif
    64   : session(0), shell(0)
     63  : session(0), shell(0),isGUI(false)
    6564/////////////////////////////////////////////////////
    6665{
     
    7170#elif defined(G4UI_USE_XM)
    7271  session = new G4UIXm(argc, argv);
     72  isGUI = true;
    7373
    7474#elif defined(G4UI_USE_WIN32)
     
    7777#elif defined(G4UI_USE_QT)
    7878  session = new G4UIQt(argc, argv);
     79  isGUI = true;
    7980   
    8081#else
     
    8990///////////////////////////////
    9091{
     92}
     93
     94//////////////////////////////////////////
     95inline G4bool G4UIExecutive::IsGUI() const
     96//////////////////////////////////////////
     97{
     98  return isGUI;
     99}
     100
     101/////////////////////////////////////////////////////
     102inline G4UIsession* G4UIExecutive::GetSession() const
     103/////////////////////////////////////////////////////
     104{
     105  return session;
    91106}
    92107
Note: See TracChangeset for help on using the changeset viewer.