]> git.mxchange.org Git - flightgear.git/blobdiff - src/Time/TimeManager.hxx
toggle fullscreen: also adapt GUI plane when resizing
[flightgear.git] / src / Time / TimeManager.hxx
index c0a89c39a036d548ae3bf677ab54dea0acaa40c9..9eb40980be2f013f8b0da1d59fa036928edec194 100644 (file)
 #define FG_TIME_TIMEMANAGER_HXX
 
 #include <simgear/structure/subsystem_mgr.hxx>
+#include <simgear/props/props.hxx>
+#include <simgear/props/propertyObject.hxx>
 
 // forward decls
 class SGTime;
 
-class TimeManager : public SGSubsystem
+class TimeManager : public SGSubsystem, public SGPropertyChangeListener
 {
 public:
   TimeManager();
@@ -36,10 +38,16 @@ public:
   virtual void init();
   virtual void reinit();
   virtual void postinit();
+  virtual void shutdown();
   
   void update(double dt);
   
+// SGPropertyChangeListener overrides
+  virtual void valueChanged(SGPropertyNode *);
+  
+  void setTimeOffset(const std::string& offset_type, long int offset);
 private:
+  
   /**
    * Ensure a consistent update-rate using a combination of
    * sleep()-ing and busy-waiting.  
@@ -64,15 +72,23 @@ private:
   SGPropertyNode_ptr _maxDtPerFrame;
   SGPropertyNode_ptr _clockFreeze;
   SGPropertyNode_ptr _timeOverride;
+  SGPropertyNode_ptr _warp;
+  SGPropertyNode_ptr _warpDelta;
+  
   bool _lastClockFreeze;
-
-  SGPropertyNode_ptr _longitudeDeg;
-  SGPropertyNode_ptr _latitudeDeg;
+  bool _adjustWarpOnUnfreeze;
   
-// frame-rate / update-rate counters  
+  // frame-rate / worst-case latency / update-rate counters
   SGPropertyNode_ptr _frameRate;
+  SGPropertyNode_ptr _frameRateWorst;
+  SGPropertyNode_ptr _frameLatency;
   time_t _lastFrameTime;
+  double _frameLatencyMax;
   int _frameCount;
+  
+  SGPropObjBool _sceneryLoaded;
+  SGPropObjInt _modelHz;
+  SGPropObjDouble _timeDelta, _simTimeDelta;
 };
 
 #endif // of FG_TIME_TIMEMANAGER_HXX