igor::iWidgetGraph Class Reference

#include <iWidgetGraph.h>

Inherits igor::iWidget.

Public Member Functions

 iWidgetGraph (const iWidgetPtr parent=nullptr)
 
virtual ~iWidgetGraph ()=default
 
void clearPoints ()
 
void setLineColor (uint64 id, const iaColor4f &color)
 
iaColor4f getLineColor (uint64 id)
 
void setPointColor (uint64 id, const iaColor4f &color)
 
iaColor4f getPointColor (uint64 id)
 
void setLineWidth (uint64 id, float32 lineWidth)
 
float32 getLineWidth (uint64 id)
 
void setPointSize (uint64 id, float32 pointSize)
 
float32 getPointSize (uint64 id)
 
void setPoints (uint64 id, std::vector< iaVector2f > points)
 
std::vector< iaVector2fgetPoints (uint64 id)
 
void setBoundings (const iaRectanglef &boundings)
 
iaRectanglef getBoundings ()
 
void setUseBoundings (bool useBoundings=true)
 
bool isUsingBoundings ()
 
void setExtrapolateData (bool extendData=true)
 
bool getExtrapolateData ()
 
void setViewGrid (bool viewGrid=true)
 
bool getViewGrid () const
 
void setGridResolution (uint32 x, uint32 y)
 
uint32 getGridXResolution () const
 
uint32 getGridYResolution () const
 
void setViewLabels (bool viewLabels=true)
 
bool getViewLabels () const
 
int32 getGraphCount () const
 
void setInteractive (bool interactive=true)
 
bool isInteractive ()
 
int32 getSelectedIndex () const
 
- Public Member Functions inherited from igor::iWidget
iWidgetType getWidgetType () const
 
iWidgetKind getWidgetKind () const
 
void setZValue (uint32 zvalue)
 
uint32 getZValue () const
 
void setBackground (const iaColor4f &color)
 
const iaColor4fgetBackground () const
 
void setForeground (const iaColor4f &color)
 
const iaColor4fgetForeground () const
 
bool isBlocked () const
 
bool hasKeyboardFocus () const
 
iWidgetState getState () const
 
void registerOnClickEvent (iClickDelegate clickDelegate)
 
void registerOnMouseOffClickEvent (iMouseOffClickDelegate clickDelegate)
 
void registerOnDoubleClickEvent (iDoubleClickDelegate doubleClickDelegate)
 
void registerOnMouseOverEvent (iMouseOverDelegate mouseOverDelegate)
 
void registerOnMouseOffEvent (iMouseOffDelegate mouseOffDelegate)
 
void registerOnChangeEvent (iChangeDelegate changeDelegate)
 
void registerOnFocusEvent (iFocusDelegate focusDelegate)
 
void registerOnWheelUpEvent (iWheelUpDelegate wheelUpDelegate)
 
void unregisterOnWheelUpEvent (iWheelUpDelegate wheelUpDelegate)
 
void registerOnWheelDownEvent (iWheelDownDelegate wheelDownDelegate)
 
void unregisterOnWheelDownEvent (iWheelDownDelegate wheelDownDelegate)
 
void unregisterOnClickEvent (iClickDelegate clickDelegate)
 
void unregisterOnMouseOffClickEvent (iMouseOffClickDelegate clickDelegate)
 
void unregisterOnDoubleClickEvent (iDoubleClickDelegate doubleClickDelegate)
 
void unregisterOnMouseOverEvent (iMouseOverDelegate mouseOverDelegate)
 
void unregisterOnMouseOffEvent (iMouseOffDelegate mouseOffDelegate)
 
void unregisterOnChangeEvent (iChangeDelegate changeDelegate)
 
void unregisterOnFocusEvent (iFocusDelegate focusDelegate)
 
void registerOnContextMenuEvent (iContextMenuDelegate contextMenuDelegate)
 
