00001 // @(#)root/eve:$Id: TEveRGBAPaletteEditor.h 29357 2009-07-06 17:53:36Z matevz $ 00002 // Authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 2007 00003 00004 /************************************************************************* 00005 * Copyright (C) 1995-2007, 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_TEveRGBAPaletteEditor 00013 #define ROOT_TEveRGBAPaletteEditor 00014 00015 #include "TGedFrame.h" 00016 00017 class TGCheckButton; 00018 class TGColorSelect; 00019 class TGComboBox; 00020 00021 class TEveRGBAPalette; 00022 class TEveGValuator; 00023 class TEveGDoubleValuator; 00024 00025 class TEveRGBAPaletteSubEditor : public TGVerticalFrame 00026 { 00027 private: 00028 TEveRGBAPaletteSubEditor(const TEveRGBAPaletteSubEditor&); // Not implemented 00029 TEveRGBAPaletteSubEditor& operator=(const TEveRGBAPaletteSubEditor&); // Not implemented 00030 00031 protected: 00032 TEveRGBAPalette *fM; 00033 00034 TGComboBox *fUnderflowAction; 00035 TGColorSelect *fUnderColor; 00036 TGComboBox *fOverflowAction; 00037 TGColorSelect *fOverColor; 00038 00039 TEveGDoubleValuator *fMinMax; 00040 00041 TGCheckButton *fInterpolate; 00042 TGCheckButton *fShowDefValue; 00043 TGColorSelect *fDefaultColor; 00044 TGCheckButton *fFixColorRange; 00045 00046 public: 00047 TEveRGBAPaletteSubEditor(const TGWindow* p); 00048 virtual ~TEveRGBAPaletteSubEditor() {} 00049 00050 void SetModel(TEveRGBAPalette* p); 00051 00052 void Changed(); //*SIGNAL* 00053 00054 void DoMinMax(); 00055 00056 void DoInterpolate(); 00057 void DoShowDefValue(); 00058 void DoDefaultColor(Pixel_t color); 00059 void DoFixColorRange(); 00060 void DoUnderColor(Pixel_t color); 00061 void DoOverColor(Pixel_t color); 00062 void DoUnderflowAction(Int_t mode); 00063 void DoOverflowAction(Int_t mode); 00064 00065 ClassDef(TEveRGBAPaletteSubEditor, 1); // Sub-editor for TEveRGBAPalette class. 00066 }; 00067 00068 00069 /******************************************************************************/ 00070 /******************************************************************************/ 00071 00072 class TEveRGBAPaletteEditor : public TGedFrame 00073 { 00074 private: 00075 TEveRGBAPaletteEditor(const TEveRGBAPaletteEditor&); // Not implemented 00076 TEveRGBAPaletteEditor& operator=(const TEveRGBAPaletteEditor&); // Not implemented 00077 00078 protected: 00079 TEveRGBAPalette *fM; 00080 TEveRGBAPaletteSubEditor *fSE; 00081 00082 public: 00083 TEveRGBAPaletteEditor(const TGWindow* p=0, Int_t width=170, Int_t height=30, UInt_t options = kChildFrame, Pixel_t back=GetDefaultFrameBackground()); 00084 virtual ~TEveRGBAPaletteEditor() {} 00085 00086 virtual void SetModel(TObject* obj); 00087 00088 ClassDef(TEveRGBAPaletteEditor, 1); // Editor for TEveRGBAPalette class. 00089 }; 00090 00091 #endif