TGLViewerEditor.h

Go to the documentation of this file.
00001 // @(#)root/gl:$Id$
00002 // Author:  Alja Mrak-Tadel, Matevz Tadel, Timur Pocheptsov 08/03/2006
00003 
00004 /*************************************************************************
00005  * Copyright (C) 1995-2006, Rene Brun and Fons Rademakers.               *
00006  * All rights reserved.                                                  *
00007  *                                                                       *
00008  * For the licensing terms see $ROOTSYS/LICENSE.                         *
00009  * For the list of contributors see $ROOTSYS/README/CREDITS.             *
00010  *************************************************************************/
00011 
00012 #ifndef ROOT_TGLViewerEditor
00013 #define ROOT_TGLViewerEditor
00014 
00015 #include <memory>
00016 
00017 #ifndef ROOT_TGedFrame
00018 #include "TGedFrame.h"
00019 #endif
00020 
00021 #ifndef ROOT_TGLUtil
00022 #include "TGLUtil.h"
00023 #endif
00024 
00025 class TGCheckButton;
00026 class TGNumberEntry;
00027 class TGButtonGroup;
00028 class TGroupFrame;
00029 class TGRadioButton;
00030 class TGColorSelect;
00031 class TGComboBox;
00032 class TGButton;
00033 class TGLViewer;
00034 class TGTab;
00035 
00036 class TGLLightSetSubEditor;
00037 class TGLClipSetSubEditor;
00038 
00039 class TGLViewerEditor : public TGedFrame
00040 {
00041 private:
00042    //Pointers to manipulate with tabs
00043    TGCompositeFrame *fGuidesFrame;
00044    TGCompositeFrame *fClipFrame;
00045    TGCompositeFrame *fStereoFrame;
00046 
00047    TGLLightSetSubEditor *fLightSet;
00048 
00049    TGColorSelect    *fClearColor;
00050    TGCheckButton    *fIgnoreSizesOnUpdate;
00051    TGCheckButton    *fResetCamerasOnUpdate;
00052    TGTextButton     *fUpdateScene;
00053    TGTextButton     *fCameraHome;
00054 
00055    TGNumberEntry    *fMaxSceneDrawTimeHQ;
00056    TGNumberEntry    *fMaxSceneDrawTimeLQ;
00057 
00058    TGNumberEntry    *fPointSizeScale;
00059    TGNumberEntry    *fLineWidthScale;
00060    TGCheckButton    *fPointSmooth;
00061    TGCheckButton    *fLineSmooth;
00062    TGNumberEntry    *fWFLineWidth;
00063    TGNumberEntry    *fOLLineWidth;
00064 
00065    //"Guides" tab's controls
00066    TGCheckButton    *fCameraCenterExt;
00067    TGTextButton     *fCaptureCenter;
00068    TGCheckButton    *fDrawCameraCenter;
00069    TGNumberEntry    *fCameraCenterX;
00070    TGNumberEntry    *fCameraCenterY;
00071    TGNumberEntry    *fCameraCenterZ;
00072 
00073    TGCheckButton*    fCaptureAnnotate;
00074 
00075    Int_t             fAxesType;
00076    TGButtonGroup    *fAxesContainer;
00077    TGRadioButton    *fAxesNone;
00078    TGRadioButton    *fAxesEdge;
00079    TGRadioButton    *fAxesOrigin;
00080    TGCheckButton    *fAxesDepthTest;
00081 
00082    TGGroupFrame     *fRefContainer;
00083    TGCheckButton    *fReferenceOn;
00084    TGNumberEntry    *fReferencePosX;
00085    TGNumberEntry    *fReferencePosY;
00086    TGNumberEntry    *fReferencePosZ;
00087 
00088    TGGroupFrame     *fCamContainer;
00089    TGComboBox*       fCamMode;
00090    TGCheckButton*    fCamOverlayOn;
00091 
00092    TGLClipSetSubEditor *fClipSet;
00093 
00094    TGNumberEntry    *fARotDt,     *fARotWPhi;
00095    TGNumberEntry    *fARotATheta, *fARotWTheta;
00096    TGNumberEntry    *fARotADolly, *fARotWDolly;
00097 
00098    TGNumberEntry    *fStereoZeroParallax;
00099    TGNumberEntry    *fStereoEyeOffsetFac;
00100    TGNumberEntry    *fStereoFrustumAsymFac;
00101 
00102    //Model
00103    TGLViewer        *fViewer;
00104    Bool_t            fIsInPad;
00105 
00106    void ConnectSignals2Slots();
00107 
00108    TGLViewerEditor(const TGLViewerEditor &);
00109    TGLViewerEditor &operator = (const TGLViewerEditor &);
00110 
00111    void CreateStyleTab();
00112    void CreateGuidesTab();
00113    void CreateClippingTab();
00114    void CreateExtrasTab();
00115 
00116    void UpdateReferencePosState();
00117 
00118 public:
00119    TGLViewerEditor(const TGWindow *p=0, Int_t width=140, Int_t height=30,
00120                    UInt_t options=kChildFrame, Pixel_t back=GetDefaultFrameBackground());
00121    ~TGLViewerEditor();
00122 
00123    virtual void ViewerRedraw();
00124 
00125    virtual void SetModel(TObject* obj);
00126 
00127    void SetGuides();
00128    void DoClearColor(Pixel_t color);
00129    void DoIgnoreSizesOnUpdate();
00130    void DoResetCamerasOnUpdate();
00131    void DoUpdateScene();
00132    void DoCameraHome();
00133    void UpdateMaxDrawTimes();
00134    void UpdatePointLineStuff();
00135    void DoCameraCenterExt();
00136    void DoCaptureCenter();
00137    void DoAnnotation();
00138    void DoDrawCameraCenter();
00139    void UpdateCameraCenter();
00140    //Axis manipulation
00141    void UpdateViewerAxes(Int_t id);
00142    void UpdateViewerReference();
00143    void DoCameraOverlay();
00144    // Extras
00145    void UpdateRotator();
00146    void DoRotatorStart();
00147    void DoRotatorStop();
00148    void UpdateStereo();
00149 
00150    void DetachFromPad(){fIsInPad = kFALSE;}
00151 
00152    static TGNumberEntry* MakeLabeledNEntry(TGCompositeFrame* p, const char* name,
00153                                            Int_t labelw, Int_t nd=7, Int_t s=5);
00154 
00155    ClassDef(TGLViewerEditor, 0); //GUI for editing TGLViewer attributes
00156 };
00157 
00158 #endif

Generated on Tue Jul 5 14:16:56 2011 for ROOT_528-00b_version by  doxygen 1.5.1