CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
FWEveViewManager.h
Go to the documentation of this file.
1 #ifndef Fireworks_Core_FWEveViewManager_h
2 #define Fireworks_Core_FWEveViewManager_h
3 // -*- C++ -*-
4 //
5 // Package: Core
6 // Class : FWEveViewManager
7 //
16 //
17 // Original Author: Chris Jones, Alja Mrak-Tadel
18 // Created: Thu Mar 18 14:12:45 CET 2010
19 // $Id: FWEveViewManager.h,v 1.13 2010/12/01 21:40:31 amraktad Exp $
20 //
21 
22 // system include files
23 #include <vector>
24 #include <map>
25 #include <boost/shared_ptr.hpp>
26 
27 // user include files
31 
32 // forward declarations
33 class TEveCompund;
34 class TEveScene;
35 class TEveWindowSlot;
36 class FWViewBase;
37 class FWEveView;
38 class FWProxyBuilderBase;
39 class FWGUIManager;
40 
42 {
43 private:
44  struct BuilderInfo
45  {
46  std::string m_name;
47  int m_viewBit;
48 
49  BuilderInfo(std::string name, int viewBit) :
50  m_name(name),
51  m_viewBit(viewBit)
52  {}
53  };
54 
55 public:
57  virtual ~FWEveViewManager();
58 
59  // ---------- const member functions ---------------------
60 
61  // ---------- static member functions --------------------
62 
63  // ---------- member functions ---------------------------
64  virtual void newItem(const FWEventItem*);
65  virtual void removeItem(const FWEventItem*);
66  virtual void eventBegin();
67  virtual void eventEnd();
68  virtual void setContext(const fireworks::Context*);
69 
70  void highlightAdded(TEveElement*);
71  void selectionAdded(TEveElement*);
72  void selectionRemoved(TEveElement*);
73  void selectionCleared();
74 
76 
77 protected:
78  virtual void modelChangesComing();
79  virtual void modelChangesDone();
80  virtual void colorsChanged();
81 
82 private:
83  FWEveViewManager(const FWEveViewManager&); // stop default
84  const FWEveViewManager& operator=(const FWEveViewManager&); // stop default
85 
86  FWViewBase* buildView(TEveWindowSlot* iParent, const std::string& type);
87  FWEveView* finishViewCreate (boost::shared_ptr<FWEveView>);
88 
89  void beingDestroyed(const FWViewBase*);
90  void modelChanges(const FWModelIds& iIds);
91  void itemChanged(const FWEventItem*);
92  bool haveViewForBit (int) const;
94 
95  // ---------- member data --------------------------------
96 
97  typedef std::map<std::string, std::vector<BuilderInfo> > TypeToBuilder;
98  typedef std::vector<boost::shared_ptr<FWProxyBuilderBase> > BuilderVec;
99  typedef BuilderVec::iterator BuilderVec_it;
100  typedef std::vector<boost::shared_ptr<FWEveView > >::iterator EveViewVec_it;
101 
103 
104  std::map<int, BuilderVec> m_builders; // key is viewer bit
105 
106  std::vector< std::vector<boost::shared_ptr<FWEveView> > > m_views;
107 
108  std::map<const FWEventItem*,FWInteractionList*> m_interactionLists;
109 };
110 
111 
112 #endif
FWEveView * finishViewCreate(boost::shared_ptr< FWEveView >)
type
Definition: HCALResponse.h:22
virtual void modelChangesDone()
BuilderInfo(std::string name, int viewBit)
FWTypeToRepresentations supportedTypesAndRepresentations() const
std::map< std::string, std::vector< BuilderInfo > > TypeToBuilder
void selectionAdded(TEveElement *)
void itemChanged(const FWEventItem *)
virtual void colorsChanged()
TypeToBuilder m_typeToBuilder
std::set< FWModelId > FWModelIds
FWEveViewManager(FWGUIManager *)
virtual void newItem(const FWEventItem *)
std::vector< boost::shared_ptr< FWEveView > >::iterator EveViewVec_it
bool haveViewForBit(int) const
virtual void setContext(const fireworks::Context *)
void selectionRemoved(TEveElement *)
void highlightAdded(TEveElement *)
void modelChanges(const FWModelIds &iIds)
void beingDestroyed(const FWViewBase *)
std::map< int, BuilderVec > m_builders
FWViewBase * buildView(TEveWindowSlot *iParent, const std::string &type)
std::map< const FWEventItem *, FWInteractionList * > m_interactionLists
virtual void modelChangesComing()
virtual void eventEnd()
virtual ~FWEveViewManager()
std::vector< boost::shared_ptr< FWProxyBuilderBase > > BuilderVec
BuilderVec::iterator BuilderVec_it
const FWEveViewManager & operator=(const FWEveViewManager &)
virtual void removeItem(const FWEventItem *)
virtual void eventBegin()
std::vector< std::vector< boost::shared_ptr< FWEveView > > > m_views