//------------------------------------------------------------------------------ // gui_Map class -- // (C) Piero Giubilato 2008-2010, Berkeley Lab -- //------------------------------------------------------------------------------ //______________________________________________________________________________ // {Trace} // [File name] "gui_Map.h" // [Author] "Piero Giubilato" // [Version] "0.6" // [Modified by] "Piero Giubilato" // [Last revision] "10 Feb 2009" // [Language] "C++" // [Compiler] "Visual C++ 9.x" // [Member of] "Cool SEAL" // [Project] "SEAL" // [Description] "Header for the gui_Map class" // [Key documentation] // "Visual C++ Reference Help" // "Root reference guide" // {Trace} //______________________________________________________________________________ // Overloading check #if !defined gui_Map_H #define gui_Map_H // Standard components #include // Root components #include #include // Application components #include "gso_Map2D.h" #include "gso_Palette.h" #include "gui_Const.h" #include "gui_Object.h" // This class creates a gui_Map object class gui_Map: public gui_Object { private: // Constants enum k_data_Type {kdt_Null, kdt_UShort, kdt_Short, kdt_UInt, kdt_Int, kdt_Float, kdt_Double}; static const UInt_t k_palette_Margin = 8; // Palette-label margin static const UInt_t k_palette_Width = 16; // Palette-label margin static const UInt_t k_label_Margin = 8; // Palette-label margin // Main interface elements gso_Map2D* map; // The map itself gso_Palette* palette; // The palette std::vector label; // The labels used to mark the palette // Private methods void Init(UInt_t left, UInt_t top, UInt_t width, UInt_t height); void label_Set(); // Special private memebers gui_Map(const gui_Map&) {} const gui_Map& operator=(const gui_Map&) {return *this;} public: // Special member functions gui_Map(UInt_t left, UInt_t top, UInt_t width, UInt_t height); /* gui_Map(const UShort_t* data, UInt_t data_Width, UInt_t data_Height, UInt_t left, UInt_t top, UInt_t width, UInt_t height); gui_Map(const Short_t* data, UInt_t data_Width, UInt_t data_Height, UInt_t left, UInt_t top, UInt_t width, UInt_t height); gui_Map(const UInt_t* data, UInt_t data_Width, UInt_t data_Height, UInt_t left, UInt_t top, UInt_t width, UInt_t height); gui_Map(const Int_t* data, UInt_t data_Width, UInt_t data_Height, UInt_t left, UInt_t top, UInt_t width, UInt_t height); gui_Map(const Float_t* data, UInt_t data_Width, UInt_t data_Height, UInt_t left, UInt_t top, UInt_t width, UInt_t height); gui_Map(const Double_t* data, UInt_t data_Width, UInt_t data_Height, UInt_t left, UInt_t top, UInt_t width, UInt_t height); */ ~gui_Map(); // General methods void Refresh(); template void data_Set(const U* data, UInt_t data_Width, UInt_t data_Height) {map->data_Set(data, data_Width, data_Height);} // Overloaded gui_Object members void MoveResize(UInt_t left, UInt_t top, UInt_t width, UInt_t height); void color_Set(UInt_t foreColor, UInt_t backColor); // Palette interface methods void ReDraw(); bool range_Auto() const; void range_Auto(bool automatic); Double_t range_Max() const; void range_Max(Double_t max); Double_t range_Min() const; void range_Min(Double_t min); void range_Color(UInt_t* col_List, UInt_t col_Count); // Cint preprocessor token ClassDef(gui_Map, 1) }; // End of Overloading check #endif