CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_2_9_HLT1_bphpatch4/src/Fireworks/Core/interface/FWDetailViewBase.h

Go to the documentation of this file.
00001 #ifndef Fireworks_Core_FWDetailViewBase_h
00002 #define Fireworks_Core_FWDetailViewBase_h
00003 // -*- C++ -*-
00004 //
00005 // Package:     Core
00006 // Class  :     FWDetailViewBase
00007 //
00016 //
00017 // Original Author:  Chris Jones
00018 //         Created:  Fri Jan  9 13:35:52 EST 2009
00019 // $Id: FWDetailViewBase.h,v 1.6 2009/06/22 14:32:25 amraktad Exp
00020 // system include files
00021 
00022 #include "Fireworks/Core/interface/FWSimpleProxyHelper.h"
00023 
00024 class TEveWindow;
00025 class FWModelId;
00026 class FWEventItem;
00027 
00028 namespace fireworks {
00029    class Context;
00030 }
00031 
00032 class FWDetailViewBase
00033 {
00034 public:
00035    virtual ~FWDetailViewBase ();
00036 
00037    void  build (const FWModelId&);
00038 
00039    virtual void init(TEveWindowSlot*) = 0;
00040    virtual void setBackgroundColor(Color_t col) {}
00041 
00042    //canvas utilities
00043    static void drawCanvasDot(Float_t x, Float_t y, Float_t r, Color_t);
00044    static void drawCanvasBox(Double_t* pos, Color_t fillCol, Int_t fillType = 0, bool bg=kTRUE);
00045 
00046    const FWEventItem* item() { return m_item; }
00047    void  setItem(const FWEventItem* x) { m_item =x; }
00048    const fireworks::Context& context() const;
00049 
00050 protected:
00051    FWDetailViewBase(const std::type_info&);
00052  
00053 private:
00054    FWDetailViewBase(const FWDetailViewBase&); // stop default
00055    const FWDetailViewBase& operator=(const FWDetailViewBase&); // stop default
00056 
00057    virtual void build(const FWModelId&, const void*) = 0;
00058   
00059    const FWEventItem  *m_item;   
00060    FWSimpleProxyHelper m_helper;
00061 };
00062 
00063 #endif