void unregisterOnContextMenuEvent (iContextMenuDelegate contextMenuDelegate)
 
void registerOnSelectionChangedEvent (iSelectionChangedDelegate delegate)
 
void unregisterOnSelectionChangedEvent (iSelectionChangedDelegate delegate)
 
iaVector2f getActualPos () const
 
int32 getActualPosX () const
 
int32 getActualPosY () const
 
int32 getActualWidth () const
 
int32 getActualHeight () const
 
iaRectanglef getActualRect () const
 
int32 getRelativePosX () const
 
int32 getRelativePosY () const
 
int32 getMinWidth () const
 
int32 getMinHeight () const
 
int32 getConfiguredMinWidth () const
 
int32 getConfiguredMinHeight () const
 
void setMinWidth (int32 width)
 
void setMinHeight (int32 height)
 
void setMinSize (int32 width, int32 height)
 
void setAcceptOutOfBoundsClicks (bool acceptOutOfBoundsClick=true)
 
bool getAcceptOutOfBoundsClicks () const
 
iHorizontalAlignment getHorizontalAlignment () const
 
iVerticalAlignment getVerticalAlignment () const
 
void setHorizontalAlignment (iHorizontalAlignment horizontalAlignment)
 
void setVerticalAlignment (iVerticalAlignment verticalAlignment)
 
bool isVisible () const
 
bool isEnabled () const
 
void setVisible (bool visible=true)
 
void setEnabled (bool enabled=true)
 
iWidgetID getID () const
 
iWidgetID getParentID () const
 
iWidgetPtr getParent () const
 
bool isMouseOver ()
 
void setAcceptDrag (bool acceptDrag)
 
bool isAcceptingDrag ()
 
void setAcceptDrop (bool acceptDrop)
 
bool isAcceptingDrop ()
 
bool hasParent () const
 
void setGrowingByContent (bool grow=true)
 
bool isGrowingByContent () const
 
iaString getInfo () const
 
void setTooltip (const iaString &text)
 
iaString getTooltip () const
 
const std::vector< iWidgetPtr > & getChildren () const
 
virtual void clear ()
 
void setIgnoreChildEventConsumption (bool value=true)
 
bool isIgnoringChildEventConsumption () const
 
iWidgetPtr getRoot ()
 
virtual void blockEvents ()
 
virtual void unblockEvents ()
 
void setOverlayEnabled (bool overlay)
 
bool isOverlayEnabled () const
 
virtual void draw ()
 
virtual void drawOverlay ()
 
virtual void addWidget (iWidgetPtr widget)
 
virtual void removeWidget (iWidgetPtr widget)
 
void setCursor (iMouseCursorType cursorType)
 
void setUserData (const std::any &userData)
 
std::any getUserData () const
 
void setSelectable (bool selectable)
 
bool isSelectable () const
 
void setMultiSelection (bool enabled)
 
bool isMultiSelectionEnabled () const
 
void select ()
 
void unselect ()
 
bool isSelected () const
 
void clearSelection ()
 
const std::vector< iWidgetPtrgetSelection () const
 
void setSelection (const std::vector< iWidgetPtr > &selection)
 

Additional Inherited Members

- Static Public Member Functions inherited from igor::iWidget
static iWidgetPtr getKeyboardFocusWidget ()
 
- Static Public Attributes inherited from igor::iWidget
static const iWidgetID INVALID_WIDGET_ID = 0
 
- Protected Member Functions inherited from igor::iWidget
void clearChildren ()
 
void updateMinSize (int32 width, int32 height)
 
void setParent (iWidgetPtr parent)
 
void setKeyboardFocus ()
 
void resetKeyboardFocus ()
 
void setClientArea (int32 left, int32 right, int32 top, int32 bottom)
 
const iaVector2fgetLastMousePos () const
 
 iWidget (iWidgetType type, iWidgetKind kind, const iWidgetPtr parent=nullptr)
 
