Public Member Functions
Layout Class Reference

## Detailed Description

The Layout object represents an instance of a screen layout in Softimage and gives access to the views attached to that layout. The layout is read-only and cannot be edited or created with the SDK.

You can access layouts via the Desktop: see Desktop::ActiveLayout and Desktop::Layouts.

See also:
  Desktop::ActiveLayout, Desktop::Layouts

Since:
  4.0

Example:

            using namespace XSI;

            Application app;
            Desktop theDesktop = app.GetDesktop();

            app.LogMessage( L"List all loaded layouts" );
            CRefArray layoutArray = theDesktop.GetLayouts();
            for (LONG i=0; i<layoutArray.GetCount(); i++)
            {
                Layout layout = layoutArray[i];
                app.LogMessage( L"Layout name: " + layout.GetName() );
            }

`#include <xsi_layout.h>`

Inheritance diagram for Layout:
[legend]

List of all members.

## Public Member Functions
| Layout ()
| ~Layout ()
| Layout (const CRef &in_ref)
| Layout (const Layout &in_obj)
bool | IsA (siClassID in_ClassID) const
siClassID | GetClassID () const
Layout & | operator= (const Layout &in_obj)
Layout & | operator= (const CRef &in_ref)
CRefArray | GetViews () const
CStatus | CreateView (const CString &in_strTypeName, const CString &in_strViewName, CRef &out_newView)
CStatus | CreateViewFromDefinitionFile (const CString &in_strFilePath, const CString &in_strViewName, CRef &io_newView)
View | FindView (const CString &in_strViewName)

## Constructor & Destructor Documentation

Layout | ( |  | ) |

Default constructor.

~Layout | ( |  | ) |

Default destructor.

Layout | ( | const CRef & | in_ref | ) |

Constructor.

Parameters:

  in_ref | constant reference object.

Layout | ( | const Layout & | 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.

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

Returns the type of the API class.

Returns:
  The class type.

Reimplemented from UIPersistable.

Layout& operator= | ( | const Layout & | 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 Layout object.

Layout& 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 Layout object.

Reimplemented from UIPersistable.

CRefArray GetViews | ( |  | ) | const

Returns an array of View objects currently attached to this layout.

Returns:
  Array of View objects,

CStatus CreateView | ( | const CString & | in_strTypeName,
|  | const CString & | in_strViewName,
|  | CRef & | out_newView
| ) |  |

Creates a new View object. The new view is a temporary view and not attached to this layout, therefore saving the layout does not make the new view part of the layout either.

Parameters:

  in_strTypeName | The type of view to create. Available types can be found in the .xsivw and .xsitb files under the Application\Views and Application\Toolbars folders located in the standard factory, user and workgroup locations.
  in_strViewName | The name of the view to create.

Return values:

  out_newView | The newly created view object.

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

CStatus CreateViewFromDefinitionFile | ( | const CString & | in_strFilePath,
|  | const CString & | in_strViewName,
|  | CRef & | io_newView
| ) |  |

Creates a new View object given the path to its definition on disk. This function is a low-level approach to dealing with Views, in most cases Layout::CreateView is the most convenient way to create floating views.

This function will load any valid view file, even if the file is outside of the normal search locations inside the user, factory and workgroups directories. It will fail if there is an XML syntax error or other problem with the content of the view definition.

Parameters:

  in_strFilePath | Complete path to a .xsitb or .xsivw file on disk.
  in_strViewName | The name of the view to create.

Return values:

  io_newView | Returns the new view.

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

Since:

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.

Since:
  10.0 (2012)

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

- xsi_layout.h