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