cee::vis::OverlayItem
-
class
OverlayItem
: public RefCountedObject 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, and OverlayPlot
Subclassed by OverlayPlot, OverlayColorLegend, OverlayAxisCross, OverlayCategoryLegend, OverlayColorLegendContinuousDomain, OverlayImage, OverlayNavigationCube, OverlayTextBox
Public Types
-
enum
LayoutCorner
Enumerator for the different locations/”corners” of the view.
Values:
-
enumerator
TOP_LEFT
Top left corner.
-
enumerator
TOP_RIGHT
Top right corner.
-
enumerator
BOTTOM_LEFT
Bottom left corner.
-
enumerator
BOTTOM_RIGHT
Bottom right corner.
-
enumerator
CENTER
Center of the view.
-
enumerator
TOP_CENTER
Top centered.
-
enumerator
BOTTOM_CENTER
Bottom centered.
-
enumerator
-
enum
LayoutDirection
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.
Values:
-
enumerator
HORIZONTAL
Horizontal layout direction.
-
enumerator
VERTICAL
Vertical layout direction.
-
enumerator
ABSOLUTE_POSITION
Absolute position of the overlay item. Absolute offset from the given LayoutCorner.
See also
-
enumerator
Public Functions
-
unsigned int
width
() const Returns the width of the overlay item in pixels.
-
unsigned int
height
() const Returns the height of the overlay item in pixels.
-
void
setSize
(unsigned int width, unsigned int height) Sets the dimensions of the overlay item in pixels.
-
int
priority
() const Returns the render priority of the item.
-
void
setPriority
(int priority) Sets render priority of the overlay item.
The render priority determines the order in which item get rendered. Items with lower priorities get rendered first.
These are the default priorities for the different types of overlay items:
- OverlayColorLegend: 10
- OverlayCategoryLegend: 10
- OverlayColorLegendContinuousDomain: 10
- OverlayTextBox: 12
- OverlayImage: 15
- OverlayPlot: 18
- OverlayAxisCross: 20
- OverlayNavigationCube: 20
-
bool
visible
() const Returns true if the overlay item is set to be visible.
-
void
setVisible
(bool visible) Sets if the overlay item should be visible or not.
-
int
absolutePositionX
() const Returns the x coordinate of the absolute position to use for the OverlayItem if LayoutDirection is specified as ABSOLUTE_POSITION.
See also
-
int
absolutePositionY
() const Returns the y coordinate of the absolute position to use for the OverlayItem if LayoutDirection is specified as ABSOLUTE_POSITION.
See also
-
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.
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.
-
enum