//------------------------------------------------------------------------------ // gso_Palette class -- // (C) Piero Giubilato 2008-2010, Berkeley Lab -- //------------------------------------------------------------------------------ //______________________________________________________________________________ // {Trace} // [File name] "gso_Palette.h" // [Author] "Piero Giubilato" // [Version] "0.5" // [Modified by] "Piero Giubilato" // [Last revision] "22 Jan 2009" // [Language] "C++" // [Compiler] "Visual C++ 9.x" // [Member of] "Cool SEAL" // [Project] "SEAL" // [Description] "Header for the gso_Palette class" // [Key documentation] // "Visual C++ Reference Help" // "Root reference guide" // {Trace} //______________________________________________________________________________ // Overloading check #if !defined gso_Palette_H #define gso_Palette_H // Root components #include #include #include #include #include // Palette object class gso_Palette: public TGFrame, public TGWidget { private: // The frame used to display the palette TGCompositeFrame* frame_Container; // The parent frame GContext_t frame_gc_Hnd; // The graphic contect used to paint into the frame GCValues_t* frame_gc_Set; // Values structure to set the gc Pixmap_t frame_PxMap; // The paletted pixel map // Palette values UInt_t pal_Value[256]; // Palette values // Drawing void Draw(); // Creates the palette image protected: void DoRedraw(); // Put the palette image on screen public: // Default methods gso_Palette(const TGWindow* window, UInt_t width = 1, UInt_t height = 1); ~gso_Palette(); // TGFrame overloaded methods void MoveResize(UInt_t left, UInt_t top, UInt_t width, UInt_t height); // Color methods void color_Set(UInt_t* col_List, UInt_t col_Count); UInt_t color_Value(UInt_t col_Id) const; const UInt_t* color_Front() const; // Cint preprocessor token ClassDef(gso_Palette, 1) }; // End of Overloading check #endif