Import Geant4 0.0.0 source tree
This commit is contained in:
@@ -0,0 +1,47 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 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: G4OpenGLImmediateScene.hh,v 2.2 1998/11/06 13:42:13 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 10th February 1997
|
||||
// G4OpenGLImmediateScene - no Display lists.
|
||||
|
||||
#ifdef G4VIS_BUILD_OPENGL_DRIVER
|
||||
|
||||
#ifndef G4OPENGLIMMEDIATESCENE_HH
|
||||
#define G4OPENGLIMMEDIATESCENE_HH
|
||||
|
||||
#include "G4VScene.hh"
|
||||
#include "G4OpenGLView.hh"
|
||||
#include "G4OpenGLImmediateView.hh"
|
||||
#include "globals.hh"
|
||||
#include "G4RotationMatrix.hh"
|
||||
#include "G4OpenGLScene.hh"
|
||||
|
||||
class G4OpenGLImmediate;
|
||||
|
||||
class G4OpenGLImmediateScene: public G4OpenGLScene {
|
||||
|
||||
public:
|
||||
G4OpenGLImmediateScene (G4VGraphicsSystem& system, const G4String& name);
|
||||
~G4OpenGLImmediateScene ();
|
||||
void BeginPrimitives (const G4Transform3D& objectTransformation);
|
||||
void EndPrimitives ();
|
||||
void BeginModeling ();
|
||||
void EndModeling ();
|
||||
static G4int GetSceneCount ();
|
||||
|
||||
private:
|
||||
static G4int fSceneIdCount; // static counter for OpenGLImmediate scenes.
|
||||
static G4int fSceneCount; // No. of extanct scenes.
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,44 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 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: G4OpenGLImmediateView.hh,v 2.0 1998/07/02 16:44:02 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 7th February 1997
|
||||
// Class G4OpenGLImmediateView : Encapsulates the `immediateness' of
|
||||
// an OpenGL view, for inheritance by
|
||||
// derived (X, Xm...) classes.
|
||||
|
||||
#ifdef G4VIS_BUILD_OPENGL_DRIVER
|
||||
|
||||
#ifndef G4OPENGLIMMEDIATEVIEW_HH
|
||||
#define G4OPENGLIMMEDIATEVIEW_HH
|
||||
|
||||
#include "G4VView.hh"
|
||||
#include "G4OpenGLView.hh"
|
||||
#include "G4OpenGLScene.hh"
|
||||
#include "G4OpenGLImmediateScene.hh"
|
||||
#include "G4OpenGLTransform3D.hh"
|
||||
#include "globals.hh"
|
||||
#include <rw/tvordvec.h>
|
||||
|
||||
class G4OpenGLScene;
|
||||
class G4OpenGLImmediateScene;
|
||||
|
||||
class G4OpenGLImmediateView: virtual public G4OpenGLView {
|
||||
|
||||
public:
|
||||
G4OpenGLImmediateView (G4OpenGLImmediateScene& scene);
|
||||
|
||||
private:
|
||||
G4OpenGLImmediateScene& fScene; // Graphics Scene for this view.
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,30 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 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: G4OpenGLImmediateWin32.hh,v 2.0 1998/07/02 16:44:03 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
//
|
||||
// OpenGLImmediateWin32 graphics system factory.
|
||||
|
||||
#if defined (G4VIS_BUILD_OPENGLWIN32_DRIVER) || defined (G4VIS_USE_OPENGLWIN32)
|
||||
|
||||
#ifndef G4OPENGLIMMEDIATEWIN32_HH
|
||||
#define G4OPENGLIMMEDIATEWIN32_HH
|
||||
|
||||
#include "G4VGraphicsSystem.hh"
|
||||
|
||||
class G4OpenGLImmediateWin32: public G4VGraphicsSystem {
|
||||
public:
|
||||
G4OpenGLImmediateWin32 ();
|
||||
G4VScene* CreateScene ();
|
||||
G4VView* CreateView (G4VScene&);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,39 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 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: G4OpenGLImmediateWin32View.hh,v 2.0 1998/07/02 16:44:05 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
//
|
||||
// Class G4OpenGLImmediateWin32View : a class derived from G4OpenGLWin32View and
|
||||
// G4OpenGLImmediateView.
|
||||
|
||||
#ifdef G4VIS_BUILD_OPENGLWIN32_DRIVER
|
||||
|
||||
#ifndef G4OpenGLIMMEDIATEWIN32VIEW_HH
|
||||
#define G4OpenGLIMMEDIATEWIN32VIEW_HH
|
||||
|
||||
#include "G4VView.hh"
|
||||
#include "G4OpenGLImmediateView.hh"
|
||||
#include "G4OpenGLWin32View.hh"
|
||||
|
||||
#include "globals.hh"
|
||||
#include <rw/tvordvec.h>
|
||||
|
||||
class G4OpenGLImmediateScene;
|
||||
|
||||
class G4OpenGLImmediateWin32View:
|
||||
public G4OpenGLWin32View, public G4OpenGLImmediateView{
|
||||
|
||||
public:
|
||||
G4OpenGLImmediateWin32View (G4OpenGLImmediateScene& scene);
|
||||
void DrawView ();
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,31 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 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: G4OpenGLImmediateX.hh,v 2.1 1998/11/06 13:42:14 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 10th February 1997
|
||||
// OpenGL graphics system factory.
|
||||
|
||||
#if defined (G4VIS_BUILD_OPENGLX_DRIVER) || defined (G4VIS_USE_OPENGLX)
|
||||
|
||||
#ifndef G4OPENGLIMMEDIATEX_HH
|
||||
#define G4OPENGLIMMEDIATEX_HH
|
||||
|
||||
#include "G4VGraphicsSystem.hh"
|
||||
|
||||
class G4OpenGLImmediateX: public G4VGraphicsSystem {
|
||||
public:
|
||||
G4OpenGLImmediateX ();
|
||||
G4VScene* CreateScene (const G4String& name = "");
|
||||
G4VView* CreateView (G4VScene&, const G4String& name = "");
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,41 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 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: G4OpenGLImmediateXView.hh,v 2.1 1998/11/06 13:42:15 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 7th February 1997
|
||||
// Class G4OpenGLImmediateXView : a class derived from G4OpenGLXView and
|
||||
// G4OpenGLImmediateView.
|
||||
|
||||
#ifdef G4VIS_BUILD_OPENGLX_DRIVER
|
||||
|
||||
#ifndef G4OpenGLIMMEDIATEXVIEW_HH
|
||||
#define G4OpenGLIMMEDIATEXVIEW_HH
|
||||
|
||||
#include "G4VView.hh"
|
||||
#include "G4OpenGLImmediateView.hh"
|
||||
#include "G4OpenGLXView.hh"
|
||||
|
||||
#include "globals.hh"
|
||||
#include <rw/tvordvec.h>
|
||||
|
||||
class G4OpenGLImmediateScene;
|
||||
|
||||
class G4OpenGLImmediateXView:
|
||||
public G4OpenGLXView, public G4OpenGLImmediateView{
|
||||
|
||||
public:
|
||||
G4OpenGLImmediateXView (G4OpenGLImmediateScene& scene,
|
||||
const G4String& name = "");
|
||||
void DrawView ();
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,31 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 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: G4OpenGLImmediateXm.hh,v 2.1 1998/11/06 13:42:16 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 10th February 1997
|
||||
// OpenGL graphics system factory.
|
||||
|
||||
#if defined (G4VIS_BUILD_OPENGLXM_DRIVER) || defined (G4VIS_USE_OPENGLXM)
|
||||
|
||||
#ifndef G4OPENGLIMMEDIATEXM_HH
|
||||
#define G4OPENGLIMMEDIATEXM_HH
|
||||
|
||||
#include "G4VGraphicsSystem.hh"
|
||||
|
||||
class G4OpenGLImmediateXm: public G4VGraphicsSystem {
|
||||
public:
|
||||
G4OpenGLImmediateXm ();
|
||||
G4VScene* CreateScene (const G4String& name = "");
|
||||
G4VView* CreateView (G4VScene&, const G4String& name = "");
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,42 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 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: G4OpenGLImmediateXmView.hh,v 2.1 1998/11/06 13:42:17 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 10th February 1997
|
||||
// G4OpenGLXmView : Class derived from G4OpenGLXView, to provide
|
||||
// (Motif) widget OpenGL functionality for GEANT4.
|
||||
|
||||
#ifdef G4VIS_BUILD_OPENGLXM_DRIVER
|
||||
|
||||
#ifndef G4OPENGLIMMEDIATEXMVIEW_HH
|
||||
#define G4OPENGLIMMEDIATEXMVIEW_HH
|
||||
|
||||
#include "G4VView.hh"
|
||||
#include "G4OpenGLImmediateView.hh"
|
||||
#include "G4OpenGLXmView.hh"
|
||||
|
||||
#include "globals.hh"
|
||||
#include <rw/tvordvec.h>
|
||||
|
||||
class G4OpenGLImmediateScene;
|
||||
|
||||
class G4OpenGLImmediateXmView:
|
||||
public G4OpenGLXmView, public G4OpenGLImmediateView{
|
||||
|
||||
public:
|
||||
G4OpenGLImmediateXmView (G4OpenGLImmediateScene& scene,
|
||||
const G4String& name = "");
|
||||
void DrawView ();
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,69 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 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: G4OpenGLScene.hh,v 2.3 1998/11/06 13:42:18 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 27th March 1996
|
||||
// OpenGL scene - base for immediate mode and stored mode classes to
|
||||
// inherit from.
|
||||
|
||||
#ifdef G4VIS_BUILD_OPENGL_DRIVER
|
||||
|
||||
#ifndef G4OPENGLSCENE_HH
|
||||
#define G4OPENGLSCENE_HH
|
||||
|
||||
#include <rw/tvhdict.h>
|
||||
|
||||
#include "G4VScene.hh"
|
||||
#include "G4OpenGLView.hh"
|
||||
#include "globals.hh"
|
||||
#include "G4RotationMatrix.hh"
|
||||
|
||||
#include <GL/gl.h>
|
||||
#include <GL/glx.h>
|
||||
#include <GL/glu.h>
|
||||
|
||||
// Base class for various OpenGLScene classes.
|
||||
class G4OpenGLScene: public G4VScene {
|
||||
|
||||
public:
|
||||
void AddPrimitive (const G4Polyline&);
|
||||
void AddPrimitive (const G4Text&);
|
||||
void AddPrimitive (const G4Circle&);
|
||||
void AddPrimitive (const G4Square&);
|
||||
void AddPrimitive (const G4Polyhedron&);
|
||||
void AddPrimitive (const G4NURBS&);
|
||||
void AddPrimitive (const G4Polymarker&);
|
||||
|
||||
void AddThis (const G4Box&);
|
||||
void AddThis (const G4Cons&);
|
||||
void AddThis (const G4Tubs&);
|
||||
void AddThis (const G4Trd&);
|
||||
void AddThis (const G4Trap&);
|
||||
void AddThis (const G4Sphere&);
|
||||
void AddThis (const G4Para&);
|
||||
void AddThis (const G4Torus&);
|
||||
void AddThis (const G4VSolid&);
|
||||
|
||||
protected:
|
||||
G4OpenGLScene (G4VGraphicsSystem& system,
|
||||
G4int id,
|
||||
const G4String& name = "");
|
||||
~G4OpenGLScene ();
|
||||
G4bool initialize_hlr;
|
||||
|
||||
private:
|
||||
GLdouble clear_colour[4];
|
||||
};
|
||||
|
||||
#include "G4OpenGLScene.icc"
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,53 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 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: G4OpenGLScene.icc,v 2.1 1998/08/07 12:46:14 barrand Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 20th January 1998
|
||||
|
||||
inline void G4OpenGLScene::AddThis (const G4Box& box) {
|
||||
G4VScene::AddThis (box);
|
||||
}
|
||||
|
||||
inline void G4OpenGLScene::AddThis (const G4Cons& cons) {
|
||||
G4VScene::AddThis (cons);
|
||||
}
|
||||
|
||||
inline void G4OpenGLScene::AddThis (const G4Tubs& tubs) {
|
||||
G4VScene::AddThis (tubs);
|
||||
}
|
||||
|
||||
inline void G4OpenGLScene::AddThis (const G4Trd& trd) {
|
||||
G4VScene::AddThis (trd);
|
||||
}
|
||||
|
||||
inline void G4OpenGLScene::AddThis (const G4Trap& trap) {
|
||||
G4VScene::AddThis (trap);
|
||||
}
|
||||
|
||||
inline void G4OpenGLScene::AddThis (const G4Sphere& sphere) {
|
||||
G4VScene::AddThis (sphere);
|
||||
}
|
||||
|
||||
inline void G4OpenGLScene::AddThis (const G4Para& para) {
|
||||
G4VScene::AddThis (para);
|
||||
}
|
||||
|
||||
inline void G4OpenGLScene::AddThis (const G4Torus& torus) {
|
||||
G4VScene::AddThis (torus);
|
||||
}
|
||||
|
||||
inline void G4OpenGLScene::AddThis (const G4VSolid& vsolid) {
|
||||
G4VScene::AddThis (vsolid);
|
||||
}
|
||||
|
||||
inline void G4OpenGLScene::AddPrimitive (const G4Polymarker& polymarker) {
|
||||
G4VScene::AddPrimitive (polymarker);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,71 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 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: G4OpenGLStoredScene.hh,v 2.2 1998/11/06 13:42:19 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 10th February 1997
|
||||
// G4OpenGLStoredScene - creates OpenGL Display lists.
|
||||
|
||||
#ifdef G4VIS_BUILD_OPENGL_DRIVER
|
||||
|
||||
#ifndef G4OPENGLSTOREDSCENE_HH
|
||||
#define G4OPENGLSTOREDSCENE_HH
|
||||
|
||||
#include "G4VScene.hh"
|
||||
#include "G4OpenGLView.hh"
|
||||
#include "G4OpenGLStoredView.hh"
|
||||
#include "globals.hh"
|
||||
#include "G4RotationMatrix.hh"
|
||||
#include "G4OpenGLScene.hh"
|
||||
|
||||
class G4OpenGLStored;
|
||||
|
||||
class G4OpenGLStoredScene: public G4OpenGLScene {
|
||||
|
||||
public:
|
||||
typedef unsigned long G4VSolidPointer;
|
||||
G4OpenGLStoredScene (G4VGraphicsSystem& system, const G4String& name = "");
|
||||
~G4OpenGLStoredScene ();
|
||||
void BeginPrimitives (const G4Transform3D& objectTransformation);
|
||||
void EndPrimitives ();
|
||||
void BeginModeling ();
|
||||
void EndModeling ();
|
||||
static G4int GetSceneCount ();
|
||||
G4bool fMemoryForDisplayLists; // avoid memory overflow
|
||||
|
||||
private:
|
||||
friend class G4OpenGLStoredView;
|
||||
// ..allows access to P/TODLs.
|
||||
void ClearStore ();
|
||||
void RequestPrimitives (const G4VSolid& solid);
|
||||
static G4int fSceneIdCount; // static counter for OpenGLStored scenes.
|
||||
static G4int fSceneCount; // No. of extanct scenes.
|
||||
G4int fDisplayListId; // Workspace.
|
||||
|
||||
// PODL = Persistent Object Display List.
|
||||
GLint fTopPODL; // List which calls the other PODLs.
|
||||
RWTValOrderedVector<G4int> fPODLList;
|
||||
RWTValOrderedVector<G4Transform3D> fPODLTransformList;
|
||||
|
||||
// TODL = Transient Object Display List.
|
||||
RWTValOrderedVector<G4int> fTODLList;
|
||||
RWTValOrderedVector<G4Transform3D> fTODLTransformList;
|
||||
|
||||
// Stop-gap solution of structure re-use.
|
||||
// A proper implementation would use geometry hierarchy.
|
||||
RWTValHashDictionary<G4VSolidPointer, G4int> fSolidDictionary;
|
||||
};
|
||||
|
||||
inline G4int G4OpenGLStoredScene::GetSceneCount () {
|
||||
return fSceneCount;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,45 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 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: G4OpenGLStoredView.hh,v 2.0 1998/07/02 16:44:28 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 7th February 1997
|
||||
// Class G4OpenGLStoredView : Encapsulates the `storedness' of
|
||||
// an OpenGL view, for inheritance by
|
||||
// derived (X, Xm...) classes.
|
||||
|
||||
#ifdef G4VIS_BUILD_OPENGL_DRIVER
|
||||
|
||||
#ifndef G4OPENGLSTOREDVIEW_HH
|
||||
#define G4OPENGLSTOREDVIEW_HH
|
||||
|
||||
#include "G4VView.hh"
|
||||
#include "G4OpenGLView.hh"
|
||||
#include "G4OpenGLScene.hh"
|
||||
#include "G4OpenGLStoredScene.hh"
|
||||
#include "G4OpenGLTransform3D.hh"
|
||||
#include "globals.hh"
|
||||
#include <rw/tvordvec.h>
|
||||
|
||||
class G4OpenGLStoredScene;
|
||||
|
||||
class G4OpenGLStoredView: virtual public G4OpenGLView {
|
||||
|
||||
public:
|
||||
G4OpenGLStoredView (G4OpenGLStoredScene& scene);
|
||||
|
||||
protected:
|
||||
void KernelVisitDecision ();
|
||||
void DrawDisplayLists ();
|
||||
G4OpenGLStoredScene& fScene; // Graphics Scene for this view.
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,30 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 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: G4OpenGLStoredWin32.hh,v 2.0 1998/07/02 16:44:31 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
//
|
||||
// OpenGLStoredWin32 graphics system factory.
|
||||
|
||||
#if defined (G4VIS_BUILD_OPENGLWIN32_DRIVER) || defined (G4VIS_USE_OPENGLWIN32)
|
||||
|
||||
#ifndef G4OPENGLSTOREDWIN32_HH
|
||||
#define G4OPENGLSTOREDWIN32_HH
|
||||
|
||||
#include "G4VGraphicsSystem.hh"
|
||||
|
||||
class G4OpenGLStoredWin32: public G4VGraphicsSystem {
|
||||
public:
|
||||
G4OpenGLStoredWin32 ();
|
||||
G4VScene* CreateScene ();
|
||||
G4VView* CreateView (G4VScene&);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,37 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 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: G4OpenGLStoredWin32View.hh,v 2.0 1998/07/02 16:44:32 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
//
|
||||
// Class G4OpenGLStoredWin32View : a class derived from G4OpenGLWin32View and
|
||||
// G4OpenGLStoredView.
|
||||
|
||||
#ifdef G4VIS_BUILD_OPENGLWIN32_DRIVER
|
||||
|
||||
#ifndef G4OPENGLSTOREDWIN32VIEW_HH
|
||||
#define G4OPENGLSTOREDWIN32VIEW_HH
|
||||
|
||||
#include "G4VView.hh"
|
||||
#include "G4OpenGLStoredView.hh"
|
||||
#include "G4OpenGLWin32View.hh"
|
||||
|
||||
class G4OpenGLStoredScene;
|
||||
|
||||
class G4OpenGLStoredWin32View:
|
||||
public G4OpenGLWin32View, public G4OpenGLStoredView{
|
||||
|
||||
public:
|
||||
G4OpenGLStoredWin32View (G4OpenGLStoredScene& scene);
|
||||
void DrawView ();
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 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: G4OpenGLStoredX.hh,v 2.1 1998/11/06 13:42:20 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 10th February 1997
|
||||
// OpenGL graphics system factory.
|
||||
|
||||
#if defined (G4VIS_BUILD_OPENGLX_DRIVER) || defined (G4VIS_USE_OPENGLX)
|
||||
|
||||
#ifndef G4OPENGLSTOREDX_HH
|
||||
#define G4OPENGLSTOREDX_HH
|
||||
|
||||
#include "G4VGraphicsSystem.hh"
|
||||
|
||||
class G4OpenGLStoredX: public G4VGraphicsSystem {
|
||||
public:
|
||||
G4OpenGLStoredX ();
|
||||
G4VScene* CreateScene (const G4String& name = "");
|
||||
G4VView* CreateView (G4VScene&, const G4String& name = "");
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,38 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 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: G4OpenGLStoredXView.hh,v 2.1 1998/11/06 13:42:21 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 7th February 1997
|
||||
// Class G4OpenGLStoredXView : a class derived from G4OpenGLXView and
|
||||
// G4OpenGLStoredView.
|
||||
|
||||
#ifdef G4VIS_BUILD_OPENGLX_DRIVER
|
||||
|
||||
#ifndef G4OPENGLSTOREDXVIEW_HH
|
||||
#define G4OPENGLSTOREDXVIEW_HH
|
||||
|
||||
#include "G4VView.hh"
|
||||
#include "G4OpenGLStoredView.hh"
|
||||
#include "G4OpenGLXView.hh"
|
||||
|
||||
class G4OpenGLStoredScene;
|
||||
|
||||
class G4OpenGLStoredXView:
|
||||
public G4OpenGLXView, public G4OpenGLStoredView{
|
||||
|
||||
public:
|
||||
G4OpenGLStoredXView (G4OpenGLStoredScene& scene, const G4String& name = "");
|
||||
void DrawView ();
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 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: G4OpenGLStoredXm.hh,v 2.1 1998/11/06 13:42:21 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 10th February 1997
|
||||
// OpenGL graphics system factory.
|
||||
|
||||
#if defined (G4VIS_BUILD_OPENGLXM_DRIVER) || defined (G4VIS_USE_OPENGLXM)
|
||||
|
||||
#ifndef G4OPENGLSTOREDXM_HH
|
||||
#define G4OPENGLSTOREDXM_HH
|
||||
|
||||
#include "G4VGraphicsSystem.hh"
|
||||
|
||||
class G4OpenGLStoredXm: public G4VGraphicsSystem {
|
||||
public:
|
||||
G4OpenGLStoredXm ();
|
||||
G4VScene* CreateScene (const G4String& name = "");
|
||||
G4VView* CreateView (G4VScene&, const G4String& name = "");
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,38 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 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: G4OpenGLStoredXmView.hh,v 2.1 1998/11/06 13:42:22 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 10th February 1997
|
||||
// Class G4OpenGLStoredXmView : a class derived from G4OpenGLXmView
|
||||
// and G4OpenGLStoredView.
|
||||
|
||||
#ifdef G4VIS_BUILD_OPENGLXM_DRIVER
|
||||
|
||||
#ifndef G4OpenGLSTOREDXMVIEW_HH
|
||||
#define G4OpenGLSTOREDXMVIEW_HH
|
||||
|
||||
#include "G4VView.hh"
|
||||
#include "G4OpenGLStoredView.hh"
|
||||
#include "G4OpenGLXmView.hh"
|
||||
|
||||
class G4OpenGLStoredScene;
|
||||
|
||||
class G4OpenGLStoredXmView:
|
||||
public G4OpenGLXmView, public G4OpenGLStoredView{
|
||||
|
||||
public:
|
||||
G4OpenGLStoredXmView (G4OpenGLStoredScene& scene, const G4String& name = "");
|
||||
void DrawView ();
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,33 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 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: G4OpenGLTransform3D.hh,v 2.0 1998/07/02 16:44:42 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 24th October 1996
|
||||
// G4OpenGLTransform3D provides OpenGL style transformation matrix
|
||||
// from G4Transform3D.
|
||||
|
||||
#ifdef G4VIS_BUILD_OPENGL_DRIVER
|
||||
|
||||
#ifndef G4OPENGLTRANSFORM3D_HH
|
||||
#define G4OPENGLTRANSFORM3D_HH
|
||||
|
||||
#include "G4Transform3D.hh"
|
||||
|
||||
class G4OpenGLTransform3D : public G4Transform3D {
|
||||
public:
|
||||
G4OpenGLTransform3D (const G4Transform3D &t);
|
||||
const GLdouble* GetGLMatrix ();
|
||||
private:
|
||||
GLdouble m[16];
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,60 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 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: G4OpenGLView.hh,v 2.0 1998/07/02 16:44:46 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 27th March 1996
|
||||
// OpenGL view - opens window, hard copy, etc.
|
||||
|
||||
#ifdef G4VIS_BUILD_OPENGL_DRIVER
|
||||
|
||||
#ifndef G4OPENGLVIEW_HH
|
||||
#define G4OPENGLVIEW_HH
|
||||
|
||||
#include "G4VView.hh"
|
||||
#include "globals.hh"
|
||||
#include <rw/tvordvec.h>
|
||||
|
||||
class G4OpenGLScene;
|
||||
|
||||
// Base class for various OpenGLView classes.
|
||||
class G4OpenGLView: virtual public G4VView {
|
||||
|
||||
public:
|
||||
void ClearView ();
|
||||
|
||||
protected:
|
||||
G4OpenGLView (G4OpenGLScene& scene);
|
||||
void SetView ();
|
||||
void HaloingFirstPass ();
|
||||
void HaloingSecondPass ();
|
||||
void HLRFirstPass ();
|
||||
void HLRSecondPass ();
|
||||
void HLRThirdPass ();
|
||||
void InitializeGLView ();
|
||||
G4bool white_background, //the OpenGL clear colour
|
||||
doublebuffer, //are we using a double buffered visual?
|
||||
transparency_enabled, //is alpha blending enabled?
|
||||
antialiasing_enabled, //is antialiasing enabled?
|
||||
haloing_enabled; //is haloing enabled for wireframe?
|
||||
|
||||
static int snglBuf_RGBA[10];
|
||||
static int dblBuf_RGBA[11];
|
||||
G4OpenGLScene& fScene; // Graphics Scene for this view.
|
||||
|
||||
private:
|
||||
// G4OpenGLScene& fScene; // Graphics Scene for this view.
|
||||
};
|
||||
|
||||
class G4OpenGLImmediateScene;
|
||||
class G4OpenGLStoredScene;
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,50 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 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: G4OpenGLWin32View.hh,v 2.0 1998/07/02 16:44:47 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
//
|
||||
// G4OpenGLWin32View : Class to provide WindowsNT specific
|
||||
// functionality for OpenGL in GEANT4
|
||||
|
||||
#ifdef G4VIS_BUILD_OPENGLWIN32_DRIVER
|
||||
|
||||
#ifndef G4OPENGLWIN32VIEW_HH
|
||||
#define G4OPENGLWIN32VIEW_HH
|
||||
|
||||
#include "G4VView.hh"
|
||||
#include "G4OpenGLScene.hh"
|
||||
#include "globals.hh"
|
||||
#include <rw/tvordvec.h>
|
||||
|
||||
//Win32 includes?
|
||||
|
||||
#include <GL/gl.h>
|
||||
#include <GL/glx.h>
|
||||
#include <GL/glu.h>
|
||||
|
||||
class G4OpenGLScene;
|
||||
|
||||
class G4OpenGLWin32View: virtual public G4OpenGLView {
|
||||
|
||||
public:
|
||||
G4OpenGLWin32View (G4OpenGLScene& scene);
|
||||
~G4OpenGLWin32View ();
|
||||
void FinishView ();
|
||||
|
||||
protected:
|
||||
void GetWin32Connection ();
|
||||
void CreateGLWin32Context ();
|
||||
virtual void CreateMainWindow ();
|
||||
G4int WinSize_x, WinSize_y;
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,145 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 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: G4OpenGLXView.hh,v 2.5 1998/10/29 09:37:23 barrand Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 7th February 1997
|
||||
// G4OpenGLXView : Class to provide XWindows specific
|
||||
// functionality for OpenGL in GEANT4
|
||||
|
||||
#ifdef G4VIS_BUILD_OPENGLX_DRIVER
|
||||
|
||||
#ifndef G4OPENGLXVIEW_HH
|
||||
#define G4OPENGLXVIEW_HH
|
||||
|
||||
#include "G4VView.hh"
|
||||
#include "G4OpenGLScene.hh"
|
||||
#include "globals.hh"
|
||||
#include <rw/tvordvec.h>
|
||||
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/Intrinsic.h>
|
||||
#include <X11/Xmu/StdCmap.h>
|
||||
|
||||
#include <GL/gl.h>
|
||||
#include <GL/glx.h>
|
||||
#include <GL/glu.h>
|
||||
|
||||
class G4OpenGLScene;
|
||||
|
||||
class G4OpenGLXView: virtual public G4OpenGLView {
|
||||
|
||||
public:
|
||||
G4OpenGLXView (G4OpenGLScene& scene);
|
||||
~G4OpenGLXView ();
|
||||
void FinishView ();
|
||||
void print();
|
||||
|
||||
protected:
|
||||
void GetXConnection ();
|
||||
void CreateGLXContext (XVisualInfo* vi);
|
||||
virtual void CreateMainWindow ();
|
||||
|
||||
char print_string[50];
|
||||
G4bool print_colour,
|
||||
vectored_ps;
|
||||
|
||||
//////////////////////////////Vectored PostScript production functions//////////////////////////////
|
||||
void printBuffer(GLint, GLfloat*);
|
||||
GLfloat* spewPrimitiveEPS (FILE*, GLfloat*);
|
||||
void spewSortedFeedback (FILE*, GLint, GLfloat*);
|
||||
void spewWireframeEPS (FILE*, GLint, GLfloat*, char*);
|
||||
void print3DcolorVertex(GLint, GLint*, GLfloat*);
|
||||
G4float pointSize;
|
||||
|
||||
|
||||
//////////////////////////////Pixmap (screen dump) production functions//////////////////////////////
|
||||
GLubyte* grabPixels (int inColor,
|
||||
unsigned int width,
|
||||
unsigned int height);
|
||||
int generateEPS (char* filnam,
|
||||
int inColour,
|
||||
unsigned int width,
|
||||
unsigned int height);
|
||||
GLXContext create_GL_print_context (XVisualInfo*& pvi, G4bool& db);
|
||||
|
||||
XWindowAttributes xwa;
|
||||
Display *dpy;
|
||||
XVisualInfo *vi_immediate,
|
||||
*vi_stored,
|
||||
*vi;
|
||||
Colormap cmap;
|
||||
XSetWindowAttributes swa;
|
||||
GLXDrawable win;
|
||||
GLXContext cx;
|
||||
XEvent event;
|
||||
G4int *attributeList,
|
||||
errorBase,
|
||||
eventBase,
|
||||
major,
|
||||
minor,
|
||||
x_origin,
|
||||
y_origin;
|
||||
XSizeHints *norm_hints;
|
||||
XWMHints *wm_hints;
|
||||
XClassHint *class_hints;
|
||||
Pixmap icon_pixmap;
|
||||
XSizeHints *size_hints;
|
||||
G4int WinSize_x,
|
||||
WinSize_y;
|
||||
Atom Xatom;
|
||||
XTextProperty windowName,
|
||||
iconName;
|
||||
char charViewName [100];
|
||||
|
||||
};
|
||||
|
||||
static const char* gouraudtriangleEPS[] =
|
||||
{
|
||||
"/bd{bind def}bind def /triangle { aload pop setrgbcolor aload pop 5 3",
|
||||
"roll 4 2 roll 3 2 roll exch moveto lineto lineto closepath fill } bd",
|
||||
"/computediff1 { 2 copy sub abs threshold ge {pop pop pop true} { exch 2",
|
||||
"index sub abs threshold ge { pop pop true} { sub abs threshold ge } ifelse",
|
||||
"} ifelse } bd /computediff3 { 3 copy 0 get 3 1 roll 0 get 3 1 roll 0 get",
|
||||
"computediff1 {true} { 3 copy 1 get 3 1 roll 1 get 3 1 roll 1 get",
|
||||
"computediff1 {true} { 3 copy 2 get 3 1 roll 2 get 3 1 roll 2 get",
|
||||
"computediff1 } ifelse } ifelse } bd /middlecolor { aload pop 4 -1 roll",
|
||||
"aload pop 4 -1 roll add 2 div 5 1 roll 3 -1 roll add 2 div 3 1 roll add 2",
|
||||
"div 3 1 roll exch 3 array astore } bd /gouraudtriangle { computediff3 { 4",
|
||||
"-1 roll aload 7 1 roll 6 -1 roll pop 3 -1 roll pop add 2 div 3 1 roll add",
|
||||
"2 div exch 3 -1 roll aload 7 1 roll exch pop 4 -1 roll pop add 2 div 3 1",
|
||||
"roll add 2 div exch 3 -1 roll aload 7 1 roll pop 3 -1 roll pop add 2 div 3",
|
||||
"1 roll add 2 div exch 7 3 roll 10 -3 roll dup 3 index middlecolor 4 1 roll",
|
||||
"2 copy middlecolor 4 1 roll 3 copy pop middlecolor 4 1 roll 13 -1 roll",
|
||||
"aload pop 17 index 6 index 15 index 19 index 6 index 17 index 6 array",
|
||||
"astore 10 index 10 index 14 index gouraudtriangle 17 index 5 index 17",
|
||||
"index 19 index 5 index 19 index 6 array astore 10 index 9 index 13 index",
|
||||
"gouraudtriangle 13 index 16 index 5 index 15 index 18 index 5 index 6",
|
||||
"array astore 12 index 12 index 9 index gouraudtriangle 17 index 16 index",
|
||||
"15 index 19 index 18 index 17 index 6 array astore 10 index 12 index 14",
|
||||
"index gouraudtriangle 18 {pop} repeat } { aload pop 5 3 roll aload pop 7 3",
|
||||
"roll aload pop 9 3 roll 4 index 6 index 4 index add add 3 div 10 1 roll 7",
|
||||
"index 5 index 3 index add add 3 div 10 1 roll 6 index 4 index 2 index add",
|
||||
"add 3 div 10 1 roll 9 {pop} repeat 3 array astore triangle } ifelse } bd",
|
||||
NULL
|
||||
};
|
||||
|
||||
typedef struct _Feedback3Dcolor {
|
||||
GLfloat x;
|
||||
GLfloat y;
|
||||
GLfloat z;
|
||||
GLfloat red;
|
||||
GLfloat green;
|
||||
GLfloat blue;
|
||||
GLfloat alpha;
|
||||
} Feedback3Dcolor;
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,53 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 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: G4OpenGLXmBox.hh,v 2.0 1998/07/02 16:44:53 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
//
|
||||
//Box container class
|
||||
|
||||
#ifdef G4VIS_BUILD_OPENGLXM_DRIVER
|
||||
|
||||
#ifndef G4OPENGLXMBOX_HH
|
||||
#define G4OPENGLXMBOX_HH
|
||||
|
||||
#include "G4OpenGLXmVWidgetContainer.hh"
|
||||
#include "globals.hh"
|
||||
#include <Xm/Frame.h>
|
||||
#include <Xm/RowColumn.h>
|
||||
|
||||
class G4OpenGLXmVWidgetComponent;
|
||||
class G4OpenGLXmVWidgetShell;
|
||||
|
||||
class G4OpenGLXmBox : public G4OpenGLXmVWidgetContainer
|
||||
{
|
||||
|
||||
public:
|
||||
G4OpenGLXmBox (char* = NULL,
|
||||
G4bool = False); //constructor
|
||||
~G4OpenGLXmBox (); //destructor
|
||||
|
||||
void AddChild (G4OpenGLXmVWidgetComponent*);
|
||||
void AddYourselfTo (G4OpenGLXmVWidgetShell*);
|
||||
|
||||
Widget* GetPointerToParent ();
|
||||
Widget* GetPointerToWidget ();
|
||||
|
||||
char* GetName ();
|
||||
void SetName (char*);
|
||||
|
||||
protected:
|
||||
char* name;
|
||||
Widget* parent;
|
||||
Widget box_row_col;
|
||||
G4bool radio;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,155 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 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: G4OpenGLXmConvenienceRoutines.hh,v 2.1 1998/07/12 03:09:31 urbi Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
//
|
||||
|
||||
#ifdef G4VIS_BUILD_OPENGLXM_DRIVER
|
||||
|
||||
#ifndef G4OPENGLXMCONVENIENCEROUTINES_HH
|
||||
#define G4OPENGLXMCONVENIENCEROUTINES_HH
|
||||
|
||||
#include "G4OpenGLXmView.hh"
|
||||
|
||||
// Methods contained in G4OpenGLXmConvenienceRoutines:
|
||||
//
|
||||
// 1) Add_four_arrow_buttons
|
||||
// 2) Add_radio_box
|
||||
// 3) Add_set_field
|
||||
// 4) Add_slider_box
|
||||
// 5) get_float_value_callback
|
||||
//
|
||||
// Description of methods in G4OpenGLXmConvenienceRoutines:
|
||||
//
|
||||
// 1) Add_four_arrow_buttons (G4OpenGLXmView* pView,
|
||||
// XtCallbackProc* arrow_callbacks,
|
||||
// Widget* parent_widget)
|
||||
//
|
||||
// Adds a form widget containing four arrows (up, down, left, right)
|
||||
// to the row column parent_widget which is passed in the arguments
|
||||
// List. The XtCallbackProc* is an array containing four callback
|
||||
// proceedures to be registered with the up, down, left and right arrow
|
||||
// widgets respectively.
|
||||
//
|
||||
// 2) Add_radio_box (char* label_string,
|
||||
// Widget* parent_widget,
|
||||
// XtCallbackProc radio_box_callback,
|
||||
// G4int num_buttons,
|
||||
// G4int default_button,
|
||||
// char* radio_box_name,
|
||||
// char** button_names,
|
||||
// G4OpenGLXmView* pView);
|
||||
//
|
||||
// Adds a row column widget containing num_buttons toggle buttons, to the
|
||||
// row column parent_widget passed in the arguments List. label_string is
|
||||
// the title that gets written above the radio buttons, and radio_box_name
|
||||
// is used by the compiler, to give the radio_box a name to refer to, e.g.
|
||||
// for resource setting, or error information. default_button is the button
|
||||
// which appears `clicked' when the radio_box first appears. The first char*
|
||||
// object in the button_names array, gets written next to the first button,
|
||||
// the second next to the second, etc. radio_box_callback is the
|
||||
// XtCallbackProc callback proceedure, which is registered with all of the
|
||||
// buttons. XmNuserData is set to the index (0, 1,.., (num_buttons -1)) of
|
||||
// the calling button so that radio_box_callback can tell which button was
|
||||
// clicked, and what to do as a consequence.
|
||||
//
|
||||
// 3) Add_set_field (char* widget,
|
||||
// char* widget_text,
|
||||
// Widget* row_col_box,
|
||||
// Widget* wid,
|
||||
// G4float* val,
|
||||
// G4OpenGLXmView* pView);
|
||||
//
|
||||
// Adds a text field widget to the row_col_box supplied in the arguments
|
||||
// List. widget goes towards giving the widgets created within Add_set_field
|
||||
// names for reference (e.g. to set resources) and widget_text gets printed
|
||||
// above the text field box. val is the variable into which a number typed
|
||||
// into the text field widget, will get placed. Add_set_field uses the
|
||||
// get_float_value also in this file.
|
||||
//
|
||||
// 4) Add_slider_box (char* label_string,
|
||||
// G4int num_sliders,
|
||||
// char** slider_names,
|
||||
// G4OpenGLXmView* pView,
|
||||
// G4float* min_array,
|
||||
// G4float* max_array,
|
||||
// G4float* value_array,
|
||||
// G4bool* show,
|
||||
// short* decimals,
|
||||
// unsigned char* orientation,
|
||||
// unsigned char* direction,
|
||||
// XtCallbackProc* slider_box_callbacks,
|
||||
// Widget* parent_widget);
|
||||
//
|
||||
// Adds a row column widget containing num_sliders scale widgets, to the
|
||||
// row column widget specified by parent_widget. Each of the arrays,
|
||||
// slider_names, min_array, max_array, value_array, show, decimals,
|
||||
// orientation, direction and slider_box_callbacks contains num_sliders
|
||||
// elements, and govern the properties of each scale widget placed within
|
||||
// the slider box individually. The relevance of most of the arrays is self
|
||||
// explanatory.
|
||||
// - value_array contains the initial value for each scale widget.
|
||||
// - show determines whether or not the current numerical value represented
|
||||
// by the position of the slider bar on the scale widget is displayed.
|
||||
// - decimals indicates the Power of ten, by which to divide the current
|
||||
// scale widget value, before displaying it (if show is set) above the
|
||||
// slider bar. Scale widgets can only have integer values, but the use
|
||||
// of decimals and show can give the appearance of the scale widget having
|
||||
// a floating point value.
|
||||
// - The XtCallbackProc specified in slider_box_callbacks is registered for
|
||||
// both XmNvalueChanged and XmNdrag events generated by the scale widget.
|
||||
//
|
||||
// 5) get_float_value_callback (Widget w,
|
||||
// XtPointer clientData,
|
||||
// XtPointer callData);
|
||||
//
|
||||
// This XtCallbackProc reads a character string from a text field widget,
|
||||
// and converts it to a floating point number.
|
||||
|
||||
void Add_four_arrow_buttons (G4OpenGLXmView* pView,
|
||||
XtCallbackProc* arrow_callbacks,
|
||||
Widget* parent_widget);
|
||||
|
||||
void Add_radio_box (char* label_string,
|
||||
Widget* parent_widget,
|
||||
XtCallbackProc radio_box_callback,
|
||||
G4int num_buttons,
|
||||
G4int default_button,
|
||||
char* radio_box_name,
|
||||
char** button_names,
|
||||
G4OpenGLXmView* pView);
|
||||
|
||||
void Add_set_field (char* widget,
|
||||
char* widget_text,
|
||||
Widget* row_col_box,
|
||||
Widget* wid,
|
||||
G4float* val,
|
||||
G4OpenGLXmView* pView);
|
||||
|
||||
void Add_slider_box (char* label_string,
|
||||
G4int num_sliders,
|
||||
char** slider_names,
|
||||
G4OpenGLXmView* pView,
|
||||
G4float* min_array,
|
||||
G4float* max_array,
|
||||
G4float* value_array,
|
||||
G4bool* show,
|
||||
short* decimals,
|
||||
unsigned char* orientation,
|
||||
unsigned char* direction,
|
||||
XtCallbackProc* slider_box_callbacks,
|
||||
Widget* parent_widget);
|
||||
|
||||
void get_float_value_callback (Widget w,
|
||||
XtPointer clientData,
|
||||
XtPointer callData);
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,47 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 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: G4OpenGLXmFourArrowButtons.hh,v 2.0 1998/07/02 16:44:58 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
//
|
||||
//Four arrow buttons class. Inherits from G4OpenGLXmVWidgetComponent
|
||||
|
||||
#ifdef G4VIS_BUILD_OPENGLXM_DRIVER
|
||||
|
||||
#ifndef G4OPENGLXMFOURARROWBUTTONS_HH
|
||||
#define G4OPENGLXMFOURARROWBUTTONS_HH
|
||||
|
||||
#include "G4OpenGLXmVWidgetComponent.hh"
|
||||
|
||||
class G4OpenGLXmFourArrowButtons : public G4OpenGLXmVWidgetComponent
|
||||
{
|
||||
|
||||
public:
|
||||
G4OpenGLXmFourArrowButtons (XtCallbackRec** = NULL); // array of 4 callbacks
|
||||
//constructor
|
||||
~G4OpenGLXmFourArrowButtons (); //destructor
|
||||
|
||||
void SetName (char*);
|
||||
|
||||
char* GetName ();
|
||||
|
||||
void AddYourselfTo (G4OpenGLXmVWidgetContainer*);
|
||||
|
||||
Widget* GetPointerToParent ();
|
||||
Widget* GetPointerToWidget ();
|
||||
|
||||
private:
|
||||
XtCallbackRec** callback;
|
||||
Widget arrow_form;
|
||||
Widget arrow;
|
||||
Widget* parent;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,46 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 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: G4OpenGLXmFramedBox.hh,v 2.0 1998/07/02 16:45:01 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
//
|
||||
//Framed box container class
|
||||
//Inherits from G4OpenGLXmBox
|
||||
|
||||
#ifdef G4VIS_BUILD_OPENGLXM_DRIVER
|
||||
|
||||
#ifndef G4OPENGLXMFRAMEDBOX_HH
|
||||
#define G4OPENGLXMFRAMEDBOX_HH
|
||||
|
||||
#include "G4OpenGLXmVWidgetContainer.hh"
|
||||
#include "G4OpenGLXmBox.hh"
|
||||
#include "globals.hh"
|
||||
#include <Xm/Frame.h>
|
||||
#include <Xm/RowColumn.h>
|
||||
|
||||
class G4OpenGLXmVWidgetComponent;
|
||||
class G4OpenGLXmVWidgetShell;
|
||||
|
||||
class G4OpenGLXmFramedBox : public G4OpenGLXmBox
|
||||
{
|
||||
|
||||
public:
|
||||
G4OpenGLXmFramedBox (char* = NULL,
|
||||
G4bool = False); //constructor
|
||||
~G4OpenGLXmFramedBox (); //destructor
|
||||
|
||||
void AddChild (G4OpenGLXmVWidgetComponent*);
|
||||
void AddYourselfTo (G4OpenGLXmVWidgetShell*);
|
||||
|
||||
private:
|
||||
Widget frame;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,26 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 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: G4OpenGLXmMainMenubarCallbacks.hh,v 2.0 1998/07/02 16:45:03 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
//
|
||||
|
||||
#ifdef G4VIS_BUILD_OPENGLXM_DRIVER
|
||||
|
||||
#ifndef G4OPENGLXMMAINMENUBARCALLBACKS_HH
|
||||
#define G4OPENGLXMMAINMENUBARCALLBACKS_HH
|
||||
|
||||
#include "G4OpenGLXmView.hh"
|
||||
|
||||
void misc_callback (Widget w, XtPointer clientData, XtPointer callData);
|
||||
void actions_callback (Widget w, XtPointer clientData, XtPointer callData);
|
||||
void update_panels_callback (Widget w, XtPointer clientData, XtPointer callData);
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,44 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 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: G4OpenGLXmPanningCallbacks.hh,v 2.0 1998/07/02 16:45:05 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
//
|
||||
|
||||
#ifdef G4VIS_BUILD_OPENGLXM_DRIVER
|
||||
|
||||
#ifndef G4OPENGLXMPANNINGCALLBACKS_HH
|
||||
#define G4OPENGLXMPANNINGCALLBACKS_HH
|
||||
|
||||
#include "G4OpenGLXmView.hh"
|
||||
|
||||
void zoom_callback (Widget w,
|
||||
XtPointer clientData,
|
||||
XtPointer callData);
|
||||
|
||||
void dolly_callback (Widget w,
|
||||
XtPointer clientData,
|
||||
XtPointer callData);
|
||||
|
||||
void pan_left_right_callback (Widget w,
|
||||
XtPointer clientData,
|
||||
XtPointer callData);
|
||||
|
||||
void pan_up_down_callback (Widget w,
|
||||
XtPointer clientData,
|
||||
XtPointer callData);
|
||||
|
||||
void left_right_pan_callback (XtPointer clientData,
|
||||
XtIntervalId timer_id);
|
||||
|
||||
void up_down_pan_callback (XtPointer clientData,
|
||||
XtIntervalId timer_id);
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,46 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 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: G4OpenGLXmPushButton.hh,v 2.0 1998/07/02 16:45:08 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
//
|
||||
//Push button class. Inherits from G4OpenGLXmVWidgetComponent
|
||||
|
||||
#ifdef G4VIS_BUILD_OPENGLXM_DRIVER
|
||||
|
||||
#ifndef G4OPENGLXMPUSHBUTTON_HH
|
||||
#define G4OPENGLXMPUSHBUTTON_HH
|
||||
|
||||
#include "G4OpenGLXmVWidgetComponent.hh"
|
||||
|
||||
class G4OpenGLXmPushButton : public G4OpenGLXmVWidgetComponent
|
||||
{
|
||||
|
||||
public:
|
||||
G4OpenGLXmPushButton (char* = NULL,
|
||||
XtCallbackRec* = NULL); //constructor
|
||||
~G4OpenGLXmPushButton (); //destructor
|
||||
|
||||
void SetName (char*);
|
||||
char* GetName ();
|
||||
|
||||
void AddYourselfTo (G4OpenGLXmVWidgetContainer*);
|
||||
|
||||
Widget* GetPointerToParent ();
|
||||
Widget* GetPointerToWidget ();
|
||||
|
||||
private:
|
||||
char* name;
|
||||
XtCallbackRec* callback;
|
||||
Widget button;
|
||||
Widget* parent;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,50 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 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: G4OpenGLXmRadioButton.hh,v 2.0 1998/07/02 16:45:10 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
//
|
||||
//Radio button class. Inherits from G4OpenGLXmVWidgetComponent
|
||||
|
||||
#ifdef G4VIS_BUILD_OPENGLXM_DRIVER
|
||||
|
||||
#ifndef G4OPENGLXMRADIOBUTTON_HH
|
||||
#define G4OPENGLXMRADIOBUTTON_HH
|
||||
|
||||
#include "G4OpenGLXmVWidgetComponent.hh"
|
||||
|
||||
class G4OpenGLXmRadioButton : public G4OpenGLXmVWidgetComponent
|
||||
{
|
||||
|
||||
public:
|
||||
G4OpenGLXmRadioButton (char*,
|
||||
XtCallbackRec*,
|
||||
G4bool,
|
||||
G4int); //constructor
|
||||
~G4OpenGLXmRadioButton (); //destructor
|
||||
|
||||
void SetName (char*);
|
||||
char* GetName ();
|
||||
|
||||
void AddYourselfTo (G4OpenGLXmVWidgetContainer*);
|
||||
|
||||
Widget* GetPointerToParent ();
|
||||
Widget* GetPointerToWidget ();
|
||||
|
||||
private:
|
||||
char* name;
|
||||
XtCallbackRec* callback;
|
||||
Widget button;
|
||||
Widget* parent;
|
||||
G4bool default_button;
|
||||
G4int number;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,30 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 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: G4OpenGLXmResources.hh,v 2.1 1998/10/04 11:32:49 ajw Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
//
|
||||
// Default resources file for GEANT4 OpenGL Motif windows.
|
||||
|
||||
#ifdef G4VIS_BUILD_OPENGLXM_DRIVER
|
||||
|
||||
#ifndef G4OPENGLXMRESOURCES_HH
|
||||
#define G4OPENGLXMRESOURCES_HH
|
||||
|
||||
static String fallbackResources[] = {
|
||||
"*glxarea*width: 500", "*glxarea*height: 500",
|
||||
"*frame*x: 10", "*frame*y: 10",
|
||||
"*frame*topOffset: 10", "*frame*bottomOffset: 10",
|
||||
"*frame*rightOffset: 10", "*frame*leftOffset: 10",
|
||||
"*frame*shadowType: SHADOW_IN", "*useColorObj: False",
|
||||
NULL
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,44 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 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: G4OpenGLXmRotationCallbacks.hh,v 2.0 1998/07/02 16:45:16 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
//
|
||||
|
||||
#ifdef G4VIS_BUILD_OPENGLXM_DRIVER
|
||||
|
||||
#ifndef G4OPENGLXMROTATIONCALLBACKS_HH
|
||||
#define G4OPENGLXMROTATIONCALLBACKS_HH
|
||||
|
||||
#include "G4OpenGLXmView.hh"
|
||||
|
||||
void theta_rotation_callback (Widget w,
|
||||
XtPointer clientData,
|
||||
XtPointer callData);
|
||||
|
||||
void rotate_in_theta (XtPointer clientData,
|
||||
XtIntervalId timer_id);
|
||||
|
||||
void phi_rotation_callback (Widget w,
|
||||
XtPointer clientData,
|
||||
XtPointer callData);
|
||||
|
||||
void rotate_in_phi (XtPointer clientData,
|
||||
XtIntervalId timer_id);
|
||||
|
||||
void set_rot_sens_callback (Widget w,
|
||||
XtPointer clientData,
|
||||
XtPointer callData);
|
||||
|
||||
void set_rot_subject_callback (Widget w,
|
||||
XtPointer clientData,
|
||||
XtPointer callData);
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,41 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 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: G4OpenGLXmSeparator.hh,v 2.0 1998/07/02 16:45:17 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
//
|
||||
//Separator class. Inherits from G4OpenGLXmVWidgetComponent
|
||||
|
||||
#ifdef G4VIS_BUILD_OPENGLXM_DRIVER
|
||||
|
||||
#ifndef G4OPENGLXMSEPARATOR_HH
|
||||
#define G4OPENGLXMSEPARATOR_HH
|
||||
|
||||
#include "G4OpenGLXmVWidgetComponent.hh"
|
||||
|
||||
class G4OpenGLXmSeparator : public G4OpenGLXmVWidgetComponent
|
||||
{
|
||||
|
||||
public:
|
||||
G4OpenGLXmSeparator (unsigned char = XmSINGLE_LINE); //constructor
|
||||
~G4OpenGLXmSeparator (); //destructor
|
||||
|
||||
void AddYourselfTo (G4OpenGLXmVWidgetContainer*);
|
||||
|
||||
Widget* GetPointerToParent ();
|
||||
Widget* GetPointerToWidget ();
|
||||
|
||||
private:
|
||||
unsigned char line_type;
|
||||
Widget line;
|
||||
Widget* parent;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,77 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 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: G4OpenGLXmSliderBar.hh,v 2.0 1998/07/02 16:45:20 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
//
|
||||
//Slider bar class. Inherits from G4OpenGLXmVWidgetComponent
|
||||
|
||||
#ifdef G4VIS_BUILD_OPENGLXM_DRIVER
|
||||
|
||||
#ifndef G4OPENGLXMSLIDERBAR_HH
|
||||
#define G4OPENGLXMSLIDERBAR_HH
|
||||
|
||||
#include "G4OpenGLXmVWidgetComponent.hh"
|
||||
|
||||
class G4OpenGLXmSliderBar : public G4OpenGLXmVWidgetComponent
|
||||
{
|
||||
|
||||
public:
|
||||
G4OpenGLXmSliderBar (char* = NULL, // name of slider bar
|
||||
XtCallbackRec* = NULL, // callbacks for slider bar
|
||||
G4bool = False, // show current value if True
|
||||
short = 0, // decimal places for show value
|
||||
G4double = 0., // initial value
|
||||
G4double = 0., // max value
|
||||
G4double = 0., // min value
|
||||
unsigned char = XmHORIZONTAL,
|
||||
unsigned char = XmMAX_ON_RIGHT);
|
||||
//constructor
|
||||
~G4OpenGLXmSliderBar (); //destructor
|
||||
|
||||
void SetName (char*);
|
||||
void SetShow (G4bool);
|
||||
void SetDecimalPlaces (short);
|
||||
void SetInitialValue (G4double);
|
||||
void SetMaxValue (G4double);
|
||||
void SetMinValue (G4double);
|
||||
void SetOrientation (unsigned char);
|
||||
void SetDirection (unsigned char);
|
||||
|
||||
|
||||
char* GetName ();
|
||||
G4bool GetShow ();
|
||||
short GetDecimalPlaces ();
|
||||
G4double GetInitialValue ();
|
||||
G4double GetMaxValue ();
|
||||
G4double GetMinValue ();
|
||||
unsigned char GetOrientation ();
|
||||
unsigned char GetDirection ();
|
||||
|
||||
void AddYourselfTo (G4OpenGLXmVWidgetContainer*);
|
||||
|
||||
Widget* GetPointerToParent ();
|
||||
Widget* GetPointerToWidget ();
|
||||
|
||||
private:
|
||||
char* name;
|
||||
XtCallbackRec* callback;
|
||||
Widget sliderbar;
|
||||
Widget* parent;
|
||||
G4bool show;
|
||||
short decimal_places;
|
||||
G4int initial_value;
|
||||
G4int max_value;
|
||||
G4int min_value;
|
||||
unsigned char orientation;
|
||||
unsigned char direction;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,38 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 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: G4OpenGLXmStyleCallbacks.hh,v 2.0 1998/07/02 16:45:22 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
//
|
||||
|
||||
#ifdef G4VIS_BUILD_OPENGLXM_DRIVER
|
||||
|
||||
#ifndef G4OPENGLXMSTYLECALLBACKS_HH
|
||||
#define G4OPENGLXMSTYLECALLBACKS_HH
|
||||
|
||||
#include "G4OpenGLXmView.hh"
|
||||
|
||||
void drawing_style_callback (Widget w,
|
||||
XtPointer clientData,
|
||||
XtPointer callData);
|
||||
|
||||
void rep_style_callback (Widget w,
|
||||
XtPointer clientData,
|
||||
XtPointer callData);
|
||||
|
||||
void background_color_callback (Widget w,
|
||||
XtPointer clientData,
|
||||
XtPointer callData);
|
||||
|
||||
void projection_callback (Widget w,
|
||||
XtPointer clientData,
|
||||
XtPointer callData);
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,54 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 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: G4OpenGLXmTextField.hh,v 2.2 1998/08/07 12:46:30 barrand Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
//
|
||||
//Text field class. Inherits from G4OpenGLXmVWidgetComponent
|
||||
|
||||
#ifdef G4VIS_BUILD_OPENGLXM_DRIVER
|
||||
|
||||
#ifndef G4OPENGLXMTEXTFIELD_HH
|
||||
#define G4OPENGLXMTEXTFIELD_HH
|
||||
|
||||
#include "G4OpenGLXmVWidgetComponent.hh"
|
||||
//#include "G4OpenGLXmConvenienceRoutines.hh"
|
||||
|
||||
class G4OpenGLXmTextField : public G4OpenGLXmVWidgetComponent
|
||||
{
|
||||
|
||||
public:
|
||||
G4OpenGLXmTextField (char*,G4double*); //constructor
|
||||
G4OpenGLXmTextField (char*,char*); //constructor
|
||||
~G4OpenGLXmTextField (); //destructor
|
||||
|
||||
void SetName (char*);
|
||||
char* GetName ();
|
||||
|
||||
void SetValue (G4double);
|
||||
void SetValue (char*);
|
||||
char* GetValue ();
|
||||
|
||||
void AddYourselfTo (G4OpenGLXmVWidgetContainer*);
|
||||
|
||||
Widget* GetPointerToParent ();
|
||||
Widget* GetPointerToWidget ();
|
||||
|
||||
private:
|
||||
char* name;
|
||||
void* value;
|
||||
G4bool text;
|
||||
char* initial;
|
||||
Widget text_label;
|
||||
Widget text_field;
|
||||
Widget* parent;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,45 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 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: G4OpenGLXmTopLevelShell.hh,v 2.0 1998/07/02 16:45:28 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
//
|
||||
//Top level shell class
|
||||
|
||||
#ifdef G4VIS_BUILD_OPENGLXM_DRIVER
|
||||
|
||||
#ifndef G4OPENGLXMTOPLEVELSHELL_HH
|
||||
#define G4OPENGLXMTOPLEVELSHELL_HH
|
||||
|
||||
#include "G4OpenGLXmVWidgetShell.hh"
|
||||
|
||||
class G4OpenGLXmVWidgetContainer;
|
||||
|
||||
class G4OpenGLXmTopLevelShell : public G4OpenGLXmVWidgetShell
|
||||
{
|
||||
|
||||
public:
|
||||
G4OpenGLXmTopLevelShell(G4OpenGLXmView*, char*); //constructor
|
||||
~G4OpenGLXmTopLevelShell(); //destructor
|
||||
|
||||
void AddChild (G4OpenGLXmVWidgetContainer*);
|
||||
void Realize ();
|
||||
|
||||
Widget* GetPointerToWidget ();
|
||||
char* GetName ();
|
||||
|
||||
private:
|
||||
char* name;
|
||||
Widget toplevel;
|
||||
Widget top_box;
|
||||
Widget frame;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,41 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 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: G4OpenGLXmVWidgetComponent.hh,v 2.0 1998/07/02 16:45:31 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
//
|
||||
//Base class for all Motif component widgets
|
||||
|
||||
#ifdef G4VIS_BUILD_OPENGLXM_DRIVER
|
||||
|
||||
#ifndef G4OPENGLXMVWIDGETCOMPONENT_HH
|
||||
#define G4OPENGLXMVWIDGETCOMPONENT_HH
|
||||
|
||||
#include "G4OpenGLXmVWidgetObject.hh"
|
||||
|
||||
class G4OpenGLXmVWidgetContainer;
|
||||
|
||||
class G4OpenGLXmVWidgetComponent : public G4OpenGLXmVWidgetObject
|
||||
{
|
||||
|
||||
public:
|
||||
G4OpenGLXmVWidgetComponent(); //constructor
|
||||
~G4OpenGLXmVWidgetComponent(); //destructor
|
||||
|
||||
virtual void AddYourselfTo (G4OpenGLXmVWidgetContainer*) = 0;
|
||||
|
||||
virtual Widget* GetPointerToParent () = 0;
|
||||
virtual Widget* GetPointerToWidget () = 0;
|
||||
|
||||
private:
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,43 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 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: G4OpenGLXmVWidgetContainer.hh,v 2.0 1998/07/02 16:45:34 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
//
|
||||
//Base class for all Motif container widgets
|
||||
|
||||
#ifdef G4VIS_BUILD_OPENGLXM_DRIVER
|
||||
|
||||
#ifndef G4OPENGLXMVWIDGETCONTAINER_HH
|
||||
#define G4OPENGLXMVWIDGETCONTAINER_HH
|
||||
|
||||
#include "G4OpenGLXmVWidgetObject.hh"
|
||||
|
||||
class G4OpenGLXmVWidgetShell;
|
||||
class G4OpenGLXmVWidgetComponent;
|
||||
|
||||
class G4OpenGLXmVWidgetContainer : public G4OpenGLXmVWidgetObject
|
||||
{
|
||||
|
||||
public:
|
||||
G4OpenGLXmVWidgetContainer(); //constructor
|
||||
~G4OpenGLXmVWidgetContainer(); //destructor
|
||||
|
||||
virtual void AddChild (G4OpenGLXmVWidgetComponent*) = 0;
|
||||
virtual void AddYourselfTo (G4OpenGLXmVWidgetShell*) = 0;
|
||||
|
||||
virtual Widget* GetPointerToParent () = 0;
|
||||
virtual Widget* GetPointerToWidget () = 0;
|
||||
|
||||
private:
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,47 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 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: G4OpenGLXmVWidgetObject.hh,v 2.0 1998/07/02 16:45:35 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
//
|
||||
//Virtual base class for all Motif widgets.
|
||||
|
||||
#ifdef G4VIS_BUILD_OPENGLXM_DRIVER
|
||||
|
||||
#ifndef G4OPENGLXMVWIDGETOBJECT_HH
|
||||
#define G4OPENGLXMVWIDGETOBJECT_HH
|
||||
|
||||
#include "globals.hh"
|
||||
#include <Xm/Xm.h>
|
||||
#include "X11/Intrinsic.h"
|
||||
#include <X11/Xlib.h>
|
||||
#include "G4OpenGLXmView.hh"
|
||||
|
||||
class G4OpenGLXmVWidgetObject {
|
||||
|
||||
public:
|
||||
|
||||
G4OpenGLXmVWidgetObject (); //constructor
|
||||
~G4OpenGLXmVWidgetObject (); //destructor
|
||||
|
||||
G4OpenGLXmView* GetView (); //access to the pView
|
||||
void ProcesspView ();
|
||||
|
||||
protected:
|
||||
G4OpenGLXmView* pView;
|
||||
Colormap cmap;
|
||||
Pixel borcol;
|
||||
Pixel bgnd;
|
||||
unsigned int depth;
|
||||
Visual* visual;
|
||||
Widget top;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,39 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 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: G4OpenGLXmVWidgetShell.hh,v 2.0 1998/07/02 16:45:38 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
//
|
||||
//Base class for all Motif window widgets (shells)
|
||||
|
||||
#ifdef G4VIS_BUILD_OPENGLXM_DRIVER
|
||||
|
||||
#ifndef G4OPENGLXMVWIDGETSHELL_HH
|
||||
#define G4OPENGLXMVWIDGETSHELL_HH
|
||||
|
||||
#include "G4OpenGLXmVWidgetObject.hh"
|
||||
|
||||
class G4OpenGLXmVWidgetContainer;
|
||||
|
||||
class G4OpenGLXmVWidgetShell : public G4OpenGLXmVWidgetObject
|
||||
{
|
||||
|
||||
public:
|
||||
G4OpenGLXmVWidgetShell(); //constructor
|
||||
~G4OpenGLXmVWidgetShell(); //destructor
|
||||
|
||||
virtual Widget* GetPointerToWidget() = 0;
|
||||
virtual void AddChild (G4OpenGLXmVWidgetContainer*) = 0;
|
||||
virtual void Realize () = 0;
|
||||
|
||||
private:
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,371 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 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: G4OpenGLXmView.hh,v 2.4 1998/10/04 11:32:50 ajw Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 10th February 1997
|
||||
// G4OpenGLXmView : Class derived from G4OpenGLXView, to provide
|
||||
// (Motif) widget OpenGL functionality for GEANT4.
|
||||
|
||||
#ifdef G4VIS_BUILD_OPENGLXM_DRIVER
|
||||
|
||||
#ifndef G4OPENGLXMVIEW_HH
|
||||
#define G4OPENGLXMVIEW_HH
|
||||
|
||||
#include "G4OpenGLXView.hh"
|
||||
#include "G4OpenGLScene.hh"
|
||||
#include "globals.hh"
|
||||
#include <rw/tvordvec.h>
|
||||
|
||||
#include <Xm/Xm.h>
|
||||
#include <Xm/MainW.h>
|
||||
#include <Xm/Label.h>
|
||||
#include <Xm/Form.h>
|
||||
#include <Xm/RowColumn.h>
|
||||
#include <Xm/PushB.h>
|
||||
#include <Xm/ToggleB.h>
|
||||
#include <Xm/ArrowBG.h>
|
||||
#include <Xm/CascadeB.h>
|
||||
#include <Xm/DrawingA.h>
|
||||
#include <Xm/Frame.h>
|
||||
#include <X11/keysym.h>
|
||||
#include <Xm/XmStrDefs.h>
|
||||
#include <X11/Xmu/StdCmap.h>
|
||||
#include <Xm/TextF.h>
|
||||
#include <Xm/ToggleB.h>
|
||||
#include <X11/Shell.h>
|
||||
#include <Xm/Separator.h>
|
||||
#include <Xm/Scale.h>
|
||||
|
||||
class G4OpenGLXmTopLevelShell;
|
||||
class G4OpenGLXmRadioButton;
|
||||
class G4OpenGLXmPushButton;
|
||||
class G4OpenGLXmSliderBar;
|
||||
class G4OpenGLXmBox;
|
||||
class G4OpenGLXmTextField;
|
||||
class G4OpenGLXmFramedBox;
|
||||
class G4OpenGLXmFourArrowButtons;
|
||||
class G4OpenGLXmSeparator;
|
||||
|
||||
class G4OpenGLXmView: public G4OpenGLXView {
|
||||
|
||||
public:
|
||||
G4OpenGLXmView (G4OpenGLScene& scene);
|
||||
~G4OpenGLXmView ();
|
||||
|
||||
protected:
|
||||
virtual void ShowView ();
|
||||
void GetXmConnection ();
|
||||
virtual void CreateMainWindow ();
|
||||
|
||||
XtAppContext app;
|
||||
XtWorkProcId workId;
|
||||
Widget toplevel,
|
||||
shell,
|
||||
main_win,
|
||||
menubar,
|
||||
style_cascade,
|
||||
actions_cascade,
|
||||
misc_cascade,
|
||||
spec_cascade,
|
||||
rep_style_pullright,
|
||||
drawing_style_pullright,
|
||||
background_color_pullright,
|
||||
transparency_pullright,
|
||||
antialias_pullright,
|
||||
haloing_pullright,
|
||||
frame,
|
||||
glxarea;
|
||||
|
||||
XmString style_str,
|
||||
actions_str,
|
||||
misc_str,
|
||||
spec_str,
|
||||
rep_str,
|
||||
draw_str,
|
||||
polyhedron_str,
|
||||
nurbs_str,
|
||||
wireframe_str,
|
||||
hlr_str,
|
||||
hsr_str,
|
||||
hlhsr_str,
|
||||
set_str,
|
||||
rot_str,
|
||||
pan_str,
|
||||
exit_str,
|
||||
quit_str,
|
||||
print_str,
|
||||
white_str,
|
||||
black_str,
|
||||
anti_str,
|
||||
trans_str,
|
||||
halo_str,
|
||||
bgnd_str,
|
||||
off_str,
|
||||
on_str;
|
||||
|
||||
G4double zoom_high,
|
||||
zoom_low,
|
||||
pan_low,
|
||||
pan_high,
|
||||
dolly_low,
|
||||
dolly_high,
|
||||
fov,
|
||||
rot_sens_limit,
|
||||
pan_sens_limit,
|
||||
rot_sens,
|
||||
pan_sens,
|
||||
wob_sens;
|
||||
|
||||
Pixel bgnd,
|
||||
borcol;
|
||||
|
||||
G4bool pan_right,
|
||||
rotate_right,
|
||||
pan_up,
|
||||
rotate_up;
|
||||
|
||||
XtIntervalId rotation_timer,
|
||||
pan_timer,
|
||||
wobble_timer;
|
||||
|
||||
G4Vector3D original_vp;
|
||||
|
||||
G4int frameNo;
|
||||
|
||||
G4OpenGLXmTopLevelShell* fprotation_top;
|
||||
G4OpenGLXmBox* fprotation_button_box;
|
||||
G4OpenGLXmRadioButton* fprotation_button1;
|
||||
G4OpenGLXmRadioButton* fprotation_button2;
|
||||
G4OpenGLXmBox* fprotation_slider_box;
|
||||
G4OpenGLXmSliderBar* fprotation_slider;
|
||||
G4OpenGLXmBox* fprotation_arrow_box;
|
||||
G4OpenGLXmFourArrowButtons* fprotation_arrow;
|
||||
|
||||
G4OpenGLXmTopLevelShell* fppanning_top;
|
||||
G4OpenGLXmFramedBox* fppanning_box;
|
||||
G4OpenGLXmFourArrowButtons* fppanning_arrows;
|
||||
G4OpenGLXmSliderBar* fppanning_slider;
|
||||
G4OpenGLXmFramedBox* fpzoom_box;
|
||||
G4OpenGLXmSliderBar* fpzoom_slider;
|
||||
G4OpenGLXmFramedBox* fpdolly_box;
|
||||
G4OpenGLXmSliderBar* fpdolly_slider;
|
||||
|
||||
G4OpenGLXmTopLevelShell* fpsetting_top;
|
||||
G4OpenGLXmFramedBox* fpsetting_box;
|
||||
G4OpenGLXmTextField* fppan_set;
|
||||
G4OpenGLXmTextField* fprot_set;
|
||||
G4OpenGLXmTextField* fpzoom_upper;
|
||||
G4OpenGLXmTextField* fpzoom_lower;
|
||||
G4OpenGLXmTextField* fpdolly_upper;
|
||||
G4OpenGLXmTextField* fpdolly_lower;
|
||||
G4OpenGLXmPushButton* fpok_button;
|
||||
|
||||
G4OpenGLXmTopLevelShell* fpmiscellany_top;
|
||||
G4OpenGLXmFramedBox* fpwobble_box;
|
||||
G4OpenGLXmPushButton* fpwobble_button;
|
||||
G4OpenGLXmSliderBar* fpwobble_slider;
|
||||
G4OpenGLXmFramedBox* fpreset_box;
|
||||
G4OpenGLXmPushButton* fpreset_button;
|
||||
G4OpenGLXmFramedBox* fpproj_style_box;
|
||||
G4OpenGLXmRadioButton* fporthogonal_button;
|
||||
G4OpenGLXmRadioButton* fpperspective_button;
|
||||
G4OpenGLXmTextField* fpfov_text;
|
||||
|
||||
G4OpenGLXmTopLevelShell* fpprint_top;
|
||||
G4OpenGLXmFramedBox* fpprint_box;
|
||||
G4OpenGLXmFramedBox* fpprint_col_box;
|
||||
G4OpenGLXmFramedBox* fpprint_style_box;
|
||||
G4OpenGLXmTextField* fpprint_text;
|
||||
G4OpenGLXmPushButton* fpprint_button;
|
||||
G4OpenGLXmSeparator* fpprint_line;
|
||||
G4OpenGLXmRadioButton* fpprint_col_radio1;
|
||||
G4OpenGLXmRadioButton* fpprint_col_radio2;
|
||||
G4OpenGLXmRadioButton* fpprint_style_radio1;
|
||||
G4OpenGLXmRadioButton* fpprint_style_radio2;
|
||||
|
||||
public:
|
||||
|
||||
static void expose_callback (Widget w,
|
||||
XtPointer clientData,
|
||||
XtPointer callData);
|
||||
|
||||
static void resize_callback (Widget w,
|
||||
XtPointer clientData,
|
||||
XtPointer callData);
|
||||
|
||||
static void actions_callback (Widget w,
|
||||
XtPointer clientData,
|
||||
XtPointer callData);
|
||||
|
||||
static void misc_callback (Widget w,
|
||||
XtPointer clientData,
|
||||
XtPointer callData);
|
||||
|
||||
static void Add_set_field (char* widget,
|
||||
char* widget_text,
|
||||
Widget* row_col_box,
|
||||
Widget* wid,
|
||||
G4double* val,
|
||||
G4OpenGLXmView* pView);
|
||||
|
||||
static void zoom_callback (Widget w,
|
||||
XtPointer clientData,
|
||||
XtPointer callData);
|
||||
|
||||
static void dolly_callback (Widget w,
|
||||
XtPointer clientData,
|
||||
XtPointer callData);
|
||||
|
||||
static void pan_left_right_callback (Widget w,
|
||||
XtPointer clientData,
|
||||
XtPointer callData);
|
||||
|
||||
static void left_right_pan_callback (XtPointer clientData,
|
||||
XtIntervalId* timer_id);
|
||||
|
||||
static void theta_rotation_callback (Widget w,
|
||||
XtPointer clientData,
|
||||
XtPointer callData);
|
||||
|
||||
static void phi_rotation_callback (Widget w,
|
||||
XtPointer clientData,
|
||||
XtPointer callData);
|
||||
|
||||
static void pan_up_down_callback (Widget w,
|
||||
XtPointer clientData,
|
||||
XtPointer callData);
|
||||
|
||||
static void up_down_pan_callback (XtPointer clientData,
|
||||
XtIntervalId* timer_id);
|
||||
|
||||
static void drawing_style_callback (Widget w,
|
||||
XtPointer clientData,
|
||||
XtPointer callData);
|
||||
|
||||
static void rep_style_callback (Widget w,
|
||||
XtPointer clientData,
|
||||
XtPointer callData);
|
||||
|
||||
static void background_color_callback (Widget w,
|
||||
XtPointer clientData,
|
||||
XtPointer callData);
|
||||
|
||||
static void set_rot_subject_callback (Widget w,
|
||||
XtPointer clientData,
|
||||
XtPointer callData);
|
||||
|
||||
static void set_rot_sens_callback (Widget w,
|
||||
XtPointer clientData,
|
||||
XtPointer callData);
|
||||
|
||||
static void set_pan_sens_callback (Widget w,
|
||||
XtPointer clientData,
|
||||
XtPointer callData);
|
||||
|
||||
static void set_wob_sens_callback (Widget w,
|
||||
XtPointer clientData,
|
||||
XtPointer callData);
|
||||
|
||||
static void projection_callback (Widget w,
|
||||
XtPointer clientData,
|
||||
XtPointer callData);
|
||||
|
||||
static void wobble_callback (Widget w,
|
||||
XtPointer clientData,
|
||||
XtPointer callData);
|
||||
|
||||
static void reset_callback (Widget w,
|
||||
XtPointer clientData,
|
||||
XtPointer callData);
|
||||
|
||||
static void update_panels_callback (Widget w,
|
||||
XtPointer clientData,
|
||||
XtPointer callData);
|
||||
|
||||
static void wobble_timer_callback (XtPointer clientData,
|
||||
XtIntervalId* timerid);
|
||||
|
||||
static void Add_radio_box (char* label_string,
|
||||
Widget* parent_frame_widget,
|
||||
XtCallbackRec* radio_box_cb,
|
||||
G4int num_buttons,
|
||||
G4int default_button,
|
||||
char* radio_box_name,
|
||||
char** button_names,
|
||||
G4OpenGLXmView* pView);
|
||||
|
||||
static void Add_four_arrow_buttons (G4OpenGLXmView* pView,
|
||||
XtCallbackRec** arrow_callbacks,
|
||||
Widget* parent_widget);
|
||||
|
||||
static void Add_slider_box (char* label_string,
|
||||
G4int num_sliders,
|
||||
char** slider_name,
|
||||
G4OpenGLXmView* pView,
|
||||
G4double* min_array,
|
||||
G4double* max_array,
|
||||
G4double* value_array,
|
||||
G4bool* show,
|
||||
short* decimals,
|
||||
unsigned char* orientation,
|
||||
unsigned char* direction,
|
||||
XtCallbackRec** slider_box_cb,
|
||||
Widget* parent_frame_widget);
|
||||
|
||||
static void rotate_in_theta (XtPointer clientData,
|
||||
XtIntervalId* timer_id);
|
||||
|
||||
static void rotate_in_phi (XtPointer clientData,
|
||||
XtIntervalId* timer_id);
|
||||
|
||||
static void get_double_value_callback (Widget w,
|
||||
XtPointer clientData,
|
||||
XtPointer callData);
|
||||
|
||||
static void get_text_callback (Widget w,
|
||||
XtPointer clientData,
|
||||
XtPointer callData);
|
||||
|
||||
static void transparency_callback (Widget w,
|
||||
XtPointer clientData,
|
||||
XtPointer callData);
|
||||
|
||||
static void antialias_callback (Widget w,
|
||||
XtPointer clientData,
|
||||
XtPointer callData);
|
||||
|
||||
static void haloing_callback (Widget w,
|
||||
XtPointer clientData,
|
||||
XtPointer callData);
|
||||
|
||||
static void set_print_colour_callback (Widget w,
|
||||
XtPointer clientData,
|
||||
XtPointer callData);
|
||||
|
||||
static void set_print_style_callback (Widget w,
|
||||
XtPointer clientData,
|
||||
XtPointer callData);
|
||||
|
||||
static void print_callback (Widget w,
|
||||
XtPointer clientData,
|
||||
XtPointer callData);
|
||||
|
||||
static G4bool get_boolean_userData (Widget w);
|
||||
|
||||
static G4int get_int_userData (Widget w);
|
||||
|
||||
friend class G4OpenGLXmVWidgetObject;
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 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: G4OpenGLXmWindowHandlingCallbacks.hh,v 2.0 1998/07/02 16:45:43 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
//
|
||||
|
||||
#ifdef G4VIS_BUILD_OPENGLXM_DRIVER
|
||||
|
||||
#ifndef G4OPENGLXMWINDOWHANDLINGCALLBACKS_HH
|
||||
#define G4OPENGLXMWINDOWHANDLINGCALLBACKS_HH
|
||||
|
||||
#include "G4OpenGLXmView.hh"
|
||||
|
||||
void expose_callback (Widget w, XtPointer clientData, XtPointer callData);
|
||||
void resize_callback (Widget w, XtPointer clientData, XtPointer callData);
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user