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:
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>
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 |
View | ( | ) |
Default constructor.
~View | ( | ) |
Default destructor.
bool IsA | ( | siClassID | in_ClassID | ) | const [virtual] |
Returns true if a given class type is compatible with this API class.
in_ClassID | class type. |
Reimplemented from UIPersistable.
Reimplemented in Schematic.
siClassID GetClassID | ( | ) | const [virtual] |
Returns the type of the API class.
Reimplemented from UIPersistable.
Reimplemented in Schematic.
Creates an object from another object. The newly created object is set to empty if the input object is not compatible.
in_obj | constant class object. |
Creates an object from a reference object. The newly created object is set to empty if the input reference object is not compatible.
in_ref | constant class object. |
Reimplemented from UIPersistable.
Reimplemented in Schematic.
CRefArray GetViews | ( | ) | const |
Finds a view in this layout from a specific view name.
in_strViewName | The name of the view to find. |
siViewState GetState | ( | ) | const |
CStatus PutState | ( | siViewState | in_lState | ) |
Sets the state of a view. View states are mutually exclusive.
in_lState | View state value. |
bool GetVisible | ( | ) | const |
Returns true if the view is visible or false otherwise.
CStatus PutVisible | ( | bool | in_bFlag | ) |
Make the view visible if the flag is true or hidden otherwise.
in_bFlag | Visible flag. |
bool GetFloating | ( | ) | const |
Returns true if the view is floating or false if the view is embedded inside another one.
Returns a view specific attribute value.
in_strParamName | Name of the attribute. |
Sets a view specific attribute value.
in_strParamName | Name of the attribute. |
in_value | The new attribute value. |
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.
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.
CStatus Move | ( | LONG | in_x, |
LONG | in_y | ||
) |
Moves a view to the specified global screen coordinate.
in_x | Position in X. |
in_y | Position in Y. |
CStatus Resize | ( | LONG | in_w, |
LONG | in_h | ||
) |
Changes the size of a view.
in_w | New width. |
in_h | New height |
CStatus GetRectangle | ( | LONG & | out_lLeft, |
LONG & | out_lTop, | ||
LONG & | out_lRight, | ||
LONG & | out_lBottom | ||
) | const |
Returns the rectangle of a view in screen coordinates.
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. |
CStatus Refresh | ( | ) |
Refreshes the underlying view. This function is supported on views such as "Preset Manager" and "Render Tree".
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".
CRefArray GetMemoCameras | ( | ) | const |
Returns an array of MemoCamera objects for a view.