cee::vis::OverlayItem Class Referenceabstract

Abstract interface for overlay items. More...

Public Types

enum  LayoutCorner {
  TOP_LEFT, TOP_RIGHT, BOTTOM_LEFT, BOTTOM_RIGHT,
  CENTER, TOP_CENTER, BOTTOM_CENTER
}
 Enumerator for the different locations/"corners" of the view. More...
 
enum  LayoutDirection { HORIZONTAL, VERTICAL, ABSOLUTE_POSITION }
 Enumerator for horizontal or vertical orientation of layout items. Describes which direction additional items should be positioned if more than one exists in the same corner. More...
 

Public Member Functions

virtual unsigned int width () const =0
 Returns the width of the overlay item. More...
 
virtual unsigned int height () const =0
 Returns the height of the overlay item. More...
 
virtual void setSize (unsigned int width, unsigned int height)=0
 Sets the dimensions of the OverlayItem in pixels. More...
 
virtual int priority () const =0
 Returns the render priority of the item. More...
 
virtual void setPriority (int priority)=0
 Sets render priority of the item. More...
 
bool visible () const
 Returns true if the overlay item is set to be visible. More...
 
void setVisible (bool visible)
 Sets if the overlay item should be visible or not. More...
 
int absolutePositionX () const
 Returns the x coordinate of the absolute position to use for the OverlayItem if LayoutDirection is specified as ABSOLUTE_POSITION. More...
 
int absolutePositionY () const
 Returns the y coordinate of the absolute position to use for the OverlayItem if LayoutDirection is specified as ABSOLUTE_POSITION. More...
 
void setAbsolutePosition (int x, int y)
 Sets the absolute position of the bottom left corner of the OverlayItem as an offset from the LayoutCorner of the item. More...
 
- Public Member Functions inherited from cee::RefCountedObject
void addRef () const
 Increments the reference count for this object. More...
 
void release () const
 Decrements the reference count for this object. More...
 
int refCount () const
 Returns the reference count for this object. More...
 
void setRefCountZero () const
 Sets the ref count to zero, but DOES NOT delete the object. More...
 
Inheritance diagram for cee::vis::OverlayItem:
cee::RefCountedObject cee::plt::OverlayPlot cee::ug::OverlayColorLegend cee::vis::OverlayAxisCross cee::vis::OverlayCategoryLegend cee::vis::OverlayColorLegendContinuousDomain cee::vis::OverlayImage cee::vis::OverlayNavigationCube cee::vis::OverlayTextBox

Detailed Description

Abstract interface for overlay items.

Overlay items are visual items presented overlaying the models in the View, for instance a color legend for scalar settings.

The overlay item can be added to a view using the View::overlay() and Overlay::addItem(). The view manages the layout of the overlay items, so only a desired size can be given in in this class. The position is specified when the overlay item is added to the view.

An overlay item can be shown in multiple views at the same time.

An overlay item can be set to invisible for temporary hiding it from the view.

See also
OverlayTextBox
OverlayImage
OverlayColorLegend
OverlayAxisCross
OverlayCategoryLegend
OverlayNavigationCube
OverlayPlot

Member Enumeration Documentation

Enumerator for the different locations/"corners" of the view.

Enumerator
TOP_LEFT 

Top left corner.

TOP_RIGHT 

Top right corner.

BOTTOM_LEFT 

Bottom left corner.

BOTTOM_RIGHT 

Bottom right corner.

CENTER 

Center of the view.

TOP_CENTER 

Top centered.

BOTTOM_CENTER 

Bottom centered.

Enumerator for horizontal or vertical orientation of layout items. Describes which direction additional items should be positioned if more than one exists in the same corner.

Enumerator
HORIZONTAL 

Horizontal layout direction.

VERTICAL 

Vertical layout direction.

ABSOLUTE_POSITION 

Absolute position of the overlay item. Absolute offset from the given LayoutCorner.

See also
setAbsolutePosition

Member Function Documentation

int cee::vis::OverlayItem::absolutePositionX ( ) const

Returns the x coordinate of the absolute position to use for the OverlayItem if LayoutDirection is specified as ABSOLUTE_POSITION.

See also
setAbsolutePosition
int cee::vis::OverlayItem::absolutePositionY ( ) const

Returns the y coordinate of the absolute position to use for the OverlayItem if LayoutDirection is specified as ABSOLUTE_POSITION.

See also
setAbsolutePosition
void cee::vis::OverlayItem::setAbsolutePosition ( int  x,
int  y 
)

Sets the absolute position of the bottom left corner of the OverlayItem as an offset from the LayoutCorner of the item.

Note
This only applies to OverlayItems with LayoutDirection specified as ABSOLUTE_POSITION

Example: Corner: TOP_RIGHT, offset (400, 700). This will position the bottom left corner of the item 400 pixels from the left side of the screen and 700 pixel from the top of the screen.

cee::vis::OverlayItem::setSize ( unsigned int  width,
unsigned int  height 
)
pure virtual
void cee::vis::OverlayItem::setVisible ( bool  visible)

Sets if the overlay item should be visible or not.

bool cee::vis::OverlayItem::visible ( ) const

Returns true if the overlay item is set to be visible.