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.14 2013/01/21 20:33:28 chrjones Exp $
20 //
21 
22 // system include files
23 #include <vector>
24 #include <map>
25 #include <set>
26 #include <boost/shared_ptr.hpp>
27 
28 // 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;
41 
42 typedef std::set<FWModelId> FWModelIds;
43 
45 {
46 private:
47  struct BuilderInfo
48  {
50  int m_viewBit;
51 
52  BuilderInfo(std::string name, int viewBit) :
53  m_name(name),
54  m_viewBit(viewBit)
55  {}
56  };
57 
58 public:
60  virtual ~FWEveViewManager();
61 
62  // ---------- const member functions ---------------------
63 
64  // ---------- static member functions --------------------
65 
66  // ---------- member functions ---------------------------
67  virtual void newItem(const FWEventItem*);
68  virtual void removeItem(const FWEventItem*);
69  virtual void eventBegin();
70  virtual void eventEnd();
71  virtual void setContext(const fireworks::Context*);
72 
73  void highlightAdded(TEveElement*);
74  void selectionAdded(TEveElement*);
75  void selectionRemoved(TEveElement*);
76  void selectionCleared();
77 
79 
80 protected:
81  virtual void modelChangesComing();
82  virtual void modelChangesDone();
83  virtual void colorsChanged();
84 
85 private:
86  FWEveViewManager(const FWEveViewManager&); // stop default
87  const FWEveViewManager& operator=(const FWEveViewManager&); // stop default
88 
89  FWViewBase* buildView(TEveWindowSlot* iParent, const std::string& type);
90  FWEveView* finishViewCreate (boost::shared_ptr<FWEveView>);
91 
92  void beingDestroyed(const FWViewBase*);
93  void modelChanges(const FWModelIds& iIds);
94  void itemChanged(const FWEventItem*);
95  bool haveViewForBit (int) const;
97 
98  // ---------- member data --------------------------------
99 
100  typedef std::map<std::string, std::vector<BuilderInfo> > TypeToBuilder;
101  typedef std::vector<boost::shared_ptr<FWProxyBuilderBase> > BuilderVec;
102  typedef BuilderVec::iterator BuilderVec_it;
103  typedef std::vector<boost::shared_ptr<FWEveView > >::iterator EveViewVec_it;
104 
106 
107  std::map<int, BuilderVec> m_builders; // key is viewer bit
108 
109  std::vector< std::vector<boost::shared_ptr<FWEveView> > > m_views;
110 
111  std::map<const FWEventItem*,FWInteractionList*> m_interactionLists;
112 };
113 
114 
115 #endif
FWEveView * finishViewCreate(boost::shared_ptr< FWEveView >)
type
Definition: HCALResponse.h:21
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
FWEveViewManager(FWGUIManager *)
virtual void newItem(const FWEventItem *)
std::set< FWModelId > FWModelIds
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