Inviwo 0.9.12-pre
Inviwo documentation
Loading...
Searching...
No Matches
inviwo::ViewManager Class Reference

A viewport manager for layout processors like imagelayout. Viewports are added using the following coordinate system: More...

#include <viewmanager.h>

Classes

struct  View
 

Public Types

using Propagator = std::function<void(Event*, size_t ind)>
 
using ViewList = std::vector<View>
 
using ViewId = size_t
 

Public Member Functions

bool propagateEvent (Event *event, Propagator propagator)
 maps a propagates event to the selected view return whether the event found a view was found
 
std::pair< bool, ViewId > getSelectedView () const
 Returns a pair with a bool of whether a view was found, and the index of the found view.
 
const ViewList & getViews () const
 
void push_back (View view)
 Add a viewport (x,y width,height) using the following coordinate system: y ^ | | ------> x.
 
void erase (View view)
 Erase a previously defined viewport (x,y width,height). If the viewport was not added before, nothing happens.
 
void erase (ViewId ind)
 Erase a previously defined viewport using index ind.
 
void replace (ViewId ind, View view)
 replace a previously defined viewport at index ind with a new viewport using the following coordinate system:
 
Viewoperator[] (ViewId ind)
 Return viewport using index ind.
 
size_t size () const
 
void clear ()
 

Detailed Description

A viewport manager for layout processors like imagelayout. Viewports are added using the following coordinate system:

y ^ | | ------> x Example for a (512,512) viewport split along the horizontal axis: _________(512,512) | 2 | |_______|(512,256) | 1 | |_______| x y width height Viewport 1: (0, 0, 512, 256) Viewport 2: (0, 256, 512, 256)

Member Function Documentation

◆ erase() [1/2]

void inviwo::ViewManager::erase ( View view)

Erase a previously defined viewport (x,y width,height). If the viewport was not added before, nothing happens.

See also
ViewManager

◆ erase() [2/2]

void inviwo::ViewManager::erase ( ViewId ind)

Erase a previously defined viewport using index ind.

Parameters
indViewport index [0 size()-1]

◆ operator[]()

View & inviwo::ViewManager::operator[] ( ViewId ind)

Return viewport using index ind.

Parameters
indViewport index [0 size()-1]
Returns
ivec4&

◆ push_back()

void inviwo::ViewManager::push_back ( View view)

Add a viewport (x,y width,height) using the following coordinate system: y ^ | | ------> x.

See also
ViewManager

◆ replace()

void inviwo::ViewManager::replace ( ViewId ind,
View view )

replace a previously defined viewport at index ind with a new viewport using the following coordinate system:

 y ^
   |
   |
   ------> x
See also
ViewManager
Parameters
indViewport index [0 size()-1]
viewthe view to replace with

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