vtkViewLayout.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: ParaView
4  Module: $RCSfile$
5 
6  Copyright (c) Kitware, Inc.
7  All rights reserved.
8  See Copyright.txt or http://www.paraview.org/HTML/Copyright.html for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
34 #ifndef vtkViewLayout_h
35 #define vtkViewLayout_h
36 
37 #include "vtkCommand.h" // for vtkCommand
38 #include "vtkNew.h" // for vtkNew
39 #include "vtkObject.h"
40 #include "vtkRemotingViewsModule.h" //needed for exports
41 #include "vtkVector.h" // for vtkVector2i
42 #include <memory> // for std::unique_ptr
43 
44 class vtkPVView;
45 class vtkRenderWindow;
46 class vtkViewLayoutProp;
47 class vtkViewport;
49 
51 {
52 public:
53  static vtkViewLayout* New();
54  vtkTypeMacro(vtkViewLayout, vtkObject);
55  void PrintSelf(ostream& os, vtkIndent indent) override;
56 
61  void ShowOnTileDisplay();
62 
64 
67  void RemoveAllViews();
68  void AddView(vtkPVView*, const double* viewport);
69  void AddView(vtkPVComparativeView*, const double* viewport);
71 
76  bool SaveAsPNG(int rank, const char* fname);
77 
79 
85  vtkSetVector3Macro(SeparatorColor, double);
86  vtkGetVector3Macro(SeparatorColor, double);
88 
90 
94  vtkSetClampMacro(SeparatorWidth, int, 0, VTK_INT_MAX);
95  vtkGetMacro(SeparatorWidth, int);
97 
98  enum
99  {
104  RequestUpdateLayoutEvent = vtkCommand::UserEvent + 1,
105 
111  };
112 
113 protected:
114  vtkViewLayout();
115  ~vtkViewLayout() override;
116 
118 
121  vtkSetVector2Macro(TileDimensions, int);
122  vtkGetVector2Macro(TileDimensions, int);
124 
126 
130  vtkSetVector2Macro(TileMullions, int);
131  vtkGetVector2Macro(TileMullions, int);
133 
134  void UpdateLayout(vtkObject*, unsigned long, void*);
135  void UpdateLayoutForTileDisplay(vtkRenderWindow*);
136  void UpdateLayoutForCAVE(vtkRenderWindow*);
137 
138  void UpdateDisplay(vtkObject*, unsigned long, void*);
139 
140  void Paint(vtkViewport*);
141 
145  bool NeedsActiveStereo() const;
146 
147 private:
148  vtkViewLayout(const vtkViewLayout&) = delete;
149  void operator=(const vtkViewLayout&) = delete;
150 
151  class vtkInternals;
152  std::unique_ptr<vtkInternals> Internals;
154 
155  bool InTileDisplay;
156  int TileDimensions[2];
157  int TileMullions[2];
158  bool InCave;
159  bool DisplayResults;
160  int SeparatorWidth;
161  double SeparatorColor[3];
162 
163  friend class vtkViewLayoutProp;
164 };
165 
166 #endif
used by vtkSMViewLayoutProxy.
Definition: vtkViewLayout.h:50
#define VTKREMOTINGVIEWS_EXPORT
void PrintSelf(ostream &os, vtkIndent indent) VTK_OVERRIDE
baseclass for all ParaView views.
Definition: vtkPVView.h:44
Event fired by vtkPVView&#39;s internal render window to request update of the layout after a window is r...
view for comparative visualization/ film-strips.
static vtkObject * New()
void operator=(const vtkObjectBase &)