Public Member Functions
View Class Reference

## Detailed Description

The View object represents an instance of a view in Softimage.

Views are accessible from Layout::GetViews or View::GetViews if the view is a relational view. View objects are created with Layout::CreateView.

With view objects, you can:

- Change the view state such as closed and minimized state.
- Change the view position and size.
- Hide/unhide the view.
- Access to specific view attributes such as the Explorer scope and NetView URL.
- Edit view attributes in bulk mode to avoid the UI to flicker.
- Iterate over the sub views of a relational view.

Since:
  4.0

Example:
  This example restores and cascades all floating views except the script editor.

              Application app;

              // Creates some sample views
              Layout layout = app.GetDesktop().GetActiveLayout();

              View v;
              layout.CreateView( L"Explorer", L"My Explorer", v );
              layout.CreateView( L"Browser", L"My Browser", v );
              layout.CreateView( L"NetView", L"My NetView", v );

              // position for the first view to cascade
              LONG px = 50;
              LONG py = 20;

              // delta between each view
              LONG dx = 20;
              LONG dy = 20;

              CRefArray views = layout.GetViews();
              for ( LONG i=0; i<views.GetCount() ; i++)
              {
                  View vw = views[i];
                  if( vw.GetFloating() && vw.GetName() != L"script_editor" )
                  {
                      vw.Move( px, py );
                      px += dx;
                      py += dy;
                      vw.PutState( siNormal ); // put view at the top so far
                  }
              }

`#include <xsi_view.h>`

Inheritance diagram for View:
[legend]

List of all members.

## Public Member Functions
| View ()
| ~View ()
| View (const CRef &in_ref)
| View (const View &in_obj)
bool | IsA (siClassID in_ClassID) const
siClassID | GetClassID () const
View & | operator= (const View &in_obj)
View & | operator= (const CRef &in_ref)
CRefArray | GetViews () const
View | FindView (const CString &in_strViewName)
siViewState | GetState () const
CStatus | PutState (siViewState in_lState)
bool | GetVisible () const
CStatus | PutVisible (bool in_bFlag)
bool | GetFloating () const
CValue | GetAttributeValue (const CString &in_strParamName) const
CStatus | PutAttributeValue (const CString &in_strParamName, const CValue &in_value)
CStatus | BeginEdit ()
CStatus | EndEdit ()
CStatus | Move (LONG in_x, LONG in_y)
CStatus | Resize (LONG in_w, LONG in_h)
CStatus | GetRectangle (LONG &out_lLeft, LONG &out_lTop, LONG &out_lRight, LONG &out_lBottom) const
CStatus | Refresh ()
CStatus | Rearrange ()
CRefArray | GetMemoCameras () const

## Constructor & Destructor Documentation

View | ( |  | ) |

Default constructor.

~View | ( |  | ) |

Default destructor.

View | ( | const CRef & | in_ref | ) |

Constructor.

Parameters:

  in_ref | constant reference object.

View | ( | const View & | in_obj | ) |

Copy constructor.

Parameters:

  in_obj | constant class object.

## Member Function Documentation

bool IsA | ( | siClassID | in_ClassID | ) | const`[virtual]`

Returns true if a given class type is compatible with this API class.

Parameters:

  in_ClassID | class type.

Returns:
  true if the class is compatible, false otherwise.

Reimplemented from UIPersistable.

Reimplemented in Schematic.

siClassID GetClassID | ( |  | ) | const`[virtual]`

Returns the type of the API class.

Returns:
  The class type.

Reimplemented from UIPersistable.

Reimplemented in Schematic.

View& operator= | ( | const View & | in_obj | ) |

Creates an object from another object. The newly created object is set to empty if the input object is not compatible.

Parameters:

  in_obj | constant class object.

Returns:
  The new View object.

View& operator= | ( | const CRef & | in_ref | ) |

Creates an object from a reference object. The newly created object is set to empty if the input reference object is not compatible.

Parameters:

  in_ref | constant class object.

Returns:
  The new View object.

Reimplemented from UIPersistable.

Reimplemented in Schematic.

CRefArray GetViews | ( |  | ) | const

Returns an array of View objects defined for this View. A View can have sub views if it was defined as a relational view.

