G4OpenGLXmSliderBar.hh

Go to the documentation of this file.
00001 //
00002 // ********************************************************************
00003 // * License and Disclaimer                                           *
00004 // *                                                                  *
00005 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
00006 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
00007 // * conditions of the Geant4 Software License,  included in the file *
00008 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
00009 // * include a list of copyright holders.                             *
00010 // *                                                                  *
00011 // * Neither the authors of this software system, nor their employing *
00012 // * institutes,nor the agencies providing financial support for this *
00013 // * work  make  any representation or  warranty, express or implied, *
00014 // * regarding  this  software system or assume any liability for its *
00015 // * use.  Please see the license in the file  LICENSE  and URL above *
00016 // * for the full disclaimer and the limitation of liability.         *
00017 // *                                                                  *
00018 // * This  code  implementation is the result of  the  scientific and *
00019 // * technical work of the GEANT4 collaboration.                      *
00020 // * By using,  copying,  modifying or  distributing the software (or *
00021 // * any work based  on the software)  you  agree  to acknowledge its *
00022 // * use  in  resulting  scientific  publications,  and indicate your *
00023 // * acceptance of all terms of the Geant4 Software license.          *
00024 // ********************************************************************
00025 //
00026 //
00027 // $Id$
00028 //
00029 // 
00030 //Slider bar class. Inherits from G4OpenGLXmVWidgetComponent
00031 
00032 #ifdef G4VIS_BUILD_OPENGLXM_DRIVER
00033 
00034 #ifndef G4OPENGLXMSLIDERBAR_HH
00035 #define G4OPENGLXMSLIDERBAR_HH
00036 
00037 #include "G4OpenGLXmVWidgetComponent.hh"
00038 
00039 class G4OpenGLXmSliderBar : public G4OpenGLXmVWidgetComponent
00040 {
00041 
00042 public:
00043   G4OpenGLXmSliderBar (const char* = NULL,     // name of slider bar
00044                        XtCallbackRec* = NULL,  // callbacks for slider bar
00045                        G4bool = False,         // show current value if True
00046                        short = 0,              // decimal places for show value
00047                        G4double = 0.,          // initial value
00048                        G4double = 0.,          // max value
00049                        G4double = 0.,          // min value
00050                        unsigned char = XmHORIZONTAL,
00051                        unsigned char = XmMAX_ON_RIGHT); 
00052                                                //constructor
00053   virtual ~G4OpenGLXmSliderBar ();             //destructor
00054 
00055   void SetName (const char*);
00056   void SetShow (G4bool);
00057   void SetDecimalPlaces (short);
00058   void SetInitialValue (G4double);
00059   void SetMaxValue (G4double);
00060   void SetMinValue (G4double);
00061   void SetOrientation (unsigned char);
00062   void SetDirection (unsigned char);
00063 
00064  
00065   const char* GetName ();
00066   G4bool GetShow ();
00067   short GetDecimalPlaces ();
00068   G4double GetInitialValue ();
00069   G4double GetMaxValue ();
00070   G4double GetMinValue ();
00071   unsigned char GetOrientation ();
00072   unsigned char GetDirection ();
00073 
00074   void AddYourselfTo (G4OpenGLXmVWidgetContainer*);
00075 
00076   Widget* GetPointerToParent ();
00077   Widget* GetPointerToWidget ();
00078 
00079 private:
00080   G4OpenGLXmSliderBar (const G4OpenGLXmSliderBar&);
00081   G4OpenGLXmSliderBar& operator = (const G4OpenGLXmSliderBar&);
00082   const char* name;
00083   XtCallbackRec* callback;
00084   Widget sliderbar;
00085   Widget* parent;
00086   G4bool show;
00087   short decimal_places;
00088   G4int initial_value;
00089   G4int max_value;
00090   G4int min_value;
00091   unsigned char orientation;
00092   unsigned char direction;
00093 };
00094 
00095 #endif
00096 
00097 #endif

Generated on Mon May 27 17:49:11 2013 for Geant4 by  doxygen 1.4.7