virtual ~iWidget ()
 
virtual bool onEvent (iEvent &event)
 
virtual bool onMouseWheel (iEventMouseWheel &event)
 
virtual bool onMouseKeyDown (iEventMouseKeyDown &event)
 
virtual bool onMouseDoubleClick (iEventMouseKeyDoubleClick &event)
 
virtual bool onMouseKeyUp (iEventMouseKeyUp &event)
 
virtual void onMouseMove (iEventMouseMove &event)
 
virtual bool onASCII (iEventKeyASCII &event)
 
virtual bool onKeyDown (iEventKeyDown &event)
 
virtual bool onKeyUp (iEventKeyUp &event)
 
virtual void onLostKeyboardFocus ()
 
virtual void onGainedKeyboardFocus ()
 
virtual void calcMinSize ()
 
virtual void updateAlignment (int32 clientWidth, int32 clientHeight)
 
virtual void calcChildOffsets (std::vector< iaRectanglef > &offsets)
 
virtual void onDragEnter (iDrag &drag)
 
virtual void onDragMove (iDrag &drag, const iaVector2f &mousePos)
 
virtual void onDragLeave (iDrag &drag)
 
virtual void onDrop (const iDrag &drag)
 
virtual void onDrag ()
 
- Protected Attributes inherited from igor::iWidget
bool _selected = false
 
bool _isSelectable = false
 
bool _isMultiSelectionEnabled = false
 
std::vector< iWidgetPtr_children
 
int32 _configuredMinWidth = 0
 
int32 _configuredMinHeight = 0
 
iClickEvent _click
 
iMouseOffClickEvent _mouseOffClick
 
iContextMenuEvent _contextMenu
 
iDoubleClickEvent _doubleClick
 
iMouseOverEvent _mouseOver
 
iMouseOffEvent _mouseOff
 
iChangeEvent _change
 
iFocusEvent _focus
 
iWheelUpEvent _wheelUp
 
iWheelDownEvent _wheelDown
 
iSelectionChangedEvent _selectionChanged
 
iaString _tooltip
 
iaVector2f _tooltipPos
 
iaTime _tooltipTime = iaTime(0)
 
bool _initTooltip = false
 
uint32 _zValue = 0
 
bool _reactOnMouseWheel = true
 
bool _blockedEvents = false
 
bool _acceptOutOfBoundsClicks = false
 
bool _acceptDrop = false
 
bool _acceptDrag = false
 
bool _isMouseOver = false
 
bool _ignoreChildEventConsumption = false
 
iaVector2f _lastMousePos
 
iaVector2f _lastMousePressPos
 

Detailed Description

graph widget. to display graphs

Constructor & Destructor Documentation

◆ iWidgetGraph()

igor::iWidgetGraph::iWidgetGraph ( const iWidgetPtr  parent = nullptr)

ctor initializes member variables

Parameters
parentoptional parent

◆ ~iWidgetGraph()

virtual igor::iWidgetGraph::~iWidgetGraph ( )
virtualdefault

does nothing

Member Function Documentation

◆ clearPoints()

void igor::iWidgetGraph::clearPoints ( )

clears all point data

◆ getBoundings()

iaRectanglef igor::iWidgetGraph::getBoundings ( )
Returns
user specified boudings / range of graph

◆ getExtrapolateData()

bool igor::iWidgetGraph::getExtrapolateData ( )
Returns
true if data will be extended

◆ getGraphCount()

int32 igor::iWidgetGraph::getGraphCount ( ) const
Returns
count of graphs

◆ getGridXResolution()

uint32 igor::iWidgetGraph::getGridXResolution ( ) const
Returns
amount of vertical grid lines

◆ getGridYResolution()

uint32 igor::iWidgetGraph::getGridYResolution ( ) const
Returns
amount of horizontal grid lines

◆ getLineColor()

