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... | |
![]() | |
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... | |
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.
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.
|
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.
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.
|
pure virtual |
Returns the height of the overlay item.
Implemented in cee::vis::OverlayCategoryLegend, cee::plt::OverlayPlot, cee::vis::OverlayNavigationCube, cee::vis::OverlayTextBox, cee::vis::OverlayImage, cee::vis::OverlayColorLegendContinuousDomain, cee::vis::OverlayAxisCross, and cee::ug::OverlayColorLegend.
|
pure virtual |
Returns the render priority of the item.
Implemented in cee::vis::OverlayCategoryLegend, cee::plt::OverlayPlot, cee::vis::OverlayNavigationCube, cee::vis::OverlayTextBox, cee::vis::OverlayColorLegendContinuousDomain, cee::vis::OverlayImage, cee::vis::OverlayAxisCross, and cee::ug::OverlayColorLegend.
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.
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.
|
pure virtual |
Sets render priority of the item.
Implemented in cee::vis::OverlayCategoryLegend, cee::plt::OverlayPlot, cee::vis::OverlayNavigationCube, cee::vis::OverlayTextBox, cee::vis::OverlayColorLegendContinuousDomain, cee::vis::OverlayImage, cee::vis::OverlayAxisCross, and cee::ug::OverlayColorLegend.
|
pure virtual |
Sets the dimensions of the OverlayItem in pixels.
Implemented in cee::vis::OverlayCategoryLegend, cee::plt::OverlayPlot, cee::vis::OverlayNavigationCube, cee::vis::OverlayTextBox, cee::vis::OverlayImage, cee::vis::OverlayColorLegendContinuousDomain, cee::vis::OverlayAxisCross, and cee::ug::OverlayColorLegend.
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.
|
pure virtual |
Returns the width of the overlay item.
Implemented in cee::vis::OverlayCategoryLegend, cee::plt::OverlayPlot, cee::vis::OverlayNavigationCube, cee::vis::OverlayTextBox, cee::vis::OverlayImage, cee::vis::OverlayColorLegendContinuousDomain, cee::vis::OverlayAxisCross, and cee::ug::OverlayColorLegend.