ImFusion C++ SDK 4.4.0
ImFusion::GlPlotLegend Class Reference

#include <ImFusion/GUI/GlPlotLegend.h>

Display legend of a plot view as an overlay Color and marker styles replicate the plot style, however, in the text form instead of graphic renders. More...

Inheritance diagram for ImFusion::GlPlotLegend:

Detailed Description

Display legend of a plot view as an overlay Color and marker styles replicate the plot style, however, in the text form instead of graphic renders.

Public Member Functions

void render (const GL::Viewport &viewport) override
 render the overlay with the given width and height
void setTitle (const std::string &text)
 set title of the legend
void addLegend (const std::string &text, const GlPlotView::PlotInfo &info)
 add a new plot legend
void clearLegend ()
 clear all
void setFontSize (int size)
 set font size for the legend text title font size is set to size + 2pt
void setTextColor (const vec4 &color)
 set text color for both title and legend text
void setBackgroundColor (const vec3 &color)
 set background color
void setBackgroundBoxColor (const vec3 &color)
 set background box color
void setBackgroundMarginSize (int margin)
 set background margin relative to the text applied to both horizontal/vertical margin
Public Member Functions inherited from ImFusion::GlOverlay
 GlOverlay (int widthHint, int heightHint, int minWidthHint, int minHeightHint)
 Instantiate a new GlOverlay with the given size hints.
virtual void setVisible (bool visible)
 Set overlay visibility.
virtual bool visible () const
 Return overlay visibility.
virtual void setSizeHint (int width, int height)
 Sets the preferred size of the overlay for a DPI scaling of 1.0.
virtual int sizeHintWidth () const
 Gets the preferred width of the overlay.
virtual int sizeHintHeight () const
 Gets the preferred height of the overlay.
virtual void setMinimalSizeHint (int width, int height)
 Sets the minimal size of the overlay for a DPI scaling of 1.0.
virtual int minimalSizeHintWidth () const
 Gets the minimal width of the overlay.
virtual int minimalSizeHintHeight () const
 Gets the minimal height of the overlay.
virtual void update ()
 updates any intermediate data the overlay uses for rendering
Public Member Functions inherited from ImFusion::SignalReceiver
 SignalReceiver ()=default
 Default constructor.
 SignalReceiver (const SignalReceiver &other)
 Copy constructor, does not copy any existing signal connections from other.
SignalReceiveroperator= (SignalReceiver rhs)
 Assignment operator, disconnects all existing connections, does not copy any existing signal connections from rhs.
virtual ~SignalReceiver ()
 Virtual destructor disconnects from all connected signals.

Additional Inherited Members

Public Attributes inherited from ImFusion::GlOverlay
Signal< int, int > m_sizeChangedSignal
 Signal emitted when the size hint has changed.
Signal< int, int > m_minSizeChangedSignal
 Signal emitted when the minimum size hint has changed.
Protected Member Functions inherited from ImFusion::SignalReceiver
void disconnectAll ()
 Disconnects all existing connections.
Protected Attributes inherited from ImFusion::GlOverlay
bool m_visible = true
 Overlay visibility.
int m_sizeHintWidth = 0
int m_sizeHintHeight = 0
int m_minSizeHintWidth = 0
int m_minSizeHintHeight = 0

Member Function Documentation

◆ render()

void ImFusion::GlPlotLegend::render ( const GL::Viewport & viewport)
overridevirtual

render the overlay with the given width and height

Implements ImFusion::GlOverlay.


The documentation for this class was generated from the following file:
  • ImFusion/GUI/GlPlotLegend.h
Search Tab / S to search, Esc to close