Returns:
  Array of View objects.

View FindView | ( | const CString & | in_strViewName | ) |

Finds a view in this layout from a specific view name.

Parameters:

  in_strViewName | The name of the view to find.

Returns:
  The newly created view object.

siViewState GetState | ( |  | ) | const

Returns the state of a view. View states are mutually exclusive.

Returns:
  The View state value.

CStatus PutState | ( | siViewState | in_lState | ) |

Sets the state of a view. View states are mutually exclusive.

Parameters:

  in_lState | View state value.

Returns:
  CStatus::OK success
  CStatus::Fail failure

bool GetVisible | ( |  | ) | const

Returns true if the view is visible or false otherwise.

Returns:
  true if the view is visible; false otherwise.

CStatus PutVisible | ( | bool | in_bFlag | ) |

Make the view visible if the flag is true or hidden otherwise.

Parameters:

  in_bFlag | Visible flag.

Returns:
  CStatus::OK success
  CStatus::Fail failure

bool GetFloating | ( |  | ) | const

Returns true if the view is floating or false if the view is embedded inside another one.

Returns:
  true if the view is floating; false if embedded inside another one.

CValue GetAttributeValue | ( | const CString & | in_strParamName | ) | const

Returns a view specific attribute value.

Parameters:

  in_strParamName | Name of the attribute.

Returns:
  The Attribute value.

CStatus PutAttributeValue | ( | const CString & | in_strParamName,
|  | const CValue & | in_value
| ) |  |

Sets a view specific attribute value.

Parameters:

  in_strParamName | Name of the attribute.
  in_value | The new attribute value.

Returns:
  CStatus::OK success
  CStatus::Fail failure

CStatus BeginEdit | ( |  | ) |

Puts the view in edit mode. The edit mode allows you to change several view attributes in bulk without affecting the current UI. Call the View::EndEdit method to quit the edit mode.

Returns:
  CStatus::OK success
  CStatus::Fail failure

CStatus EndEdit | ( |  | ) |

Requests an end to an edit operation on this View. This function updates the view with the attribute changes performed so far. This has no effect if the view is not in edit mode.

Returns:
  CStatus::OK success
  CStatus::Fail failure

CStatus Move | ( | LONG | in_x,
|  | LONG | in_y
| ) |  |

Moves a view to the specified global screen coordinate.

Parameters:

  in_x | Position in X.
  in_y | Position in Y.

Returns:
  CStatus::OK success
  CStatus::Fail failure

CStatus Resize | ( | LONG | in_w,
|  | LONG | in_h
| ) |  |

Changes the size of a view.

Parameters:

  in_w | New width.
  in_h | New height

Returns:
  CStatus::OK success
  CStatus::Fail failure

CStatus GetRectangle | ( | LONG & | out_lLeft,
|  | LONG & | out_lTop,
|  | LONG & | out_lRight,
|  | LONG & | out_lBottom
| ) |  | const

Returns the rectangle of a view in screen coordinates.

Return values:

  out_lLeft | Returns the left screen coordinate of a view.
  out_lTop | Returns the top screen coordinate of a view.
  out_lRight | Returns the right screen coordinate of a view.
  out_lBottom | Returns the bottom screen coordinate of a view.

Returns:
  CStatus::OK success
  CStatus::Fail failure

Since:
  9.0 (2011)

CStatus Refresh | ( |  | ) |

Refreshes the underlying view. This function is supported on views such as "Preset Manager" and "Render Tree".

Returns:
  CStatus::OK Success.
  CStatus::NotImpl Not implemented on this view.
  CStatus::Fail Failure.

Since:
  9.0 (2011)

CStatus Rearrange | ( |  | ) |

Rearrange the selected nodes. If no nodes selected, rearrange all nodes. This function is supported on views such as "ICE Tree" and "Render Tree".

Returns:
  CStatus::OK Success.
  CStatus::NotImpl Not implemented on this view.
  CStatus::Fail Failure.

Since:
  10.0 (2012)

CRefArray GetMemoCameras | ( |  | ) | const

Returns an array of MemoCamera objects for a view.

Returns:
  Array of MemoCamera objects.

Since:
  10.5 (2012)

The documentation for this class was generated from the following file:

- xsi_view.h