//------------------------------------------------------------------------------ // gui_Movie class -- // (C) Piero Giubilato 2008-2010, Berkeley Lab -- //------------------------------------------------------------------------------ //______________________________________________________________________________ // {Trace} // [File name] "gui_Movie.h" // [Author] "Piero Giubilato" // [Version] "0.5" // [Modified by] "Piero Giubilato" // [Last revision] "20 Jul 2009" // [Language] "C++" // [Compiler] "Visual C++ 9.x" // [Member of] "Cool SEAL" // [Project] "SEAL" // [Description] "Header for the gui_Movie class" // [Key documentation] // "Visual C++ Reference Help" // "Root reference guide" // {Trace} //______________________________________________________________________________ // Overloading check #if !defined gui_Movie_H #define gui_Movie_H // Standard components #include // Root components #include #include #include #include #include #include // Application components #include "data_Burst.h" #include "gui_Const.h" #include "gui_2D.h" #include "gso_Button.h" // This class creates a gui_Movie object class gui_Movie: public gui_Object { protected: // Constants UInt_t k_ctrl_Border; // Space between controls UInt_t k_btn_Size; // Accessory buttons Float_t k_btn_Radius; // Accessory buttons radius Float_t k_btn_Depth; // Accessory buttons depth UInt_t k_btn_Color; // Accessory buttons color // Main interface elements TGPopupMenu* mnu_Ctrl; // Control menu std::vector btn_Ctrl; // Control buttons std::vector num_Ctrl; // The ROI numerics TGHSlider* sld_Frame; // The frame slider // Linked map: gui_2D* map_View; // Linked data static enum k_data_Type {kdt_Null, kdt_UShort, kdt_Short, kdt_UInt, kdt_Int, kdt_Float, kdt_Double}; // Keep ROOTCInt out of this! #ifndef __CINT__ const data_Burst* data_US; const data_Burst* data_S; const data_Burst* data_UI; const data_Burst* data_I; const data_Burst* data_F; const data_Burst* data_D; #endif UInt_t data_Type; // Private methods void Init(gui_2D* map, UInt_t left, UInt_t top, UInt_t width, UInt_t height, UInt_t textColor); void data_Set(); // Special private memebers gui_Movie(const gui_Movie&) {} const gui_Movie& operator=(const gui_Movie&) {return *this;} public: // Special member functions gui_Movie(gui_2D* map, UInt_t left, UInt_t top, UInt_t width, UInt_t height, UInt_t textColor = 0x777777); gui_Movie(gui_Object* parent, gui_2D* map, UInt_t left, UInt_t top, UInt_t width, UInt_t height, UInt_t textColor = 0x777777); ~gui_Movie(); // Keep ROOTCInt out of this! #ifndef __CINT__ // Set data methods void data_Set(const data_Burst* data) {data_US = data; data_Type = kdt_UShort; data_Set();}; void data_Set(const data_Burst* data) {data_S = data; data_Type = kdt_Short; data_Set();}; void data_Set(const data_Burst* data) {data_UI = data; data_Type = kdt_UInt; data_Set();}; void data_Set(const data_Burst* data) {data_I = data; data_Type = kdt_Int; data_Set();}; void data_Set(const data_Burst* data) {data_F = data; data_Type = kdt_Float; data_Set();}; void data_Set(const data_Burst* data) {data_D = data; data_Type = kdt_Double; data_Set();}; #endif // General data methods void data_Refresh(); void data_Refresh(UInt_t frame_Idx); void data_Save(char* file = "", bool whole = false, bool raw = false) const; // Slots void btn_ctrl_Do(Long_t); void mnu_ctrl_Do(Int_t); void num_ctrl_Do(Int_t); void sld_frame_Do(Int_t); // Overloaded gui_Object members void ReDraw(); void MoveResize(UInt_t left, UInt_t top, UInt_t width, UInt_t height); void Move(UInt_t left, UInt_t top); void Resize(UInt_t width, UInt_t height); void LowerWindow() const; void RaiseWindow() const; void color_Set(UInt_t foreColor, UInt_t backColor); // Cint preprocessor token ClassDef(gui_Movie, 1) }; // End of Overloading check #endif