/usr/include/paraview/vtkSMProxySelectionModel.h is in paraview-dev 5.0.1+dfsg1-4.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 | /*=========================================================================
Program: ParaView
Module: vtkSMProxySelectionModel.h
Copyright (c) Kitware, Inc.
All rights reserved.
See Copyright.txt or http://www.paraview.org/HTML/Copyright.html for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notice for more information.
=========================================================================*/
// .NAME vtkSMProxySelectionModel - selects proxies.
// .SECTION Description
// vtkSMProxySelectionModel is used to select proxies. vtkSMProxyManager uses
// two instances of vtkSMProxySelectionModel for keeping track of the
// selected/active sources/filters and the active view.
// .SECTION See Also
// vtkSMProxyManager
#ifndef vtkSMProxySelectionModel_h
#define vtkSMProxySelectionModel_h
#include "vtkPVServerManagerCoreModule.h" //needed for exports
#include "vtkSMRemoteObject.h"
#include "vtkSMMessageMinimal.h" // Needed for vtkSMMessage*
#include "vtkSmartPointer.h" // needed for vtkSmartPointer.
class vtkSMProxySelectionModelInternal;
class vtkCollection;
class vtkSMProxy;
//BTX
#include <set> // needed for vtkset::set.
//ETX
class VTKPVSERVERMANAGERCORE_EXPORT vtkSMProxySelectionModel : public vtkSMRemoteObject
{
public:
static vtkSMProxySelectionModel* New();
vtkTypeMacro(vtkSMProxySelectionModel, vtkSMRemoteObject);
void PrintSelf(ostream& os, vtkIndent indent);
// Description:
// Override the set session, so we can attach an observer to the Collaboration
// manager in order to monitor master/slave changes.
virtual void SetSession(vtkSMSession*);
// Description:
// Allow to synchronize the active object with master or just keep remote object
// out-of-synch. Only the state from the master will be loaded.
void SetFollowingMaster(bool following);
bool IsFollowingMaster();
//BTX
// Description:
// Type for selection.
typedef std::set<vtkSmartPointer<vtkSMProxy> > SelectionType;
// vtkSMProxy selection flags
enum ProxySelectionFlag {
NO_UPDATE = 0,
CLEAR = 1,
SELECT = 2,
DESELECT = 4,
CLEAR_AND_SELECT = CLEAR | SELECT
};
//ETX
// Description:
// Returns the proxy that is current, NULL if there is no current.
vtkSMProxy* GetCurrentProxy();
// Description:
// Sets the current proxy. \c command is used to control how the current
// selection is affected.
// \li NO_UPDATE: change the current without affecting the selected set of
// proxies.
// \li CLEAR: clear current selection
// \li SELECT: also select the proxy being set as current
// \li DESELECT: deselect the proxy being set as current.
void SetCurrentProxy(vtkSMProxy* proxy, int command);
// Description:
// Returns true if the proxy is selected.
bool IsSelected(vtkSMProxy* proxy);
// Returns the number of selected proxies.
unsigned int GetNumberOfSelectedProxies();
// Description:
// Returns the selected proxy at the given index.
vtkSMProxy* GetSelectedProxy(unsigned int index);
//BTX
// Description:
// Returns the selection set.
const SelectionType& GetSelection() { return this->Selection; }
//ETX
// Description:
// Update the selected set of proxies. \c command affects how the selection is
// updated.
// \li NO_UPDATE: don't affect the selected set of proxies.
// \li CLEAR: clear selection
// \li SELECT: add the proxies to selection
// \li DESELECT: deselect the proxies
// \li CLEAR_AND_SELECT: clear selection and then add the specified proxies as
// the selection.
//BTX
void Select(const SelectionType &proxies, int command);
//ETX
void Select(vtkSMProxy* proxy, int command);
// Description:
// Wrapper friendly methods to doing what Select() can do.
void Clear()
{ this->Select(NULL, CLEAR); }
void Select(vtkSMProxy* proxy)
{ this->Select(proxy, SELECT); }
void Deselect(vtkSMProxy* proxy)
{ this->Select(proxy, DESELECT); }
void ClearAndSelect(vtkSMProxy* proxy)
{ this->Select(proxy, CLEAR_AND_SELECT); }
// Description:
// Utility method to get the data bounds for the currently selected items.
// This only makes sense for selections comprising of source-proxies or
// output-port proxies.
// Returns true is the bounds are valid.
bool GetSelectionDataBounds(double bounds[6]);
//BTX
// Description:
// This method return the full object state that can be used to create that
// object from scratch.
// This method will be used to fill the undo stack.
// If not overriden this will return NULL.
virtual const vtkSMMessage* GetFullState();
// Description:
// This method is used to initialise the object to the given state
// If the definitionOnly Flag is set to True the proxy won't load the
// properties values and just setup the new proxy hierarchy with all subproxy
// globalID set. This allow to split the load process in 2 step to prevent
// invalid state when property refere to a sub-proxy that does not exist yet.
virtual void LoadState( const vtkSMMessage* msg, vtkSMProxyLocator* locator);
protected:
vtkSMProxySelectionModel();
~vtkSMProxySelectionModel();
void InvokeCurrentChanged(vtkSMProxy* proxy);
void InvokeSelectionChanged();
vtkSmartPointer<vtkSMProxy> Current;
SelectionType Selection;
// Description:
// When the state has changed we call that method so the state can be shared
// is any collaboration is involved
void PushStateToSession();
// Cached version of State
vtkSMMessage* State;
private:
vtkSMProxySelectionModel(const vtkSMProxySelectionModel&); // Not implemented
void operator = (const vtkSMProxySelectionModel&); // Not implemented
class vtkInternal;
friend class vtkInternal;
vtkInternal* Internal;
//ETX
};
#endif
|