Overlay items are visual item presented overlaying the models in the View, for instance a color legend for scalar settings. More...
Public Member Functions | |
size_t | itemCount () |
Returns the number of overlay items in the model. More... | |
size_t | itemIndex (const OverlayItem *overlayItem) const |
Returns the index of the given overlay item. More... | |
OverlayItem * | item (size_t itemIndex) |
Returns the overlay item at the given index. More... | |
OverlayItem::LayoutCorner | itemCorner (size_t itemIndex) const |
Returns layout corner of overlay item at index itemIndex. More... | |
OverlayItem::LayoutDirection | itemDirection (size_t itemIndex) const |
Returns layout direction of overlay item at index itemIndex. More... | |
void | itemPosition (size_t itemIndex, int *x, int *y) |
Returns the position of the given overlay item. More... | |
void | addItem (OverlayItem *overlayItem, OverlayItem::LayoutCorner corner, OverlayItem::LayoutDirection direction) |
Adds an overlay item to the specified corner. More... | |
void | removeItem (OverlayItem *overlayItem) |
Removes the given overlay item from the view. More... | |
void | removeAllItems () |
Removes all overlay items in the view. More... | |
void | setOverlayItemOverrideSize (OverlayItem *overlayItem, unsigned int width, unsigned int height) |
Overrides the size of the overlay item with the specified size in this view. More... | |
void | clearOverlayItemOverrideSize (OverlayItem *overlayItem) |
Removes the override size of the overlay item in this view. More... | |
OverlayItem * | itemFromWindowCoordinates (int x, int y) |
Returns the overlay item (if any) at the given cursor position. More... | |
bool | automaticLayoutOfModelItems () const |
Returns true if the color legends should be automatically sized to fit in the view. More... | |
void | setAutomaticLayoutOfModelItems (bool autoLayout) |
Sets if the color legends should be automatically sized to fit in the view or not. More... | |
unsigned int | maximumHeightAutomaticLayout () const |
Returns the maximum height the ug color legends will have if automaticLayoutOfModelItems is on. More... | |
void | setMaximumHeightAutomaticLayout (unsigned int heightInPixels) |
Sets the maximum height a color legend from the unstruct grid model will have if automaticLayoutOfModelItems is enabled. More... | |
bool | disableModelItems () const |
Returns true if the overlay items produced from the models in the view should hidden. More... | |
void | setDisableModelItems (bool disable) |
Specifies if the overlay items produced from the models in the view should be shown or not. More... | |
OverlayItem::LayoutCorner | modelItemsLayoutCorner () const |
Returns the corner the model items (e.g. Color Legends from UnstructGrid) will be positioned in. More... | |
OverlayItem::LayoutDirection | modelItemsLayoutDirection () const |
Returns the direction the model items (e.g. Color Legends from UnstructGrid) will be positioned in. More... | |
void | setModelItemsLayout (OverlayItem::LayoutCorner corner, OverlayItem::LayoutDirection direction) |
Specifies the layout of the model items (e.g. Color Legends from UnstructGrid) More... | |
void | setShowDebugInfo (bool show) |
Turns on/off the display of debug info in the view. More... | |
bool | showDebugInfo () const |
Returns true if debug info is displayed in the view. False if not. 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... | |
Overlay items are visual item presented overlaying the models in the View, for instance a color legend for scalar settings.
Available overlay item types are:
Overlay items are added to a corner and direction of your choosing using addItem().
You can specify the layout of the model items (e.g. OverlayColorLegend) by using the setModelItemsLayout() method.
void cee::vis::Overlay::addItem | ( | OverlayItem * | overlayItem, |
OverlayItem::LayoutCorner | corner, | ||
OverlayItem::LayoutDirection | direction | ||
) |
Adds an overlay item to the specified corner.
Overlay items can be, for instance, a color legend or a user defined logo. The direction tells which direction to lay out the added items if there are multiple items in the same location.
bool cee::vis::Overlay::automaticLayoutOfModelItems | ( | ) | const |
Returns true if the color legends should be automatically sized to fit in the view.
void cee::vis::Overlay::clearOverlayItemOverrideSize | ( | OverlayItem * | overlayItem | ) |
Removes the override size of the overlay item in this view.
bool cee::vis::Overlay::disableModelItems | ( | ) | const |
Returns true if the overlay items produced from the models in the view should hidden.
OverlayItem * cee::vis::Overlay::item | ( | size_t | itemIndex | ) |
Returns the overlay item at the given index.
OverlayItem::LayoutCorner cee::vis::Overlay::itemCorner | ( | size_t | itemIndex | ) | const |
Returns layout corner of overlay item at index itemIndex.
size_t cee::vis::Overlay::itemCount | ( | ) |
Returns the number of overlay items in the model.
OverlayItem::LayoutDirection cee::vis::Overlay::itemDirection | ( | size_t | itemIndex | ) | const |
Returns layout direction of overlay item at index itemIndex.
OverlayItem * cee::vis::Overlay::itemFromWindowCoordinates | ( | int | x, |
int | y | ||
) |
Returns the overlay item (if any) at the given cursor position.
The input (window) coordinates must be specified in OpenGL style coordinates, which means a right handed coordinate system with the origin in the lower left corner of the window.
size_t cee::vis::Overlay::itemIndex | ( | const OverlayItem * | overlayItem | ) | const |
Returns the index of the given overlay item.
cee::UNDEFINED_SIZE_T is returned if the item was not found.
void cee::vis::Overlay::itemPosition | ( | size_t | itemIndex, |
int * | x, | ||
int * | y | ||
) |
Returns the position of the given overlay item.
unsigned int cee::vis::Overlay::maximumHeightAutomaticLayout | ( | ) | const |
Returns the maximum height the ug color legends will have if automaticLayoutOfModelItems is on.
OverlayItem::LayoutCorner cee::vis::Overlay::modelItemsLayoutCorner | ( | ) | const |
Returns the corner the model items (e.g. Color Legends from UnstructGrid) will be positioned in.
OverlayItem::LayoutDirection cee::vis::Overlay::modelItemsLayoutDirection | ( | ) | const |
Returns the direction the model items (e.g. Color Legends from UnstructGrid) will be positioned in.
void cee::vis::Overlay::removeAllItems | ( | ) |
Removes all overlay items in the view.
void cee::vis::Overlay::removeItem | ( | OverlayItem * | overlayItem | ) |
Removes the given overlay item from the view.
void cee::vis::Overlay::setAutomaticLayoutOfModelItems | ( | bool | autoLayout | ) |
Sets if the color legends should be automatically sized to fit in the view or not.
If true, the heights of the color legends are adjusted so all legends will be visible in the view
void cee::vis::Overlay::setDisableModelItems | ( | bool | disable | ) |
Specifies if the overlay items produced from the models in the view should be shown or not.
If set to false, only the overlay items added to this class will be shown.
void cee::vis::Overlay::setMaximumHeightAutomaticLayout | ( | unsigned int | heightInPixels | ) |
Sets the maximum height a color legend from the unstruct grid model will have if automaticLayoutOfModelItems is enabled.
void cee::vis::Overlay::setModelItemsLayout | ( | OverlayItem::LayoutCorner | corner, |
OverlayItem::LayoutDirection | direction | ||
) |
Specifies the layout of the model items (e.g. Color Legends from UnstructGrid)
The default is BOTTOM_LEFT and VERTICAL. Use this method if you would like the color legends from the UnstructGrid model to be placed in another corner.
void cee::vis::Overlay::setOverlayItemOverrideSize | ( | OverlayItem * | overlayItem, |
unsigned int | width, | ||
unsigned int | height | ||
) |
Overrides the size of the overlay item with the specified size in this view.
Useful for overlay items that are shared between multiple views with different view sizes
void cee::vis::Overlay::setShowDebugInfo | ( | bool | show | ) |
Turns on/off the display of debug info in the view.
bool cee::vis::Overlay::showDebugInfo | ( | ) | const |
Returns true if debug info is displayed in the view. False if not.