28 #ifndef vtkSMViewLayoutProxy_h 29 #define vtkSMViewLayoutProxy_h 62 int Split(
int location,
int direction,
double fraction);
65 return this->Split(location, VERTICAL, fraction);
69 return this->Split(location, HORIZONTAL, fraction);
95 bool RemoveView(
int index);
104 bool Collapse(
int location);
110 bool SwapCells(
int location1,
int location2);
116 bool SetSplitFraction(
int location,
double fraction);
121 bool EqualizeViews();
134 bool MaximizeCell(
int location);
139 void RestoreMaximizedState();
146 vtkGetMacro(MaximizedCell,
int);
152 bool IsSplitCell(
int location);
157 Direction GetSplitDirection(
int location);
162 double GetSplitFraction(
int location);
179 static int GetParent(
int location) {
return (location > 0 ? ((location - 1) / 2) : -1); }
205 void UpdateViewPositions();
212 void ShowViewsOnTileDisplay();
220 return this->CaptureWindow(magnification, magnification);
222 vtkImageData* CaptureWindow(
int magnificationX,
int magnificationY);
230 return this->Superclass::SaveXMLState(root);
247 void GetLayoutExtent(
int extent[4]);
255 void SetSize(
const int size[2]);
258 const int size[] = { width, height };
269 this->GetLayoutExtent(extent);
270 return vtkVector2i(extent[1] - extent[0] + 1, extent[3] - extent[2] + 1);
282 std::vector<vtkSMViewProxy*> GetViews();
291 void SaveAsPNG(
int rank,
const char* fname);
308 virtual void UpdateState();
315 int GetEmptyCell(
int root);
320 int GetSplittableCell(
int root,
Direction& suggested_direction);
326 int ComputeSteadySplitFraction(
int location,
Direction direction);
337 bool SetBlockUpdate(
bool new_value)
339 bool temp = this->BlockUpdate;
340 this->BlockUpdate = new_value;
346 bool SetBlockUpdateViewPositions(
bool val)
348 bool temp = this->BlockUpdateViewPositions;
349 this->BlockUpdateViewPositions = val;
352 bool BlockUpdateViewPositions;
static int GetParent(int location)
Returns the parent index.
#define VTKREMOTINGVIEWS_EXPORT
static int GetFirstChild(int location)
Returns the index for the first child of the given location.
void PrintSelf(ostream &os, vtkIndent indent) override
vtkImageData * CaptureWindow(int magnification)
Captures an image from the layout (including all the views in the layout.
Superclass for all view proxies.
bool ContainsView(vtkSMViewProxy *view)
Returns if a view is contained in this layout.
void SetSize(int width, int height)
Update the size for all the views in the layout assuming the new size provided for the whole layout...
Header class that setup every thing in order to use Protobuf messages in a transparent manner...
vtkPVXMLElement * SaveXMLState(vtkPVXMLElement *root) override
Overridden to save custom XML state.
void LoadState(const vtkSMMessage *msg, vtkSMProxyLocator *locator) override
This method is used to initialise the object to the given state If the definitionOnly Flag is set to ...
vtkSMViewLayoutProxy is used by ParaView to layout multiple views in a 2D KD-Tree layout...
static vtkSMProxy * New()
virtual int LoadXMLState(vtkPVXMLElement *element, vtkSMProxyLocator *locator)
Loads the proxy state from the XML element.
proxy for a VTK object(s) on a server
is used to locate proxies referred to in state xmls while loading state files.
int SplitVertical(int location, double fraction)
int SplitHorizontal(int location, double fraction)
void operator=(const vtkSMProxy &)=delete
vtkSMProxyInternals * Internals
virtual vtkPVXMLElement * SaveXMLState(vtkPVXMLElement *root)
Saves the state of the proxy.
This is used by vtkPVXMLParser to represent an XML document starting at the root element.
static int GetSecondChild(int location)
Returns the index for the second child of the given location.
vtkVector2i GetSize()
Returns the current size.
iterates over the properties of a proxy