Skip to content
Snippets Groups Projects
Commit b49a5a7d authored by Fons Rademakers's avatar Fons Rademakers
Browse files

add missing cvs ident lines.

git-svn-id: http://root.cern.ch/svn/root/trunk@16349 27541ba8-7e3a-0410-8455-c3a389f83636
parent 8e888284
No related branches found
No related tags found
No related merge requests found
// @(#)root/geombuilder:$Name: $:$Id: TProof.h,v 1.88 2006/08/06 07:15:00 rdm Exp $
// Author: Matevz Tadel 25/09/2006
#ifndef ROOT_TGeoGedFrame #ifndef ROOT_TGeoGedFrame
#define ROOT_TGeoGedFrame #define ROOT_TGeoGedFrame
...@@ -9,8 +12,8 @@ class TGTab; ...@@ -9,8 +12,8 @@ class TGTab;
class TGeoTabManager; class TGeoTabManager;
class TVirtualPad; class TVirtualPad;
class TGeoGedFrame : public TGedFrame class TGeoGedFrame : public TGedFrame {
{
protected: protected:
TGTab *fTab; TGTab *fTab;
TGeoTabManager *fTabMgr; TGeoTabManager *fTabMgr;
......
// @(#)root/geombuilder:$Name: $:$Id: TProof.h,v 1.88 2006/08/06 07:15:00 rdm Exp $
// Author: Matevz Tadel 25/09/2006
#include "TGeoGedFrame.h" #include "TGeoGedFrame.h"
#include "TGeoTabManager.h" #include "TGeoTabManager.h"
#include "TGedEditor.h" #include "TGedEditor.h"
......
// @(#)root/gl:$Name: $:$Id: TProof.h,v 1.88 2006/08/06 07:15:00 rdm Exp $
// Author: Matevz Tadel 25/09/2006
#ifndef ROOT_TGLPShapeObjEditor #ifndef ROOT_TGLPShapeObjEditor
#define ROOT_TGLPShapeObjEditor #define ROOT_TGLPShapeObjEditor
#include <memory> #include <memory>
class TGLPShapeObj;
#ifndef ROOT_TGedFrame #ifndef ROOT_TGedFrame
#include "TGedFrame.h" #include "TGedFrame.h"
...@@ -12,6 +14,7 @@ class TGLPShapeObj; ...@@ -12,6 +14,7 @@ class TGLPShapeObj;
#include "TGLUtil.h" #include "TGLUtil.h"
#endif #endif
class TGLPShapeObj;
class TGLayoutHints; class TGLayoutHints;
class TGCheckButton; class TGCheckButton;
class TGNumberEntry; class TGNumberEntry;
...@@ -27,8 +30,8 @@ class TGLMatView; ...@@ -27,8 +30,8 @@ class TGLMatView;
class TGLPShapeObjEditor : public TGedFrame { class TGLPShapeObjEditor : public TGedFrame {
private:
private:
enum ELightMode{kDiffuse, kAmbient, kSpecular, kEmission, kLTot}; enum ELightMode{kDiffuse, kAmbient, kSpecular, kEmission, kLTot};
ELightMode fLMode; ELightMode fLMode;
...@@ -44,18 +47,18 @@ private: ...@@ -44,18 +47,18 @@ private:
// "Geometry" tab's controls // "Geometry" tab's controls
TGNumberEntry *fGeomData[6]; //position and clipping control TGNumberEntry *fGeomData[6]; //position and clipping control
TGButton *fGeoApplyButton; //action button TGButton *fGeoApplyButton; //action button
// "Color" tab's controls // "Color" tab's controls
TGCompositeFrame *fColorFrame; //top frame for color componet control TGCompositeFrame *fColorFrame; //top frame for color componet control
TGLMatView *fMatView; //inner structure to handle sphere GL window TGLMatView *fMatView; //inner structure to handle sphere GL window
TGButton *fLightTypes[4]; //light type TGButton *fLightTypes[4]; //light type
TGHSlider *fRedSlider; //red component of selected material TGHSlider *fRedSlider; //red component of selected material
TGHSlider *fGreenSlider; //green component of selected material TGHSlider *fGreenSlider; //green component of selected material
TGHSlider *fBlueSlider; //blue component of selected material TGHSlider *fBlueSlider; //blue component of selected material
TGHSlider *fAlphaSlider; //alpha component of selected material lider; TGHSlider *fAlphaSlider; //alpha component of selected material lider;
TGHSlider *fShineSlider; //specular refelction of selected material TGHSlider *fShineSlider; //specular refelction of selected material
TGButton *fColorApplyButton; //apply to selected TGButton *fColorApplyButton; //apply to selected
TGButton *fColorApplyFamily; //apply to selected and family TGButton *fColorApplyFamily; //apply to selected and family
...@@ -94,7 +97,7 @@ public: ...@@ -94,7 +97,7 @@ public:
Bool_t HandleContainerNotify(Event_t *event); Bool_t HandleContainerNotify(Event_t *event);
Bool_t HandleContainerExpose(Event_t *event); Bool_t HandleContainerExpose(Event_t *event);
void DrawSphere()const; void DrawSphere()const;
void SetRGBA(const Float_t *rgba); void SetRGBA(const Float_t *rgba);
const Float_t *GetRGBA()const{return fRGBA;} const Float_t *GetRGBA()const{return fRGBA;}
//color slots //color slots
......
// @(#)root/gl:$Name: $:$Id: TProof.h,v 1.88 2006/08/06 07:15:00 rdm Exp $
// Author: Matevz Tadel 25/09/2006
#include <cstring> #include <cstring>
#include "TGLPShapeObjEditor.h" #include "TGLPShapeObjEditor.h"
#include "TGedEditor.h" #include "TGedEditor.h"
#include "TG3DLine.h" #include "TG3DLine.h"
#include "TGButton.h" #include "TGButton.h"
#include "TGButtonGroup.h" #include "TGButtonGroup.h"
...@@ -64,11 +66,11 @@ Bool_t TGLMatView::HandleExpose(Event_t *event) ...@@ -64,11 +66,11 @@ Bool_t TGLMatView::HandleExpose(Event_t *event)
ClassImp(TGLPShapeObjEditor) ClassImp(TGLPShapeObjEditor)
enum EGeometry { enum EGeometry {
kCenterX, kCenterX,
kCenterY, kCenterY,
kCenterZ, kCenterZ,
kScaleX, kScaleX,
kScaleY, kScaleY,
kScaleZ, kScaleZ,
kTot kTot
}; };
...@@ -84,7 +86,7 @@ enum EApplyButtonIds { ...@@ -84,7 +86,7 @@ enum EApplyButtonIds {
kTBRight, kTBRight,
kTBBottom, kTBBottom,
kTBLeft, kTBLeft,
kTBFront, kTBFront,
kTBa1, kTBa1,
kTBGuide kTBGuide
}; };
...@@ -106,32 +108,31 @@ enum EGLEditorIdent { ...@@ -106,32 +108,31 @@ enum EGLEditorIdent {
//______________________________________________________________________________ //______________________________________________________________________________
TGLPShapeObjEditor::TGLPShapeObjEditor(const TGWindow *p, Int_t width, Int_t height, UInt_t options, Pixel_t back) TGLPShapeObjEditor::TGLPShapeObjEditor(const TGWindow *p, Int_t width, Int_t height, UInt_t options, Pixel_t back)
: TGedFrame(p, width, height, options | kVerticalFrame, back), : TGedFrame(p, width, height, options | kVerticalFrame, back),
fLb(kLHintsTop | kLHintsCenterX | kLHintsExpandX, 2, 2, 3, 3), //button fLb(kLHintsTop | kLHintsCenterX | kLHintsExpandX, 2, 2, 3, 3), //button
fLe(kLHintsTop | kLHintsCenterX | kLHintsExpandX, 0, 0, 3, 3), //entries fLe(kLHintsTop | kLHintsCenterX | kLHintsExpandX, 0, 0, 3, 3), //entries
fLl(kLHintsLeft, 0, 8, 6, 0), // labels fLl(kLHintsLeft, 0, 8, 6, 0), // labels
fLs(kLHintsTop | kLHintsCenterX, 2, 2, 0, 0), ///sliders fLs(kLHintsTop | kLHintsCenterX, 2, 2, 0, 0), ///sliders
fIsActive(kTRUE), fGeoFrame(0),fGeoApplyButton(0), fIsActive(kTRUE), fGeoFrame(0),fGeoApplyButton(0),
fColorFrame(0), fColorFrame(0),
fRedSlider(0), fGreenSlider(0), fBlueSlider(0), fAlphaSlider(0), fShineSlider(0), fRedSlider(0), fGreenSlider(0), fBlueSlider(0), fAlphaSlider(0), fShineSlider(0),
fColorApplyButton(0), fColorApplyFamily(0), fColorApplyButton(0), fColorApplyFamily(0),
fIsLight(kFALSE), fRGBA(), fIsLight(kFALSE), fRGBA(),
fGLWin(0), fGLWin(0),
fPShapeObj(0) fPShapeObj(0)
{ {
// Constructor of TGLPhysicalShape editor GUI. // Constructor of TGLPhysicalShape editor GUI.
fRGBA[12] = 0.f, fRGBA[13] = 0.f, fRGBA[14] = 0.f; fRGBA[12] = 0.f, fRGBA[13] = 0.f, fRGBA[14] = 0.f;
fRGBA[15] = 1.f, fRGBA[16] = 60.f; fRGBA[15] = 1.f, fRGBA[16] = 60.f;
CreateColorControls(); CreateColorControls();
CreateGeoControls(); CreateGeoControls();
} }
//______________________________________________________________________________ //______________________________________________________________________________
TGLPShapeObjEditor::~TGLPShapeObjEditor() TGLPShapeObjEditor::~TGLPShapeObjEditor()
{ {
// Destroy color editor GUI component // Destroy color editor GUI component.
delete fMatView; delete fMatView;
gVirtualGL->DeleteContext(fCtx); gVirtualGL->DeleteContext(fCtx);
} }
...@@ -139,8 +140,8 @@ TGLPShapeObjEditor::~TGLPShapeObjEditor() ...@@ -139,8 +140,8 @@ TGLPShapeObjEditor::~TGLPShapeObjEditor()
//______________________________________________________________________________ //______________________________________________________________________________
void TGLPShapeObjEditor::SetModel(TObject* obj) void TGLPShapeObjEditor::SetModel(TObject* obj)
{ {
//Sets model or disables/hides viewer // Sets model or disables/hides viewer.
fPShapeObj = 0; fPShapeObj = 0;
fPShapeObj = static_cast<TGLPShapeObj *>(obj); fPShapeObj = static_cast<TGLPShapeObj *>(obj);
...@@ -153,7 +154,7 @@ void TGLPShapeObjEditor::SetModel(TObject* obj) ...@@ -153,7 +154,7 @@ void TGLPShapeObjEditor::SetModel(TObject* obj)
//______________________________________________________________________________ //______________________________________________________________________________
void TGLPShapeObjEditor::SetCenter(const Double_t *c) void TGLPShapeObjEditor::SetCenter(const Double_t *c)
{ {
// Set internal center data from 3 component 'c' // Set internal center data from 3 component 'c'.
fGeoApplyButton->SetState(kButtonDisabled); fGeoApplyButton->SetState(kButtonDisabled);
fGeomData[kCenterX]->SetNumber(c[0]); fGeomData[kCenterX]->SetNumber(c[0]);
...@@ -164,7 +165,7 @@ void TGLPShapeObjEditor::SetCenter(const Double_t *c) ...@@ -164,7 +165,7 @@ void TGLPShapeObjEditor::SetCenter(const Double_t *c)
//______________________________________________________________________________ //______________________________________________________________________________
void TGLPShapeObjEditor::SetScale(const Double_t *s) void TGLPShapeObjEditor::SetScale(const Double_t *s)
{ {
// Set internal scale data from 3 component 'c' // Set internal scale data from 3 component 'c'.
fGeomData[kScaleX]->SetNumber(s[0]); fGeomData[kScaleX]->SetNumber(s[0]);
fGeomData[kScaleY]->SetNumber(s[1]); fGeomData[kScaleY]->SetNumber(s[1]);
...@@ -175,7 +176,7 @@ void TGLPShapeObjEditor::SetScale(const Double_t *s) ...@@ -175,7 +176,7 @@ void TGLPShapeObjEditor::SetScale(const Double_t *s)
void TGLPShapeObjEditor::GeoDisable() void TGLPShapeObjEditor::GeoDisable()
{ {
// Disable "Apply" button. // Disable "Apply" button.
fIsActive = kFALSE; fIsActive = kFALSE;
fGeoApplyButton->SetState(kButtonDisabled); fGeoApplyButton->SetState(kButtonDisabled);
} }
...@@ -195,7 +196,7 @@ void TGLPShapeObjEditor::DoGeoButton() ...@@ -195,7 +196,7 @@ void TGLPShapeObjEditor::DoGeoButton()
fPShapeObj->fViewer->SetSelectedGeom(trans,scale); fPShapeObj->fViewer->SetSelectedGeom(trans,scale);
if (wid == kTBa1) { if (wid == kTBa1) {
fGeoApplyButton->SetState(kButtonDisabled); fGeoApplyButton->SetState(kButtonDisabled);
} }
} }
} }
...@@ -203,7 +204,7 @@ void TGLPShapeObjEditor::DoGeoButton() ...@@ -203,7 +204,7 @@ void TGLPShapeObjEditor::DoGeoButton()
void TGLPShapeObjEditor::GetObjectData(Double_t *center, Double_t *scale) void TGLPShapeObjEditor::GetObjectData(Double_t *center, Double_t *scale)
{ {
// Extract the GUI object data, return center in 3 component 'center' // Extract the GUI object data, return center in 3 component 'center'
// scale in 3 component 'scale' // scale in 3 component 'scale'.
center[0] = fGeomData[kCenterX]->GetNumber(); center[0] = fGeomData[kCenterX]->GetNumber();
center[1] = fGeomData[kCenterY]->GetNumber(); center[1] = fGeomData[kCenterY]->GetNumber();
...@@ -216,7 +217,7 @@ void TGLPShapeObjEditor::GetObjectData(Double_t *center, Double_t *scale) ...@@ -216,7 +217,7 @@ void TGLPShapeObjEditor::GetObjectData(Double_t *center, Double_t *scale)
//______________________________________________________________________________ //______________________________________________________________________________
void TGLPShapeObjEditor::GeoValueSet(Long_t) void TGLPShapeObjEditor::GeoValueSet(Long_t)
{ {
// Process setting of value in edit box - activate 'Apply' button // Process setting of value in edit box - activate 'Apply' button.
if (!fIsActive)return; if (!fIsActive)return;
fGeoApplyButton->SetState(kButtonUp); fGeoApplyButton->SetState(kButtonUp);
...@@ -225,17 +226,18 @@ void TGLPShapeObjEditor::GeoValueSet(Long_t) ...@@ -225,17 +226,18 @@ void TGLPShapeObjEditor::GeoValueSet(Long_t)
//______________________________________________________________________________ //______________________________________________________________________________
void TGLPShapeObjEditor::CreateGeoControls() void TGLPShapeObjEditor::CreateGeoControls()
{ {
// Create GUI for setting scale and position. // Create GUI for setting scale and position.
fGeoFrame = new TGVerticalFrame(); fGeoFrame = new TGVerticalFrame();
AddExtraTab(new TGedSubFrame(TString("Geometry"), fGeoFrame)); AddExtraTab(new TGedSubFrame(TString("Geometry"), fGeoFrame));
TGLabel *label=0; TGLabel *label=0;
// postion containers // postion containers
TGGroupFrame* container = new TGGroupFrame(fGeoFrame, "Object position:"); TGGroupFrame* container = new TGGroupFrame(fGeoFrame, "Object position:");
container->SetTitlePos(TGGroupFrame::kLeft); container->SetTitlePos(TGGroupFrame::kLeft);
fGeoFrame->AddFrame(container, new TGLayoutHints(kLHintsTop | kLHintsCenterX | kLHintsExpandX, 8, 8, 3, 3));//- fGeoFrame->AddFrame(container, new TGLayoutHints(kLHintsTop | kLHintsCenterX | kLHintsExpandX, 8, 8, 3, 3));//-
TGLayoutHints lh = TGLayoutHints(kLHintsTop | kLHintsCenterX | kLHintsExpandX, 0, 0, 0, 0); TGLayoutHints lh = TGLayoutHints(kLHintsTop | kLHintsCenterX | kLHintsExpandX, 0, 0, 0, 0);
TGHorizontalFrame* hf; TGHorizontalFrame* hf;
hf = new TGHorizontalFrame(container); hf = new TGHorizontalFrame(container);
...@@ -243,7 +245,7 @@ void TGLPShapeObjEditor::CreateGeoControls() ...@@ -243,7 +245,7 @@ void TGLPShapeObjEditor::CreateGeoControls()
hf->AddFrame(label, new TGLayoutHints(fLl)); hf->AddFrame(label, new TGLayoutHints(fLl));
fGeomData[kCenterX] = new TGNumberEntry(hf, 0.0, 8, kNExc); fGeomData[kCenterX] = new TGNumberEntry(hf, 0.0, 8, kNExc);
hf->AddFrame(fGeomData[kCenterX], new TGLayoutHints(fLe)); hf->AddFrame(fGeomData[kCenterX], new TGLayoutHints(fLe));
fGeomData[kCenterX]->Connect("ValueSet(Long_t)", "TGLPShapeObjEditor", fGeomData[kCenterX]->Connect("ValueSet(Long_t)", "TGLPShapeObjEditor",
this, "GeoValueSet(Long_t)"); this, "GeoValueSet(Long_t)");
container->AddFrame(hf, new TGLayoutHints(lh)); container->AddFrame(hf, new TGLayoutHints(lh));
...@@ -252,18 +254,18 @@ void TGLPShapeObjEditor::CreateGeoControls() ...@@ -252,18 +254,18 @@ void TGLPShapeObjEditor::CreateGeoControls()
hf->AddFrame(label, new TGLayoutHints(fLl)); hf->AddFrame(label, new TGLayoutHints(fLl));
fGeomData[kCenterY] = new TGNumberEntry(hf, 0.0, 8, kNEyc); fGeomData[kCenterY] = new TGNumberEntry(hf, 0.0, 8, kNEyc);
hf->AddFrame(fGeomData[kCenterY], new TGLayoutHints(fLe)); hf->AddFrame(fGeomData[kCenterY], new TGLayoutHints(fLe));
fGeomData[kCenterY]->Connect("ValueSet(Long_t)", "TGLPShapeObjEditor", fGeomData[kCenterY]->Connect("ValueSet(Long_t)", "TGLPShapeObjEditor",
this, "GeoValueSet(Long_t)"); this, "GeoValueSet(Long_t)");
container->AddFrame(hf, new TGLayoutHints(lh)); container->AddFrame(hf, new TGLayoutHints(lh));
hf = new TGHorizontalFrame(container); hf = new TGHorizontalFrame(container);
hf->AddFrame(new TGLabel(hf, "Z:"), new TGLayoutHints(fLl)); hf->AddFrame(new TGLabel(hf, "Z:"), new TGLayoutHints(fLl));
fGeomData[kCenterZ] = new TGNumberEntry(hf, 1.0, 8, kNEzc); fGeomData[kCenterZ] = new TGNumberEntry(hf, 1.0, 8, kNEzc);
hf->AddFrame(fGeomData[kCenterZ], new TGLayoutHints(fLe)); hf->AddFrame(fGeomData[kCenterZ], new TGLayoutHints(fLe));
fGeomData[kCenterZ]->Connect("ValueSet(Long_t)", "TGLPShapeObjEditor", fGeomData[kCenterZ]->Connect("ValueSet(Long_t)", "TGLPShapeObjEditor",
this, "GeoValueSet(Long_t)"); this, "GeoValueSet(Long_t)");
container->AddFrame(hf, new TGLayoutHints(lh)); container->AddFrame(hf, new TGLayoutHints(lh));
// Create object scale GUI // Create object scale GUI
TGGroupFrame* osf = new TGGroupFrame(fGeoFrame, "Object scale:", kLHintsTop | kLHintsCenterX); TGGroupFrame* osf = new TGGroupFrame(fGeoFrame, "Object scale:", kLHintsTop | kLHintsCenterX);
osf->SetTitlePos(TGGroupFrame::kLeft); osf->SetTitlePos(TGGroupFrame::kLeft);
...@@ -273,7 +275,7 @@ void TGLPShapeObjEditor::CreateGeoControls() ...@@ -273,7 +275,7 @@ void TGLPShapeObjEditor::CreateGeoControls()
hf->AddFrame(new TGLabel(hf, "X:"),new TGLayoutHints(fLl)); hf->AddFrame(new TGLabel(hf, "X:"),new TGLayoutHints(fLl));
fGeomData[kScaleX] = new TGNumberEntry(hf, 1.0, 5, kNExs); fGeomData[kScaleX] = new TGNumberEntry(hf, 1.0, 5, kNExs);
hf->AddFrame(fGeomData[kScaleX], new TGLayoutHints(fLe)); hf->AddFrame(fGeomData[kScaleX], new TGLayoutHints(fLe));
fGeomData[kScaleX]->Connect("ValueSet(Long_t)", "TGLPShapeObjEditor", fGeomData[kScaleX]->Connect("ValueSet(Long_t)", "TGLPShapeObjEditor",
this, "GeoValueSet(Long_t)"); this, "GeoValueSet(Long_t)");
osf->AddFrame(hf, new TGLayoutHints(lh)); osf->AddFrame(hf, new TGLayoutHints(lh));
...@@ -281,7 +283,7 @@ void TGLPShapeObjEditor::CreateGeoControls() ...@@ -281,7 +283,7 @@ void TGLPShapeObjEditor::CreateGeoControls()
hf->AddFrame(new TGLabel(hf, "Y:"),new TGLayoutHints(fLl)); hf->AddFrame(new TGLabel(hf, "Y:"),new TGLayoutHints(fLl));
fGeomData[kScaleY] = new TGNumberEntry(hf, 1.0, 5, kNEys); fGeomData[kScaleY] = new TGNumberEntry(hf, 1.0, 5, kNEys);
hf->AddFrame(fGeomData[kScaleY], new TGLayoutHints(fLe)); hf->AddFrame(fGeomData[kScaleY], new TGLayoutHints(fLe));
fGeomData[kScaleY]->Connect("ValueSet(Long_t)", "TGLPShapeObjEditor", fGeomData[kScaleY]->Connect("ValueSet(Long_t)", "TGLPShapeObjEditor",
this, "GeoValueSet(Long_t)"); this, "GeoValueSet(Long_t)");
osf->AddFrame(hf, new TGLayoutHints(lh)); osf->AddFrame(hf, new TGLayoutHints(lh));
...@@ -289,18 +291,18 @@ void TGLPShapeObjEditor::CreateGeoControls() ...@@ -289,18 +291,18 @@ void TGLPShapeObjEditor::CreateGeoControls()
hf->AddFrame(new TGLabel(hf, "Z:"),new TGLayoutHints(fLl)); hf->AddFrame(new TGLabel(hf, "Z:"),new TGLayoutHints(fLl));
fGeomData[kScaleZ] = new TGNumberEntry(hf, 1.0, 5, kNEzs); fGeomData[kScaleZ] = new TGNumberEntry(hf, 1.0, 5, kNEzs);
hf->AddFrame(fGeomData[kScaleZ], new TGLayoutHints(fLe)); hf->AddFrame(fGeomData[kScaleZ], new TGLayoutHints(fLe));
fGeomData[kScaleZ]->Connect("ValueSet(Long_t)", "TGLPShapeObjEditor", fGeomData[kScaleZ]->Connect("ValueSet(Long_t)", "TGLPShapeObjEditor",
this, "GeoValueSet(Long_t)"); this, "GeoValueSet(Long_t)");
osf->AddFrame(hf, new TGLayoutHints(lh)); osf->AddFrame(hf, new TGLayoutHints(lh));
hf = new TGHorizontalFrame(osf); hf = new TGHorizontalFrame(osf);
fGeomData[kScaleX]->SetLimits(TGNumberFormat::kNELLimitMin, 0.1); fGeomData[kScaleX]->SetLimits(TGNumberFormat::kNELLimitMin, 0.1);
fGeomData[kScaleY]->SetLimits(TGNumberFormat::kNELLimitMin, 0.1); fGeomData[kScaleY]->SetLimits(TGNumberFormat::kNELLimitMin, 0.1);
fGeomData[kScaleZ]->SetLimits(TGNumberFormat::kNELLimitMin, 0.1); fGeomData[kScaleZ]->SetLimits(TGNumberFormat::kNELLimitMin, 0.1);
osf->AddFrame(hf, new TGLayoutHints(lh)); osf->AddFrame(hf, new TGLayoutHints(lh));
//create button //create button
fGeoApplyButton = new TGTextButton(fGeoFrame, "Modify object", kTBa1); fGeoApplyButton = new TGTextButton(fGeoFrame, "Modify object", kTBa1);
fGeoFrame->AddFrame(fGeoApplyButton, new TGLayoutHints(fLb)); fGeoFrame->AddFrame(fGeoApplyButton, new TGLayoutHints(fLb));
fGeoApplyButton->SetState(kButtonDisabled); fGeoApplyButton->SetState(kButtonDisabled);
...@@ -440,7 +442,8 @@ void TGLPShapeObjEditor::CreateMaterialView() ...@@ -440,7 +442,8 @@ void TGLPShapeObjEditor::CreateMaterialView()
//______________________________________________________________________________ //______________________________________________________________________________
void TGLPShapeObjEditor::CreateColorRadioButtons() void TGLPShapeObjEditor::CreateColorRadioButtons()
{ {
// Create Diffuse/Ambient/Specular/Emissive radio buttons and sub-frames // Create Diffuse/Ambient/Specular/Emissive radio buttons and sub-frames.
TGGroupFrame *partFrame = new TGGroupFrame(fColorFrame, "Color components:", kLHintsTop | kLHintsCenterX); TGGroupFrame *partFrame = new TGGroupFrame(fColorFrame, "Color components:", kLHintsTop | kLHintsCenterX);
fColorFrame->AddFrame(partFrame, new TGLayoutHints(kLHintsTop | kLHintsCenterX, 2, 0, 2, 2)); fColorFrame->AddFrame(partFrame, new TGLayoutHints(kLHintsTop | kLHintsCenterX, 2, 0, 2, 2));
...@@ -476,10 +479,10 @@ void TGLPShapeObjEditor::CreateColorRadioButtons() ...@@ -476,10 +479,10 @@ void TGLPShapeObjEditor::CreateColorRadioButtons()
//______________________________________________________________________________ //______________________________________________________________________________
void TGLPShapeObjEditor::CreateColorSliders() void TGLPShapeObjEditor::CreateColorSliders()
{ {
// Create GUI for setting light color. // Create GUI for setting light color.
UInt_t sw = 120; //fColorFrame->GetDefalutWidth();, UInt_t sw = 120; //fColorFrame->GetDefalutWidth();,
// Create Red/Green/BlueAlpha/Shine sliders // Create Red/Green/BlueAlpha/Shine sliders
fColorFrame->AddFrame(new TGLabel(fColorFrame, "Red :"), new TGLayoutHints(kLHintsTop | kLHintsLeft, 5, 0, 0, 0)); fColorFrame->AddFrame(new TGLabel(fColorFrame, "Red :"), new TGLayoutHints(kLHintsTop | kLHintsLeft, 5, 0, 0, 0));
fRedSlider = new TGHSlider(fColorFrame, sw, kSlider1 | kScaleBoth, kHSr); fRedSlider = new TGHSlider(fColorFrame, sw, kSlider1 | kScaleBoth, kHSr);
...@@ -489,7 +492,7 @@ void TGLPShapeObjEditor::CreateColorSliders() ...@@ -489,7 +492,7 @@ void TGLPShapeObjEditor::CreateColorSliders()
fColorFrame->AddFrame(fRedSlider, new TGLayoutHints(fLs)); fColorFrame->AddFrame(fRedSlider, new TGLayoutHints(fLs));
fColorFrame->AddFrame(new TGLabel(fColorFrame, "Green :"), new TGLayoutHints(kLHintsTop | kLHintsLeft, 5, 0, 0, 0)); fColorFrame->AddFrame(new TGLabel(fColorFrame, "Green :"), new TGLayoutHints(kLHintsTop | kLHintsLeft, 5, 0, 0, 0));
fGreenSlider = new TGHSlider(fColorFrame, sw, kSlider1 | kScaleBoth, kHSg); fGreenSlider = new TGHSlider(fColorFrame, sw, kSlider1 | kScaleBoth, kHSg);
fGreenSlider->Connect("PositionChanged(Int_t)", "TGLPShapeObjEditor", this, "DoColorSlider(Int_t)"); fGreenSlider->Connect("PositionChanged(Int_t)", "TGLPShapeObjEditor", this, "DoColorSlider(Int_t)");
fGreenSlider->SetRange(0, 100); fGreenSlider->SetRange(0, 100);
...@@ -509,7 +512,7 @@ void TGLPShapeObjEditor::CreateColorSliders() ...@@ -509,7 +512,7 @@ void TGLPShapeObjEditor::CreateColorSliders()
fShineSlider->Connect("PositionChanged(Int_t)", "TGLPShapeObjEditor", this, "DoColorSlider(Int_t)"); fShineSlider->Connect("PositionChanged(Int_t)", "TGLPShapeObjEditor", this, "DoColorSlider(Int_t)");
fShineSlider->SetRange(0, 128); fShineSlider->SetRange(0, 128);
fColorFrame->AddFrame(fShineSlider, new TGLayoutHints(fLs)); fColorFrame->AddFrame(fShineSlider, new TGLayoutHints(fLs));
} }
//______________________________________________________________________________ //______________________________________________________________________________
...@@ -530,6 +533,7 @@ void TGLPShapeObjEditor::SetColorSlidersPos() ...@@ -530,6 +533,7 @@ void TGLPShapeObjEditor::SetColorSlidersPos()
Bool_t TGLPShapeObjEditor::HandleContainerNotify(Event_t * /*event*/) Bool_t TGLPShapeObjEditor::HandleContainerNotify(Event_t * /*event*/)
{ {
// Handle resize event. // Handle resize event.
DrawSphere(); DrawSphere();
return kTRUE; return kTRUE;
} }
...@@ -565,8 +569,8 @@ void TGLPShapeObjEditor::DrawSphere()const ...@@ -565,8 +569,8 @@ void TGLPShapeObjEditor::DrawSphere()const
//______________________________________________________________________________ //______________________________________________________________________________
void TGLPShapeObjEditor::CreateColorControls() void TGLPShapeObjEditor::CreateColorControls()
{ {
// Create widgets to chhos colors componnet and its RGBA values on fGedEditor model or // Create widgets to chhos colors componnet and its RGBA values on fGedEditor
// family it belongs to. // model or family it belongs to.
fColorFrame = this; fColorFrame = this;
CreateMaterialView(); CreateMaterialView();
...@@ -575,7 +579,7 @@ void TGLPShapeObjEditor::CreateColorControls() ...@@ -575,7 +579,7 @@ void TGLPShapeObjEditor::CreateColorControls()
CreateColorSliders(); CreateColorSliders();
//apply button creation //apply button creation
fColorApplyButton = new TGTextButton(fColorFrame, "Apply", kTBa); fColorApplyButton = new TGTextButton(fColorFrame, "Apply", kTBa);
fColorFrame->AddFrame(fColorApplyButton, new TGLayoutHints(fLb)); fColorFrame->AddFrame(fColorApplyButton, new TGLayoutHints(fLb));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment