vtkViewLayout.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Kitware Inc.
2 // SPDX-License-Identifier: BSD-3-Clause
22 #ifndef vtkViewLayout_h
23 #define vtkViewLayout_h
24 
25 #include "vtkCommand.h" // for vtkCommand
26 #include "vtkNew.h" // for vtkNew
27 #include "vtkObject.h"
28 #include "vtkRemotingViewsModule.h" //needed for exports
29 #include "vtkVector.h" // for vtkVector2i
30 #include <memory> // for std::unique_ptr
31 
32 class vtkPVView;
33 class vtkRenderWindow;
34 class vtkViewLayoutProp;
35 class vtkViewport;
37 
39 {
40 public:
41  static vtkViewLayout* New();
42  vtkTypeMacro(vtkViewLayout, vtkObject);
43  void PrintSelf(ostream& os, vtkIndent indent) override;
44 
49  void ShowOnTileDisplay();
50 
52 
55  void RemoveAllViews();
56  void AddView(vtkPVView*, const double* viewport);
57  void AddView(vtkPVComparativeView*, const double* viewport);
59 
64  bool SaveAsPNG(int rank, const char* fname);
65 
67 
73  vtkSetVector3Macro(SeparatorColor, double);
74  vtkGetVector3Macro(SeparatorColor, double);
76 
78 
82  vtkSetClampMacro(SeparatorWidth, int, 0, VTK_INT_MAX);
83  vtkGetMacro(SeparatorWidth, int);
85 
86  enum
87  {
92  RequestUpdateLayoutEvent = vtkCommand::UserEvent + 1,
93 
99  };
100 
101 protected:
102  vtkViewLayout();
103  ~vtkViewLayout() override;
104 
106 
109  vtkSetVector2Macro(TileDimensions, int);
110  vtkGetVector2Macro(TileDimensions, int);
112 
114 
118  vtkSetVector2Macro(TileMullions, int);
119  vtkGetVector2Macro(TileMullions, int);
121 
122  void UpdateLayout(vtkObject*, unsigned long, void*);
123  void UpdateLayoutForTileDisplay(vtkRenderWindow*);
124  void UpdateLayoutForCAVE(vtkRenderWindow*);
125 
126  void UpdateDisplay(vtkObject*, unsigned long, void*);
127 
128  void Paint(vtkViewport*);
129 
133  bool NeedsActiveStereo() const;
134 
135 private:
136  vtkViewLayout(const vtkViewLayout&) = delete;
137  void operator=(const vtkViewLayout&) = delete;
138 
139  class vtkInternals;
140  std::unique_ptr<vtkInternals> Internals;
142 
143  bool InTileDisplay;
144  int TileDimensions[2];
145  int TileMullions[2];
146  bool InCave;
147  bool DisplayResults;
148  int SeparatorWidth;
149  double SeparatorColor[3];
150 
151  friend class vtkViewLayoutProp;
152 };
153 
154 #endif
used by vtkSMViewLayoutProxy.
Definition: vtkViewLayout.h:38
#define VTKREMOTINGVIEWS_EXPORT
void PrintSelf(ostream &os, vtkIndent indent) VTK_OVERRIDE
baseclass for all ParaView views.
Definition: vtkPVView.h:32
Event fired by vtkPVView&#39;s internal render window to request update of the layout after a window is r...
Definition: vtkViewLayout.h:98
view for comparative visualization/ film-strips.
static vtkObject * New()
void operator=(const vtkObjectBase &)