iaColor4f igor::iWidgetGraph::getLineColor ( uint64  id)
Returns
line color of specified graph
Parameters
namename of graph

◆ getLineWidth()

float32 igor::iWidgetGraph::getLineWidth ( uint64  id)
Returns
line width of specified graph
Parameters
idgraph id

◆ getPointColor()

iaColor4f igor::iWidgetGraph::getPointColor ( uint64  id)
Returns
points color of specified graph
Parameters
namename of graph

◆ getPoints()

std::vector< iaVector2f > igor::iWidgetGraph::getPoints ( uint64  id)
Returns
points of specified graph
Parameters
idthe graphs id

◆ getPointSize()

float32 igor::iWidgetGraph::getPointSize ( uint64  id)
Returns
point size of specified graph
Parameters
idgraph id

◆ getSelectedIndex()

int32 igor::iWidgetGraph::getSelectedIndex ( ) const
Returns
selected value index

◆ getViewGrid()

bool igor::iWidgetGraph::getViewGrid ( ) const
Returns
true if the grid is visible

◆ getViewLabels()

bool igor::iWidgetGraph::getViewLabels ( ) const
Returns
if labels are visible

◆ isInteractive()

bool igor::iWidgetGraph::isInteractive ( )
Returns
true if graph is interactive

◆ isUsingBoundings()

bool igor::iWidgetGraph::isUsingBoundings ( )
Returns
if true user specified boundings are in use

◆ setBoundings()

void igor::iWidgetGraph::setBoundings ( const iaRectanglef boundings)

set user specified boudings / range of graph coordinate system

Parameters
boundingsthe boundings

◆ setExtrapolateData()

void igor::iWidgetGraph::setExtrapolateData ( bool  extendData = true)

set data extend flag

if true and a graph does not reach the bounding it will be extended up to the boundings

Parameters
extendDataif true wrap data will be activated

◆ setGridResolution()

void igor::iWidgetGraph::setGridResolution ( uint32  x,
uint32  y 
)

configures the resolution of the grid

Parameters
xamount of vertical grid lines (2 minimum)
yamount of horizontal grid lines (2 minimum)

◆ setInteractive()

void igor::iWidgetGraph::setInteractive ( bool  interactive = true)

sets the interactive feature

Parameters
interactiveif true graph will be interactive

◆ setLineColor()

void igor::iWidgetGraph::setLineColor ( uint64  id,
const iaColor4f color 
)

sets line color for specified graph

Parameters
ididentifier of graph
colorcolor of graph

◆ setLineWidth()

void igor::iWidgetGraph::setLineWidth ( uint64  id,
float32  lineWidth 
)

sets line width of specified graph

Parameters
idgraph id
lineWidththe new line width

◆ setPointColor()

void igor::iWidgetGraph::setPointColor ( uint64  id,
const iaColor4f color 
)

sets points color for specified graph

Parameters
ididentifier of graph
colorcolor of graph

◆ setPoints()

void igor::iWidgetGraph::setPoints ( uint64  id,
std::vector< iaVector2f points 
)

sets points of graph

Parameters
idthe graphs id
pointslist of points for the graph

◆ setPointSize()

void igor::iWidgetGraph::setPointSize ( uint64  id,
float32  pointSize 
)

sets points size for specified graph

Parameters
idid of graph
pointSizethe point size to set

◆ setUseBoundings()

void igor::iWidgetGraph::setUseBoundings ( bool  useBoundings = true)

activated user defined boundings / range of graph

Parameters
useBoundingsif true user specified boundings will be used

◆ setViewGrid()

void igor::iWidgetGraph::setViewGrid ( bool  viewGrid = true)

sets the grid visibility

Parameters
viewGridif true the grid is visible

◆ setViewLabels()

void igor::iWidgetGraph::setViewLabels ( bool  viewLabels = true)

sets if labels are visible

Parameters
viewLabelsif true labels are visible

The documentation for this class was generated from the following files: