Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-08-03 04:09:58

0001 #ifndef Fireworks_Core_FWDetailViewBase_h
0002 #define Fireworks_Core_FWDetailViewBase_h
0003 // -*- C++ -*-
0004 //
0005 // Package:     Core
0006 // Class  :     FWDetailViewBase
0007 //
0008 /**\class FWDetailViewBase FWDetailViewBase.h Fireworks/Core/interface/FWDetailViewBase.h
0009 
0010    Description: Base class for detailed views
0011 
0012    Usage:
0013     <usage>
0014 
0015  */
0016 //
0017 // Original Author:  Chris Jones
0018 //         Created:  Fri Jan  9 13:35:52 EST 2009
0019 // $Id: FWDetailViewBase.h,v 1.6 2009/06/22 14:32:25 amraktad Exp
0020 // system include files
0021 
0022 #include "Fireworks/Core/interface/FWSimpleProxyHelper.h"
0023 
0024 #include "Rtypes.h"
0025 
0026 class TEveWindow;
0027 class TEveWindowSlot;
0028 class FWModelId;
0029 class FWEventItem;
0030 
0031 namespace fireworks {
0032   class Context;
0033 }
0034 
0035 class FWDetailViewBase {
0036 public:
0037   virtual ~FWDetailViewBase();
0038 
0039   void build(const FWModelId&);
0040 
0041   virtual void init(TEveWindowSlot*) = 0;
0042   virtual void setBackgroundColor(Color_t col) {}
0043 
0044   //canvas utilities
0045   static void drawCanvasDot(Float_t x, Float_t y, Float_t r, Color_t);
0046   static void drawCanvasBox(Double_t* pos, Color_t fillCol, Int_t fillType = 0, bool bg = kTRUE);
0047 
0048   const FWEventItem* item() { return m_item; }
0049   void setItem(const FWEventItem* x) { m_item = x; }
0050   const fireworks::Context& context() const;
0051 
0052   FWDetailViewBase(const FWDetailViewBase&) = delete;                   // stop default
0053   const FWDetailViewBase& operator=(const FWDetailViewBase&) = delete;  // stop default
0054 
0055 protected:
0056   FWDetailViewBase(const std::type_info&);
0057 
0058 private:
0059   virtual void build(const FWModelId&, const void*) = 0;
0060 
0061   const FWEventItem* m_item;
0062   FWSimpleProxyHelper m_helper;
0063 };
0064 
0065 #endif