Ignore:
Timestamp:
Dec 3, 2008, 7:03:25 PM (16 years ago)
Author:
garnier
Message:

suppres des debug et modif des WinSize

Location:
trunk/source/visualization/management
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/visualization/management/include/G4ViewParameters.hh

    r896 r897  
    156156        G4int            GetWindowAbsoluteLocationHintX (G4int) const;
    157157        G4int            GetWindowAbsoluteLocationHintY (G4int) const;
    158         G4int            GetWindowSizeHintX      () const;
    159         G4int            GetWindowSizeHintY      () const;
     158        unsigned int     GetWindowSizeHintX      () const;
     159        unsigned int     GetWindowSizeHintY      () const;
    160160        G4int            GetWindowLocationHintX  () const;
    161161        G4int            GetWindowLocationHintY  () const;
    162162  const G4String&        GetXGeometryString      () const;
    163   // If non-null, can be interpreted with XParseGeometry (see man
    164   // pages).  Supercedes GetWindowSizeHintX/Y.
     163  // GetXGeometryString is intended to be parsed by XParseGeometry.
     164  // It contains the size information, as in GetWindowSizeHint, but
     165  // may also contain the window position, e.g., "600x600-0+200.  The
     166  // viewer should use this in preference to GetWindowSizeHint, since
     167  // it contains more information.  (The size information in
     168  // GetXGeometryString and GetWindowSizeHint is guaranteed to be
     169  // identical.)
    165170        G4bool           IsAutoRefresh           () const;
    166171  const G4Colour&        GetBackgroundColour     () const;
  • trunk/source/visualization/management/include/G4ViewParameters.icc

    r896 r897  
    162162}
    163163
    164 inline G4int G4ViewParameters::GetWindowSizeHintX () const {
     164inline unsigned int G4ViewParameters::GetWindowSizeHintX () const {
    165165  return fWindowSizeHintX;
    166166}
    167167
    168 inline G4int G4ViewParameters::GetWindowSizeHintY () const {
     168inline unsigned int G4ViewParameters::GetWindowSizeHintY () const {
    169169  return fWindowSizeHintY;
    170170}
    171171
    172172inline G4int G4ViewParameters::GetWindowLocationHintX () const {
    173 #ifdef G4DEBUG
    174         printf("G4ViewParameters::GetWindowLocationHintX () :: %d\n",fWindowLocationHintX);
    175 #endif
    176173  return fWindowLocationHintX;
    177174}
    178175
    179176inline G4int G4ViewParameters::GetWindowLocationHintY () const {
    180 #ifdef G4DEBUG
    181         printf("G4ViewParameters::GetWindowLocationHintY () :: %d\n",fWindowLocationHintY);
    182 #endif
    183177  return fWindowLocationHintY;
    184178}
     
    343337
    344338inline void G4ViewParameters::SetWindowLocationHint (G4int xHint, G4int yHint) {
    345 #ifdef G4DEBUG
    346         printf("G4ViewParameters::SetWindowLocationHint () :: %d %d\n",xHint,yHint);
    347 #endif
    348339  fWindowLocationHintX = xHint;
    349340  fWindowLocationHintY = yHint;
  • trunk/source/visualization/management/include/G4VisManager.hh

    r896 r897  
    353353  const G4SceneList&           GetSceneList                () const;
    354354  Verbosity                    GetVerbosity                () const;
    355   void  GetWindowSizeHint (G4int& xHint, G4int& yHint) const;
    356   // Note: GetWindowSizeHint information is returned via the G4int& arguments.
    357   void  GetWindowLocationHint (G4int& xHint, G4int& yHint) const;
    358   const G4String&              GetXGeometryString          () const;
    359   // GetXGeometryString is intended to be parsed by XParseGeometry.
    360   // It contains the size information, as in GetWindowSizeHint, but
    361   // may also contain the window position, e.g., "600x600-0+200.  The
    362   // viewer should use this in preference to GetWindowSizeHint, since
    363   // it contains more information.  (The size information in
    364   // GetXGeometryString and GetWindowSizeHint is guaranteed to be
    365   // identical.)
    366355  G4bool                       GetTransientsDrawnThisRun       () const;
    367356  G4bool                       GetTransientsDrawnThisEvent     () const;
     
    381370  void              SetVerboseLevel             (const G4String&);
    382371  void              SetVerboseLevel             (Verbosity);
    383   void              SetWindowSizeHint           (G4int xHint, G4int yHint);
    384   void              SetWindowLocationHint           (G4int xHint, G4int yHint);
    385   void              SetXGeometryString          (const G4String&);
    386372  void              SetEventRefreshing          (G4bool);
    387373  void              ResetTransientsDrawnFlags   ();
     
    458444  std::vector<G4UIcommand*>   fDirectoryList;
    459445  G4VisStateDependent*  fpStateDependent;   // Friend state dependent class.
    460   G4int fWindowSizeHintX, fWindowSizeHintY; // For viewer...
    461   G4int fWindowLocationHintX, fWindowLocationHintY; // For viewer...
    462   G4String              fXGeometryString;   // ...construction.
    463446  G4TrajectoriesModel   dummyTrajectoriesModel;  // For passing drawing mode.
    464447  G4bool                fEventRefreshing;
  • trunk/source/visualization/management/src/G4ViewParameters.cc

    r896 r897  
    8787  fPicking (false)
    8888{
    89 #ifdef G4DEBUG
    90   printf("G4ViewParameters::Create \n");
    91 #endif
    9289  fDefaultMarker.SetScreenSize (5.);
    9390  // Markers are 5 pixels "overall" size, i.e., diameter.
  • trunk/source/visualization/management/src/G4VisCommandsViewer.cc

    r896 r897  
    488488////////////// /vis/viewer/create ///////////////////////////////////////
    489489
    490 G4VisCommandViewerCreate::G4VisCommandViewerCreate ():
    491   fId (0)
    492  {
     490G4VisCommandViewerCreate::G4VisCommandViewerCreate (): fId (0) {
    493491  G4bool omitable;
    494492  fpCommand = new G4UIcommand ("/vis/viewer/create", this);
     
    638636  }
    639637
    640 
    641   // Parse windowSizeHintString to extract first field for backwards
    642   // compatibility...
    643   std::istringstream issw;
    644   G4int windowSizeHint;
    645   size_t i;
    646 #ifdef G4DEBUG
    647     printf("G4VisCommandViewerCreate::SetNewValue string\n");
    648 #endif
    649   for (i = 0; i < windowSizeHintString.size(); ++i) {
    650     char c = windowSizeHintString[i];
    651 #ifdef G4DEBUG
    652     printf("%c",c);
    653 #endif
    654     if (c == 'x' || c == 'X' || c == '+' || c == '-') break;
    655   }
    656 #ifdef G4DEBUG
    657     printf("\n");
    658 #endif
    659   if (i != windowSizeHintString.size()) {
    660     // x or X or + or - found - must be a X-Window-type geometry string...
    661     // Pick out the first field for backwards compatibility...
    662     issw.str(windowSizeHintString.substr(0,i));
    663     issw >> windowSizeHint;
    664   } else { // ...old-style integer...
    665     issw.str(windowSizeHintString);
    666     if (!(issw >> windowSizeHint)) {
    667       if (verbosity >= G4VisManager::errors) {
    668         G4cout << "ERROR: Unrecognised geometry string \""
    669                << windowSizeHintString
    670                << "\".  Using 600."
    671                << G4endl;
    672       }
    673       windowSizeHint = 600;
    674     }
    675     // Reconstitute windowSizeHintString...
    676     std::ostringstream ossw;
    677     ossw << windowSizeHint << 'x' << windowSizeHint;
    678     windowSizeHintString = ossw.str();
    679   }
    680638  // WindowSizeHint and XGeometryString are picked up from the vis
    681   // manager in the G4VViewer constructor.  They have to be held by
    682   // the vis manager until the viewer is contructed - next line...
     639  // manager in the G4VViewer constructor. In G4VisManager, after Viewer
     640  // creation, we will store theses parameters in G4ViewParameters.
    683641
    684642  fpVisManager -> CreateViewer (newName,windowSizeHintString);
     
    15281486  SetViewParameters(currentViewer, vp);
    15291487}
    1530 
    1531 
  • trunk/source/visualization/management/src/G4VisManager.cc

    r896 r897  
    199199
    200200void G4VisManager::Initialise () {
    201 #ifdef G4DEBUG
    202   printf("G4VisManager::Initialise\n");
    203 #endif
    204201
    205202  if (fVerbosity >= startup) {
     
    652649
    653650void G4VisManager::CreateViewer (G4String name,G4String XGeometry) {
    654 #ifdef G4DEBUG
    655   printf("G4VisManager::CreateViewer TOP\n");
    656 #endif
    657651
    658652  if (!fInitialised) Initialise ();
    659 #ifdef G4DEBUG
    660   printf("G4VisManager::CreateViewer 2\n");
    661 #endif
    662653
    663654  if (fpSceneHandler) {
    664 #ifdef G4DEBUG
    665     printf("G4VisManager::CreateViewer 3\n");
    666 #endif
    667655    G4VViewer* p = fpGraphicsSystem -> CreateViewer (*fpSceneHandler, name);
    668 #ifdef G4DEBUG
    669656
    670657    // Viewer is created, now we can set geometry parameters
    671658    // Before 12/2008, it was done in G4VViewer.cc but it did not have to be there!
    672 
     659   
    673660    G4ViewParameters vp = p->GetViewParameters();
    674661    vp.SetXGeometryString(XGeometry);
    675     p->SetViewParameters(vp);
    676 
    677     printf("G4VisManager::CreateViewer 4\n");
    678 #endif
     662    p->SetViewParameters(vp); //parse string and store parameters
     663   
    679664    if (!p) {
    680 #ifdef G4DEBUG
    681       printf("G4VisManager::CreateViewer !p\n");
    682 #endif
    683665      if (fVerbosity >= errors) {
    684666        G4cout << "ERROR in G4VisManager::CreateViewer during "
     
    688670      }
    689671    } else {
    690 #ifdef G4DEBUG
    691     printf("G4VisManager::CreateViewer 5\n");
    692 #endif
    693672      p -> Initialise ();
    694 #ifdef G4DEBUG
    695     printf("G4VisManager::CreateViewer 6\n");
    696 #endif
    697673      if (p -> GetViewId() < 0) {
    698 #ifdef G4DEBUG
    699         printf("G4VisManager::CreateViewer Id <0\n");
    700 #endif
    701674        if (fVerbosity >= errors) {
    702675        G4cout << "ERROR in G4VisManager::CreateViewer during "
     
    706679        }
    707680      } else {
    708 #ifdef G4DEBUG
    709     printf("G4VisManager::CreateViewer 7\n");
    710 #endif
    711681        fpViewer = p;                             // Make current.
    712 #ifdef G4DEBUG
    713     printf("G4VisManager::CreateViewer 8\n");
    714 #endif
    715682        fpSceneHandler -> AddViewerToList (fpViewer);
    716 #ifdef G4DEBUG
    717   printf("G4VisManager::CreateViewer 9\n");
    718 #endif
    719683        fpSceneHandler -> SetCurrentViewer (fpViewer);
    720684
     
    724688        }
    725689
    726 #ifdef G4DEBUG
    727   printf("G4VisManager::CreateViewer 10 Read parameters\n");
    728 #endif
    729690        const G4ViewParameters& vp = fpViewer->GetViewParameters();
    730 #ifdef G4DEBUG
    731   printf("G4VisManager::CreateViewer 11 END of read Parameters\n");
    732 #endif
    733691        if (fVerbosity >= parameters) {
    734692          G4cout << " view parameters are:\n  " << vp << G4endl;
     
    766724  }
    767725  else PrintInvalidPointers ();
    768 #ifdef G4DEBUG
    769   printf("G4VisManager::END OF CreateViewer\n");
    770 #endif
    771726}
    772727
Note: See TracChangeset for help on using the changeset viewer.