Home Previous Up Index

visman::components::visman_core::ViewportList

Overview

interface ViewportList extends Observable

Container managing all Viewport objects of a preset. A viewport defines a specific view layout, size and visibility.

Operation Index

createNew
Creates a new viewport with the given name.
createDuplicate
Creates a duplicate of an existing viewport, including its layout configuration.
importFromJSON
Imports a viewport from a JSON representation.
deleteViewport
Deletes the given viewport from the preset.
deleteViewportByName
Deletes a viewport by its name.
asDictionary
Returns all viewports as a dictionary.

Operations

Viewport* createNew(string name) throws InvalidName, DuplicateEntity

Creates a new viewport with the given name.

Parameters

name
Name of the new viewport.

Return Value

The newly created Viewport instance.

Exceptions

InvalidName
If the provided name does not meet naming rules.
DuplicateEntity
If a viewport with the same name already exists.

Viewport* createDuplicate(Viewport* v)

Creates a duplicate of an existing viewport, including its layout configuration.

Parameters

v
The viewport to duplicate.

Return Value

The newly created duplicate Viewport.

Viewport* importFromJSON(string json) throws FormatError, DuplicateEntity

Imports a viewport from a JSON representation.

Parameters

json
JSON string describing a viewport.

Return Value

The imported Viewport instance.

Exceptions

FormatError
If the JSON data is malformed or does not match the expected format.
DuplicateEntity
If a viewport with the same name already exists.

void deleteViewport(Viewport* v)

Deletes the given viewport from the preset.

Parameters

v
The viewport to delete.

void deleteViewportByName(string viewport) throws InvalidName

Deletes a viewport by its name.

Parameters

viewport
Name of the viewport to delete.

Exceptions

InvalidName
If no viewport with the given name exists.

ViewPortDict asDictionary()

Returns all viewports as a dictionary.

Return Value

A dictionary mapping viewport names to their corresponding Viewport objects.


Home Previous Up Index