VR-Forces 4.3 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DtWindowManager.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2012 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #pragma once
11 
12 #include <vrvCore/vrvCore.h>
16 
17 #include <boost/signal.hpp>
18 #include <list>
19 
20 namespace makVrv
21 {
22  class DtChannelProctor;
23  class DtChannelManager;
24  class DtDe;
25  class DtWindow;
26  class DtChannel;
27  class DtAgentManager;
28  class DtWindowProctor;
29  class DtWindowManagerSignaler;
30 
34  {
35 
36  public:
37 
38  typedef std::list<DtWindow*> WindowList;
39 
40  public:
41 
43  virtual ~DtWindowManager();
44 
46  virtual void realizeConfiguration();
47 
51  virtual bool addWindow(const std::string& displayName, const DtWindowConfiguration& wc);
52 
55  virtual bool destroyWindow( const std::string& displayName, const std::string& windowName );
56 
59  virtual bool modifyWindow( const std::string& displayName, const std::string& windowName,
60  const DtWindowConfiguration& config );
61 
63  DtWindow* findWindow(const std::string& name);
64 
66  virtual WindowList& windows();
67 
69  virtual const WindowList& windows() const;
70 
73  virtual void addWindow(DtWindow* window);
74 
76  virtual void destroyWindow(DtWindow* window);
77 
80  virtual bool tick();
81 
84  virtual bool isVisibleAndCloseToCamera(
85  float sphereRadius,
86  float sphereCenterX, float sphereCenterY, float sphereCenterZ,
87  float distance, float upX, float upY, float upZ) const = 0;
88 
90  virtual int maxTextureUnits() const;
91 
93  typedef boost::function<void (DtWindow*)> WindowFunction;
94 
96  virtual void forEachWindow(WindowFunction& perWindowFunction);
97 
99  typedef boost::function<void (DtChannel*)> ChannelFunction;
100 
102  virtual void forEachChannel(ChannelFunction& perChannelFunction);
103 
104  protected:
105 
109 
112  virtual DtWindow* realizeWindowConfiguration(DtWindowConfiguration& wc);
113 
115  virtual void destroyWindows();
116 
117  protected:
118 
120 
128  };
129 
133  {
134  public:
135 
137  static DtWindowManagerSignaler& instance(DtDe& de);
138 
140  virtual ~DtWindowManagerSignaler();
141 
143  boost::signal<void (DtWindow*)> signal_windowCreated;
144 
146  boost::signal<void (DtWindow*)> signal_windowToBeDestroyed;
147 
148  protected:
149 
151 
152  };
153 
157  {
158  public:
160  static DtWindowManagerCreator& instance(DtDe& de);
161 
163  static void registerInstance(DtDe& de, DtWindowManagerCreator* anInstance);
164 
166  virtual DtWindowManager* create(DtDe& de, DtWindowConfigurations& configs) = 0;
167  };
168 }

Document ID: Generated on Wed Mar 11 21:20:57 EDT 2015 from SVN revision 150940
Copyright © 2005-2014 VT MÄK. All Rights Reserved (www.mak.com)