AGX Dynamics  2.37.2.0
Window.h
Go to the documentation of this file.
1 /*
2 Copyright 2007-2024. Algoryx Simulation AB.
3 
4 All AGX source code, intellectual property, documentation, sample code,
5 tutorials, scene files and technical white papers, are copyrighted, proprietary
6 and confidential material of Algoryx Simulation AB. You may not download, read,
7 store, distribute, publish, copy or otherwise disseminate, use or expose this
8 material unless having a written signed agreement with Algoryx Simulation AB, or having been
9 advised so by Algoryx Simulation AB for a time limited evaluation, or having purchased a
10 valid commercial license from Algoryx Simulation AB.
11 
12 Algoryx Simulation AB disclaims all responsibilities for loss or damage caused
13 from using this software, unless otherwise stated in written agreements with
14 Algoryx Simulation AB.
15 */
16 
17 #ifndef AGXPLOT_WINDOW_H
18 #define AGXPLOT_WINDOW_H
19 
20 #include <agxPlot/Curve.h>
21 #include <agxPlot/DataPacket.h>
22 
23 #include <agx/String.h>
24 
25 namespace agxPlot
26 {
27  class System;
28 
30  {
31  public:
37  Window(const agx::String& id = "");
38 
45  bool add(Curve* curve);
46 
47  void clearCurves();
48 
54  void getNewValues(DataPacket* target);
55 
61  void getOldValues(DataPacket* target);
62 
63  System* getPlotSystem();
64 
72  void getDescription(agxJson::Value& root) const;
73 
77  void setFromDescription(const agxJson::Value& root);
78 
79  const agx::String& getId() const;
80 
84  const agx::String& getName() const;
88  void setName(const agx::String& name);
89 
90  void setEnabled(bool enabled);
91 
92  bool getEnabled() const;
93 
95  const CurveRefVector& getCurves() const;
96 
98  public:
99  /***************************************/
100  /* HELPER FUNCTIONS FOR CREATING PLOTS */
101  /***************************************/
102  private:
103  friend class System;
104  void setPlotSystem(System *system);
105 
106  private:
107  CurveRefVector m_curves;
108  System *m_system;
109  agx::String m_id;
110  agx::String m_name;
111  bool m_isEnabled;
112 
113  agx::Event::CallbackType m_curveRepresentationChangedCallback;
114  };
115 
118 }
119 
120 #endif
Namespace contains functionality related to plotting.
Generalized callback, using std::function.
Definition: Callback.h:53
#define AGXPHYSICS_EXPORT
agx::Event representationChanged
Definition: Window.h:97
#define AGX_DECLARE_POINTER_TYPES(type)
Definition: Referenced.h:254
Base class providing referencing counted objects.
Definition: Referenced.h:119
#define AGX_DECLARE_VECTOR_TYPES(type)
Definition: Vector.h:34
AGXCORE_EXPORT Component * root()
An event with no arguments.
Definition: Event.h:89