CustomUI Plugin API reference

API functions for creating custom user interfaces.

simExtCustomUI_addCurve

Description Adds a curve to a plot widget.
Lua synopsis simExtCustomUI_addCurve(int handle, int id, int type, string name, table color, int style, curve_options options)
Lua parameters
handle (int): ui handle
id (int): widget id
type (int): type of the curve. see curve_type.
name (string): name of the curve
color (table of int): color of the curve, as RGB values in the 0...255 range
style (int): style of the curve. see curve_style.
options (curve_options): data structure holding extra options. see curve_options.
Lua return values -
See also curve_type curve_style curve_options simExtCustomUI_addCurveTimePoints simExtCustomUI_addCurveXYPoints simExtCustomUI_clearCurve simExtCustomUI_getCurveData simExtCustomUI_growPlotRanges simExtCustomUI_growPlotXRange simExtCustomUI_growPlotYRange simExtCustomUI_removeCurve simExtCustomUI_replot simExtCustomUI_rescaleAxes simExtCustomUI_rescaleAxesAll simExtCustomUI_setLegendVisibility simExtCustomUI_setMouseOptions simExtCustomUI_setPlotLabels simExtCustomUI_setPlotRanges simExtCustomUI_setPlotXLabel simExtCustomUI_setPlotXRange simExtCustomUI_setPlotYLabel simExtCustomUI_setPlotYRange simExtCustomUI_getWidgetVisibility simExtCustomUI_setEnabled simExtCustomUI_setWidgetVisibility

simExtCustomUI_addCurveTimePoints

Description Adds time points to the specified curve of the plot widget.
Lua synopsis simExtCustomUI_addCurveTimePoints(int handle, int id, string name, table x, table y)
Lua parameters
handle (int): ui handle
id (int): widget id
name (string): name of the curve
x (table of double): x values
y (table of double): y values
Lua return values -
See also simExtCustomUI_addCurve simExtCustomUI_addCurveXYPoints simExtCustomUI_clearCurve simExtCustomUI_getCurveData simExtCustomUI_growPlotRanges simExtCustomUI_growPlotXRange simExtCustomUI_growPlotYRange simExtCustomUI_removeCurve simExtCustomUI_replot simExtCustomUI_rescaleAxes simExtCustomUI_rescaleAxesAll simExtCustomUI_setLegendVisibility simExtCustomUI_setMouseOptions simExtCustomUI_setPlotLabels simExtCustomUI_setPlotRanges simExtCustomUI_setPlotXLabel simExtCustomUI_setPlotXRange simExtCustomUI_setPlotYLabel simExtCustomUI_setPlotYRange simExtCustomUI_getWidgetVisibility simExtCustomUI_setEnabled simExtCustomUI_setWidgetVisibility

simExtCustomUI_addCurveXYPoints

Description Adds points to the specified curve of the plot widget.
Lua synopsis simExtCustomUI_addCurveXYPoints(int handle, int id, string name, table t, table x, table y)
Lua parameters
handle (int): ui handle
id (int): widget id
name (string): name of the curve
t (table of double): t values (i.e. the curve parameter, used also to determine how points are connected, according to natural ordering of t)
x (table of double): x values
y (table of double): y values
Lua return values -
See also simExtCustomUI_addCurve simExtCustomUI_addCurveTimePoints simExtCustomUI_clearCurve simExtCustomUI_getCurveData simExtCustomUI_growPlotRanges simExtCustomUI_growPlotXRange simExtCustomUI_growPlotYRange simExtCustomUI_removeCurve simExtCustomUI_replot simExtCustomUI_rescaleAxes simExtCustomUI_rescaleAxesAll simExtCustomUI_setLegendVisibility simExtCustomUI_setMouseOptions simExtCustomUI_setPlotLabels simExtCustomUI_setPlotRanges simExtCustomUI_setPlotXLabel simExtCustomUI_setPlotXRange simExtCustomUI_setPlotYLabel simExtCustomUI_setPlotYRange simExtCustomUI_getWidgetVisibility simExtCustomUI_setEnabled simExtCustomUI_setWidgetVisibility

simExtCustomUI_clearCurve

Description Clear points of the specified curve of the plot widget.
Lua synopsis simExtCustomUI_clearCurve(int handle, int id, string name)
Lua parameters
handle (int): ui handle
id (int): widget id
name (string): name of the curve
Lua return values -
See also simExtCustomUI_addCurve simExtCustomUI_addCurveTimePoints simExtCustomUI_addCurveXYPoints simExtCustomUI_getCurveData simExtCustomUI_growPlotRanges simExtCustomUI_growPlotXRange simExtCustomUI_growPlotYRange simExtCustomUI_removeCurve simExtCustomUI_replot simExtCustomUI_rescaleAxes simExtCustomUI_rescaleAxesAll simExtCustomUI_setLegendVisibility simExtCustomUI_setMouseOptions simExtCustomUI_setPlotLabels simExtCustomUI_setPlotRanges simExtCustomUI_setPlotXLabel simExtCustomUI_setPlotXRange simExtCustomUI_setPlotYLabel simExtCustomUI_setPlotYRange simExtCustomUI_getWidgetVisibility simExtCustomUI_setEnabled simExtCustomUI_setWidgetVisibility

simExtCustomUI_create

Description Create a window.
Lua synopsis int uiHandle=simExtCustomUI_create(string xml)
Lua parameters
xml (string): xml ui definition
Lua return values
uiHandle (int): a handle to the created UI
See also simExtCustomUI_destroy simExtCustomUI_getPosition simExtCustomUI_getSize simExtCustomUI_getTitle simExtCustomUI_hide simExtCustomUI_isVisible simExtCustomUI_setPosition simExtCustomUI_setSize simExtCustomUI_setTitle simExtCustomUI_show

simExtCustomUI_destroy

Description Destroy a window.
Lua synopsis simExtCustomUI_destroy(int handle)
Lua parameters
handle (int): ui handle
Lua return values -
See also simExtCustomUI_create simExtCustomUI_getPosition simExtCustomUI_getSize simExtCustomUI_getTitle simExtCustomUI_hide simExtCustomUI_isVisible simExtCustomUI_setPosition simExtCustomUI_setSize simExtCustomUI_setTitle simExtCustomUI_show

simExtCustomUI_getCheckboxValue

Description Get the value of a checkbox widget.
Lua synopsis int value=simExtCustomUI_getCheckboxValue(int handle, int id)
Lua parameters
handle (int): ui handle
id (int): widget id
Lua return values
value (int): value
See also simExtCustomUI_setCheckboxValue simExtCustomUI_getWidgetVisibility simExtCustomUI_setEnabled simExtCustomUI_setWidgetVisibility

simExtCustomUI_getComboboxItemCount

Description Get the number of items in the specified combobox widget.
Lua synopsis int count=simExtCustomUI_getComboboxItemCount(int handle, int id)
Lua parameters
handle (int): ui handle
id (int): widget id
Lua return values
count (int): Item count.
See also simExtCustomUI_getComboboxItemText simExtCustomUI_getComboboxItems simExtCustomUI_insertComboboxItem simExtCustomUI_removeComboboxItem simExtCustomUI_setComboboxItems simExtCustomUI_setComboboxSelectedIndex simExtCustomUI_getWidgetVisibility simExtCustomUI_setEnabled simExtCustomUI_setWidgetVisibility

simExtCustomUI_getComboboxItemText

Description Get the text of an item in a combobox widget.
Lua synopsis string text=simExtCustomUI_getComboboxItemText(int handle, int id, int index)
Lua parameters
handle (int): ui handle
id (int): widget id
index (int): Item index.
Lua return values
text (string): Item text.
See also simExtCustomUI_getComboboxItemCount simExtCustomUI_getComboboxItems simExtCustomUI_insertComboboxItem simExtCustomUI_removeComboboxItem simExtCustomUI_setComboboxItems simExtCustomUI_setComboboxSelectedIndex simExtCustomUI_getWidgetVisibility simExtCustomUI_setEnabled simExtCustomUI_setWidgetVisibility

simExtCustomUI_getComboboxItems

Description Get the content of a combobox.
Lua synopsis table items=simExtCustomUI_getComboboxItems(int handle, int id)
Lua parameters
handle (int): ui handle
id (int): widget id
Lua return values
items (table of string): Array of items (strings).
See also simExtCustomUI_getComboboxItemCount simExtCustomUI_getComboboxItemText simExtCustomUI_insertComboboxItem simExtCustomUI_removeComboboxItem simExtCustomUI_setComboboxItems simExtCustomUI_setComboboxSelectedIndex simExtCustomUI_getWidgetVisibility simExtCustomUI_setEnabled simExtCustomUI_setWidgetVisibility

simExtCustomUI_getCurrentEditWidget

Description Get the edit widget with focus and selected text.
Lua synopsis int id=simExtCustomUI_getCurrentEditWidget(int handle)
Lua parameters
handle (int): ui handle
Lua return values
id (int): widget id of an edit widget, or -1 if no edit widget was focused and had selected text.
See also simExtCustomUI_getEditValue simExtCustomUI_setCurrentEditWidget simExtCustomUI_setEditValue simExtCustomUI_getWidgetVisibility simExtCustomUI_setEnabled simExtCustomUI_setWidgetVisibility

simExtCustomUI_getCurrentTab

Description Get the current tab index of a tabs widget.
Lua synopsis int index=simExtCustomUI_getCurrentTab(int handle, int id)
Lua parameters
handle (int): ui handle
id (int): widget id
Lua return values
index (int): index of the tab (zero-based)
See also simExtCustomUI_setCurrentTab simExtCustomUI_getWidgetVisibility simExtCustomUI_setEnabled simExtCustomUI_setWidgetVisibility

simExtCustomUI_getCurveData

Description Get the data contained in the specified curve.
Lua synopsis table t, table x, table y=simExtCustomUI_getCurveData(int handle, int id, string name)
Lua parameters
handle (int): ui handle
id (int): widget id
name (string): name of the curve
Lua return values
t (table of double): t values (if applicable)
x (table of double): x values
y (table of double): y values
See also simExtCustomUI_addCurve simExtCustomUI_addCurveTimePoints simExtCustomUI_addCurveXYPoints simExtCustomUI_clearCurve simExtCustomUI_growPlotRanges simExtCustomUI_growPlotXRange simExtCustomUI_growPlotYRange simExtCustomUI_removeCurve simExtCustomUI_replot simExtCustomUI_rescaleAxes simExtCustomUI_rescaleAxesAll simExtCustomUI_setLegendVisibility simExtCustomUI_setMouseOptions simExtCustomUI_setPlotLabels simExtCustomUI_setPlotRanges simExtCustomUI_setPlotXLabel simExtCustomUI_setPlotXRange simExtCustomUI_setPlotYLabel simExtCustomUI_setPlotYRange simExtCustomUI_getWidgetVisibility simExtCustomUI_setEnabled simExtCustomUI_setWidgetVisibility

simExtCustomUI_getEditValue

Description Get the value of a edit widget.
Lua synopsis string value=simExtCustomUI_getEditValue(int handle, int id)
Lua parameters
handle (int): ui handle
id (int): widget id
Lua return values
value (string): value
See also simExtCustomUI_getCurrentEditWidget simExtCustomUI_setCurrentEditWidget simExtCustomUI_setEditValue simExtCustomUI_getWidgetVisibility simExtCustomUI_setEnabled simExtCustomUI_setWidgetVisibility

simExtCustomUI_getLabelText

Description Get the text of a label widget.
Lua synopsis string text=simExtCustomUI_getLabelText(int handle, int id)
Lua parameters
handle (int): ui handle
id (int): widget id
Lua return values
text (string): text
See also simExtCustomUI_setLabelText simExtCustomUI_getWidgetVisibility simExtCustomUI_setEnabled simExtCustomUI_setWidgetVisibility

simExtCustomUI_getPosition

Description Get the position of a UI window.
Lua synopsis int x, int y=simExtCustomUI_getPosition(int handle)
Lua parameters
handle (int): ui handle
Lua return values
x (int): X position
y (int): Y position
See also simExtCustomUI_create simExtCustomUI_destroy simExtCustomUI_getSize simExtCustomUI_getTitle simExtCustomUI_hide simExtCustomUI_isVisible simExtCustomUI_setPosition simExtCustomUI_setSize simExtCustomUI_setTitle simExtCustomUI_show

simExtCustomUI_getRadiobuttonValue

Description Get the value of a radiobutton widget.
Lua synopsis int value=simExtCustomUI_getRadiobuttonValue(int handle, int id)
Lua parameters
handle (int): ui handle
id (int): widget id
Lua return values
value (int): value
See also simExtCustomUI_setRadiobuttonValue simExtCustomUI_getWidgetVisibility simExtCustomUI_setEnabled simExtCustomUI_setWidgetVisibility

simExtCustomUI_getSize

Description Get the size of a UI window.
Lua synopsis int w, int h=simExtCustomUI_getSize(int handle)
Lua parameters
handle (int): ui handle
Lua return values
w (int): width
h (int): height
See also simExtCustomUI_create simExtCustomUI_destroy simExtCustomUI_getPosition simExtCustomUI_getTitle simExtCustomUI_hide simExtCustomUI_isVisible simExtCustomUI_setPosition simExtCustomUI_setSize simExtCustomUI_setTitle simExtCustomUI_show

simExtCustomUI_getSliderValue

Description Get the value of a slider widget.
Lua synopsis int value=simExtCustomUI_getSliderValue(int handle, int id)
Lua parameters
handle (int): ui handle
id (int): widget id
Lua return values
value (int): value
See also simExtCustomUI_setSliderValue simExtCustomUI_getWidgetVisibility simExtCustomUI_setEnabled simExtCustomUI_setWidgetVisibility

simExtCustomUI_getSpinboxValue

Description Get the value of a spinbox widget.
Lua synopsis float value=simExtCustomUI_getSpinboxValue(int handle, int id)
Lua parameters
handle (int): ui handle
id (int): widget id
Lua return values
value (float): value
See also simExtCustomUI_setSpinboxValue simExtCustomUI_getWidgetVisibility simExtCustomUI_setEnabled simExtCustomUI_setWidgetVisibility

simExtCustomUI_getTitle

Description Get the title of a UI window.
Lua synopsis string title=simExtCustomUI_getTitle(int handle)
Lua parameters
handle (int): ui handle
Lua return values
title (string): X position
See also simExtCustomUI_create simExtCustomUI_destroy simExtCustomUI_getPosition simExtCustomUI_getSize simExtCustomUI_hide simExtCustomUI_isVisible simExtCustomUI_setPosition simExtCustomUI_setSize simExtCustomUI_setTitle simExtCustomUI_show

simExtCustomUI_getWidgetVisibility

Description Get the visibility status of a widget.
Lua synopsis bool visibility=simExtCustomUI_getWidgetVisibility(int handle, int id)
Lua parameters
handle (int): ui handle
id (int): widget id
Lua return values
visibility (bool): true if the window is visible, false otherwise
See also simExtCustomUI_setEnabled simExtCustomUI_setWidgetVisibility

simExtCustomUI_growPlotRanges

Description Increase the ranges of the plot widget by a fixed amount.
Lua synopsis simExtCustomUI_growPlotRanges(int handle, int id, double xmin, double xmax, double ymin, double ymax)
Lua parameters
handle (int): ui handle
id (int): widget id
xmin (double): minimum x range
xmax (double): maximum x range
ymin (double): minimum y range
ymax (double): maximum y range
Lua return values -
See also simExtCustomUI_addCurve simExtCustomUI_addCurveTimePoints simExtCustomUI_addCurveXYPoints simExtCustomUI_clearCurve simExtCustomUI_getCurveData simExtCustomUI_growPlotXRange simExtCustomUI_growPlotYRange simExtCustomUI_removeCurve simExtCustomUI_replot simExtCustomUI_rescaleAxes simExtCustomUI_rescaleAxesAll simExtCustomUI_setLegendVisibility simExtCustomUI_setMouseOptions simExtCustomUI_setPlotLabels simExtCustomUI_setPlotRanges simExtCustomUI_setPlotXLabel simExtCustomUI_setPlotXRange simExtCustomUI_setPlotYLabel simExtCustomUI_setPlotYRange simExtCustomUI_getWidgetVisibility simExtCustomUI_setEnabled simExtCustomUI_setWidgetVisibility

simExtCustomUI_growPlotXRange

Description Increase the X range of the plot widget.
Lua synopsis simExtCustomUI_growPlotXRange(int handle, int id, double xmin, double xmax)
Lua parameters
handle (int): ui handle
id (int): widget id
xmin (double): minimum x range
xmax (double): maximum x range
Lua return values -
See also simExtCustomUI_addCurve simExtCustomUI_addCurveTimePoints simExtCustomUI_addCurveXYPoints simExtCustomUI_clearCurve simExtCustomUI_getCurveData simExtCustomUI_growPlotRanges simExtCustomUI_growPlotYRange simExtCustomUI_removeCurve simExtCustomUI_replot simExtCustomUI_rescaleAxes simExtCustomUI_rescaleAxesAll simExtCustomUI_setLegendVisibility simExtCustomUI_setMouseOptions simExtCustomUI_setPlotLabels simExtCustomUI_setPlotRanges simExtCustomUI_setPlotXLabel simExtCustomUI_setPlotXRange simExtCustomUI_setPlotYLabel simExtCustomUI_setPlotYRange simExtCustomUI_getWidgetVisibility simExtCustomUI_setEnabled simExtCustomUI_setWidgetVisibility

simExtCustomUI_growPlotYRange

Description Increase the Y range of the plot widget.
Lua synopsis simExtCustomUI_growPlotYRange(int handle, int id, double ymin, double ymax)
Lua parameters
handle (int): ui handle
id (int): widget id
ymin (double): minimum y range
ymax (double): maximum y range
Lua return values -
See also simExtCustomUI_addCurve simExtCustomUI_addCurveTimePoints simExtCustomUI_addCurveXYPoints simExtCustomUI_clearCurve simExtCustomUI_getCurveData simExtCustomUI_growPlotRanges simExtCustomUI_growPlotXRange simExtCustomUI_removeCurve simExtCustomUI_replot simExtCustomUI_rescaleAxes simExtCustomUI_rescaleAxesAll simExtCustomUI_setLegendVisibility simExtCustomUI_setMouseOptions simExtCustomUI_setPlotLabels simExtCustomUI_setPlotRanges simExtCustomUI_setPlotXLabel simExtCustomUI_setPlotXRange simExtCustomUI_setPlotYLabel simExtCustomUI_setPlotYRange simExtCustomUI_getWidgetVisibility simExtCustomUI_setEnabled simExtCustomUI_setWidgetVisibility

simExtCustomUI_hide

Description Hide the UI window.
Lua synopsis simExtCustomUI_hide(int handle)
Lua parameters
handle (int): ui handle
Lua return values -
See also simExtCustomUI_create simExtCustomUI_destroy simExtCustomUI_getPosition simExtCustomUI_getSize simExtCustomUI_getTitle simExtCustomUI_isVisible simExtCustomUI_setPosition simExtCustomUI_setSize simExtCustomUI_setTitle simExtCustomUI_show

simExtCustomUI_insertComboboxItem

Description Insert an item in a combobox widget.
Lua synopsis simExtCustomUI_insertComboboxItem(int handle, int id, int index, string text, bool suppressEvents=true)
Lua parameters
handle (int): ui handle
id (int): widget id
index (int): If the index is equal to or higher than the total number of items, the new item is appended to the list of existing items. If the index is zero or negative, the new item is prepended to the list of existing items.
text (string): Item text.
suppressEvents (bool, default: true): if true, no event will be generated from this call
Lua return values -
See also simExtCustomUI_getComboboxItemCount simExtCustomUI_getComboboxItemText simExtCustomUI_getComboboxItems simExtCustomUI_removeComboboxItem simExtCustomUI_setComboboxItems simExtCustomUI_setComboboxSelectedIndex simExtCustomUI_getWidgetVisibility simExtCustomUI_setEnabled simExtCustomUI_setWidgetVisibility

simExtCustomUI_isVisible

Description Check if the window is visible.
Lua synopsis bool visibility=simExtCustomUI_isVisible(int handle)
Lua parameters
handle (int): ui handle
Lua return values
visibility (bool): true if the window is visible, false otherwise
See also simExtCustomUI_create simExtCustomUI_destroy simExtCustomUI_getPosition simExtCustomUI_getSize simExtCustomUI_getTitle simExtCustomUI_hide simExtCustomUI_setPosition simExtCustomUI_setSize simExtCustomUI_setTitle simExtCustomUI_show

simExtCustomUI_removeComboboxItem

Description Remove an item from a combobox widget.
Lua synopsis simExtCustomUI_removeComboboxItem(int handle, int id, int index, bool suppressEvents=true)
Lua parameters
handle (int): ui handle
id (int): widget id
index (int): Item index.
suppressEvents (bool, default: true): if true, no event will be generated from this call
Lua return values -
See also simExtCustomUI_getComboboxItemCount simExtCustomUI_getComboboxItemText simExtCustomUI_getComboboxItems simExtCustomUI_insertComboboxItem simExtCustomUI_setComboboxItems simExtCustomUI_setComboboxSelectedIndex simExtCustomUI_getWidgetVisibility simExtCustomUI_setEnabled simExtCustomUI_setWidgetVisibility

simExtCustomUI_removeCurve

Description Remove the specified curve from the plot widget.
Lua synopsis simExtCustomUI_removeCurve(int handle, int id, string name)
Lua parameters
handle (int): ui handle
id (int): widget id
name (string): name of the curve
Lua return values -
See also simExtCustomUI_addCurve simExtCustomUI_addCurveTimePoints simExtCustomUI_addCurveXYPoints simExtCustomUI_clearCurve simExtCustomUI_getCurveData simExtCustomUI_growPlotRanges simExtCustomUI_growPlotXRange simExtCustomUI_growPlotYRange simExtCustomUI_replot simExtCustomUI_rescaleAxes simExtCustomUI_rescaleAxesAll simExtCustomUI_setLegendVisibility simExtCustomUI_setMouseOptions simExtCustomUI_setPlotLabels simExtCustomUI_setPlotRanges simExtCustomUI_setPlotXLabel simExtCustomUI_setPlotXRange simExtCustomUI_setPlotYLabel simExtCustomUI_setPlotYRange simExtCustomUI_getWidgetVisibility simExtCustomUI_setEnabled simExtCustomUI_setWidgetVisibility

simExtCustomUI_replot

Description Refresh all the plots of a plot widget.
Lua synopsis simExtCustomUI_replot(int handle, int id)
Lua parameters
handle (int): ui handle
id (int): widget id
Lua return values -
See also simExtCustomUI_addCurve simExtCustomUI_addCurveTimePoints simExtCustomUI_addCurveXYPoints simExtCustomUI_clearCurve simExtCustomUI_getCurveData simExtCustomUI_growPlotRanges simExtCustomUI_growPlotXRange simExtCustomUI_growPlotYRange simExtCustomUI_removeCurve simExtCustomUI_rescaleAxes simExtCustomUI_rescaleAxesAll simExtCustomUI_setLegendVisibility simExtCustomUI_setMouseOptions simExtCustomUI_setPlotLabels simExtCustomUI_setPlotRanges simExtCustomUI_setPlotXLabel simExtCustomUI_setPlotXRange simExtCustomUI_setPlotYLabel simExtCustomUI_setPlotYRange simExtCustomUI_getWidgetVisibility simExtCustomUI_setEnabled simExtCustomUI_setWidgetVisibility

simExtCustomUI_rescaleAxes

Description Rescales the axes such that the specified curve in the plot is fully visible.
Lua synopsis simExtCustomUI_rescaleAxes(int handle, int id, string name, bool onlyEnlargeX=false, bool onlyEnlargeY=false)
Lua parameters
handle (int): ui handle
id (int): widget id
name (string): name of the curve
onlyEnlargeX (bool, default: false): makes sure the x ranges are only expanded, never reduced
onlyEnlargeY (bool, default: false): makes sure the x ranges are only expanded, never reduced
Lua return values -
See also simExtCustomUI_addCurve simExtCustomUI_addCurveTimePoints simExtCustomUI_addCurveXYPoints simExtCustomUI_clearCurve simExtCustomUI_getCurveData simExtCustomUI_growPlotRanges simExtCustomUI_growPlotXRange simExtCustomUI_growPlotYRange simExtCustomUI_removeCurve simExtCustomUI_replot simExtCustomUI_rescaleAxesAll simExtCustomUI_setLegendVisibility simExtCustomUI_setMouseOptions simExtCustomUI_setPlotLabels simExtCustomUI_setPlotRanges simExtCustomUI_setPlotXLabel simExtCustomUI_setPlotXRange simExtCustomUI_setPlotYLabel simExtCustomUI_setPlotYRange simExtCustomUI_getWidgetVisibility simExtCustomUI_setEnabled simExtCustomUI_setWidgetVisibility

simExtCustomUI_rescaleAxesAll

Description Rescales the axes such that all curves in the plot are fully visible.
Lua synopsis simExtCustomUI_rescaleAxesAll(int handle, int id, bool onlyEnlargeX=false, bool onlyEnlargeY=false)
Lua parameters
handle (int): ui handle
id (int): widget id
onlyEnlargeX (bool, default: false): makes sure the x ranges are only expanded, never reduced
onlyEnlargeY (bool, default: false): makes sure the x ranges are only expanded, never reduced
Lua return values -
See also simExtCustomUI_addCurve simExtCustomUI_addCurveTimePoints simExtCustomUI_addCurveXYPoints simExtCustomUI_clearCurve simExtCustomUI_getCurveData simExtCustomUI_growPlotRanges simExtCustomUI_growPlotXRange simExtCustomUI_growPlotYRange simExtCustomUI_removeCurve simExtCustomUI_replot simExtCustomUI_rescaleAxes simExtCustomUI_setLegendVisibility simExtCustomUI_setMouseOptions simExtCustomUI_setPlotLabels simExtCustomUI_setPlotRanges simExtCustomUI_setPlotXLabel simExtCustomUI_setPlotXRange simExtCustomUI_setPlotYLabel simExtCustomUI_setPlotYRange simExtCustomUI_getWidgetVisibility simExtCustomUI_setEnabled simExtCustomUI_setWidgetVisibility

simExtCustomUI_setCheckboxValue

Description Set the value of a checkbox widget.
Lua synopsis simExtCustomUI_setCheckboxValue(int handle, int id, int value, bool suppressEvents=true)
Lua parameters
handle (int): ui handle
id (int): widget id
value (int): value
suppressEvents (bool, default: true): if true, no event will be generated from this call
Lua return values -
See also simExtCustomUI_getCheckboxValue simExtCustomUI_getWidgetVisibility simExtCustomUI_setEnabled simExtCustomUI_setWidgetVisibility

simExtCustomUI_setComboboxItems

Description Populate a combobox widget with the specified items, and set the selected item to the specified index.
Lua synopsis simExtCustomUI_setComboboxItems(int handle, int id, table items, int index, bool suppressEvents=true)
Lua parameters
handle (int): ui handle
id (int): widget id
items (table of string): Array of items (strings).
index (int): Index of selected item after inserting all the items.
suppressEvents (bool, default: true): if true, no event will be generated from this call
Lua return values -
See also simExtCustomUI_getComboboxItemCount simExtCustomUI_getComboboxItemText simExtCustomUI_getComboboxItems simExtCustomUI_insertComboboxItem simExtCustomUI_removeComboboxItem simExtCustomUI_setComboboxSelectedIndex simExtCustomUI_getWidgetVisibility simExtCustomUI_setEnabled simExtCustomUI_setWidgetVisibility

simExtCustomUI_setComboboxSelectedIndex

Description Change the selected item index in a combobox widget.
Lua synopsis simExtCustomUI_setComboboxSelectedIndex(int handle, int id, int index, bool suppressEvents=true)
Lua parameters
handle (int): ui handle
id (int): widget id
index (int): Index of selected item after inserting all the items.
suppressEvents (bool, default: true): if true, no event will be generated from this call
Lua return values -
See also simExtCustomUI_getComboboxItemCount simExtCustomUI_getComboboxItemText simExtCustomUI_getComboboxItems simExtCustomUI_insertComboboxItem simExtCustomUI_removeComboboxItem simExtCustomUI_setComboboxItems simExtCustomUI_getWidgetVisibility simExtCustomUI_setEnabled simExtCustomUI_setWidgetVisibility

simExtCustomUI_setCurrentEditWidget

Description Set the edit widget focus and selected text.
Lua synopsis simExtCustomUI_setCurrentEditWidget(int handle, int id)
Lua parameters
handle (int): ui handle
id (int): widget id. this value can be -1, in which case the function will do nothing.
Lua return values -
See also simExtCustomUI_getCurrentEditWidget simExtCustomUI_getEditValue simExtCustomUI_setEditValue simExtCustomUI_getWidgetVisibility simExtCustomUI_setEnabled simExtCustomUI_setWidgetVisibility

simExtCustomUI_setCurrentTab

Description Set the current tab index in a tabs widget.
Lua synopsis simExtCustomUI_setCurrentTab(int handle, int id, int index, bool suppressEvents=true)
Lua parameters
handle (int): ui handle
id (int): widget id
index (int): index of the tab (zero-based)
suppressEvents (bool, default: true): if true, no event will be generated from this call
Lua return values -
See also simExtCustomUI_getCurrentTab simExtCustomUI_getWidgetVisibility simExtCustomUI_setEnabled simExtCustomUI_setWidgetVisibility

simExtCustomUI_setEditValue

Description Set the value of a edit widget.
Lua synopsis simExtCustomUI_setEditValue(int handle, int id, string value, bool suppressEvents=true)
Lua parameters
handle (int): ui handle
id (int): widget id
value (string): value
suppressEvents (bool, default: true): if true, no event will be generated from this call
Lua return values -
See also simExtCustomUI_getCurrentEditWidget simExtCustomUI_getEditValue simExtCustomUI_setCurrentEditWidget simExtCustomUI_getWidgetVisibility simExtCustomUI_setEnabled simExtCustomUI_setWidgetVisibility

simExtCustomUI_setEnabled

Description Enable or disable a widget.
Lua synopsis simExtCustomUI_setEnabled(int handle, int id, bool enabled, bool suppressEvents=true)
Lua parameters
handle (int): ui handle
id (int): widget id
enabled (bool): enabled
suppressEvents (bool, default: true): if true, no event will be generated from this call
Lua return values -
See also simExtCustomUI_getWidgetVisibility simExtCustomUI_setWidgetVisibility

simExtCustomUI_setImageData

Description Set image content using specified bitmap (RGB888) data.
Lua synopsis simExtCustomUI_setImageData(int handle, int id, string data, int width, int height)
Lua parameters
handle (int): ui handle
id (int): id of a image widget
data (string): image byte data
width (int): width of the image
height (int): height of the image
Lua return values -
See also simExtCustomUI_getWidgetVisibility simExtCustomUI_setEnabled simExtCustomUI_setWidgetVisibility

simExtCustomUI_setLabelText

Description Set the text of a label widget.
Lua synopsis simExtCustomUI_setLabelText(int handle, int id, string text, bool suppressEvents=true)
Lua parameters
handle (int): ui handle
id (int): widget id
text (string): text
suppressEvents (bool, default: true): if true, no event will be generated from this call
Lua return values -
See also simExtCustomUI_getLabelText simExtCustomUI_getWidgetVisibility simExtCustomUI_setEnabled simExtCustomUI_setWidgetVisibility

simExtCustomUI_setLegendVisibility

Description Set visibility of the plot legend (default is hidden).
Lua synopsis simExtCustomUI_setLegendVisibility(int handle, int id, bool visible)
Lua parameters
handle (int): ui handle
id (int): widget id
visible (bool): if true, the plot legend will be visible
Lua return values -
See also simExtCustomUI_addCurve simExtCustomUI_addCurveTimePoints simExtCustomUI_addCurveXYPoints simExtCustomUI_clearCurve simExtCustomUI_getCurveData simExtCustomUI_growPlotRanges simExtCustomUI_growPlotXRange simExtCustomUI_growPlotYRange simExtCustomUI_removeCurve simExtCustomUI_replot simExtCustomUI_rescaleAxes simExtCustomUI_rescaleAxesAll simExtCustomUI_setMouseOptions simExtCustomUI_setPlotLabels simExtCustomUI_setPlotRanges simExtCustomUI_setPlotXLabel simExtCustomUI_setPlotXRange simExtCustomUI_setPlotYLabel simExtCustomUI_setPlotYRange simExtCustomUI_getWidgetVisibility simExtCustomUI_setEnabled simExtCustomUI_setWidgetVisibility

simExtCustomUI_setMouseOptions

Description Set plot widget options for interacting with mouse.
Lua synopsis simExtCustomUI_setMouseOptions(int handle, int id, bool panX, bool panY, bool zoomX, bool zoomY)
Lua parameters
handle (int): ui handle
id (int): widget id
panX (bool): if true, panning (by dragging with the mouse) the X axis is allowed
panY (bool): if true, panning (by dragging with the mouse) the Y axis is allowed
zoomX (bool): if true, zooming (by mouse wheel) the X axis is allowed
zoomY (bool): if true, zooming (by mouse wheel) the Y axis is allowed
Lua return values -
See also simExtCustomUI_addCurve simExtCustomUI_addCurveTimePoints simExtCustomUI_addCurveXYPoints simExtCustomUI_clearCurve simExtCustomUI_getCurveData simExtCustomUI_growPlotRanges simExtCustomUI_growPlotXRange simExtCustomUI_growPlotYRange simExtCustomUI_removeCurve simExtCustomUI_replot simExtCustomUI_rescaleAxes simExtCustomUI_rescaleAxesAll simExtCustomUI_setLegendVisibility simExtCustomUI_setPlotLabels simExtCustomUI_setPlotRanges simExtCustomUI_setPlotXLabel simExtCustomUI_setPlotXRange simExtCustomUI_setPlotYLabel simExtCustomUI_setPlotYRange simExtCustomUI_getWidgetVisibility simExtCustomUI_setEnabled simExtCustomUI_setWidgetVisibility

simExtCustomUI_setPlotLabels

Description Set the labels of the plot widget.
Lua synopsis simExtCustomUI_setPlotLabels(int handle, int id, string x, string y)
Lua parameters
handle (int): ui handle
id (int): widget id
x (string): x label
y (string): y label
Lua return values -
See also simExtCustomUI_addCurve simExtCustomUI_addCurveTimePoints simExtCustomUI_addCurveXYPoints simExtCustomUI_clearCurve simExtCustomUI_getCurveData simExtCustomUI_growPlotRanges simExtCustomUI_growPlotXRange simExtCustomUI_growPlotYRange simExtCustomUI_removeCurve simExtCustomUI_replot simExtCustomUI_rescaleAxes simExtCustomUI_rescaleAxesAll simExtCustomUI_setLegendVisibility simExtCustomUI_setMouseOptions simExtCustomUI_setPlotRanges simExtCustomUI_setPlotXLabel simExtCustomUI_setPlotXRange simExtCustomUI_setPlotYLabel simExtCustomUI_setPlotYRange simExtCustomUI_getWidgetVisibility simExtCustomUI_setEnabled simExtCustomUI_setWidgetVisibility

simExtCustomUI_setPlotRanges

Description Set the ranges of the plot widget.
Lua synopsis simExtCustomUI_setPlotRanges(int handle, int id, double xmin, double xmax, double ymin, double ymax)
Lua parameters
handle (int): ui handle
id (int): widget id
xmin (double): minimum x range
xmax (double): maximum x range
ymin (double): minimum y range
ymax (double): maximum y range
Lua return values -
See also simExtCustomUI_addCurve simExtCustomUI_addCurveTimePoints simExtCustomUI_addCurveXYPoints simExtCustomUI_clearCurve simExtCustomUI_getCurveData simExtCustomUI_growPlotRanges simExtCustomUI_growPlotXRange simExtCustomUI_growPlotYRange simExtCustomUI_removeCurve simExtCustomUI_replot simExtCustomUI_rescaleAxes simExtCustomUI_rescaleAxesAll simExtCustomUI_setLegendVisibility simExtCustomUI_setMouseOptions simExtCustomUI_setPlotLabels simExtCustomUI_setPlotXLabel simExtCustomUI_setPlotXRange simExtCustomUI_setPlotYLabel simExtCustomUI_setPlotYRange simExtCustomUI_getWidgetVisibility simExtCustomUI_setEnabled simExtCustomUI_setWidgetVisibility

simExtCustomUI_setPlotXLabel

Description Set the X label of the plot widget.
Lua synopsis simExtCustomUI_setPlotXLabel(int handle, int id, string label)
Lua parameters
handle (int): ui handle
id (int): widget id
label (string): x label
Lua return values -
See also simExtCustomUI_addCurve simExtCustomUI_addCurveTimePoints simExtCustomUI_addCurveXYPoints simExtCustomUI_clearCurve simExtCustomUI_getCurveData simExtCustomUI_growPlotRanges simExtCustomUI_growPlotXRange simExtCustomUI_growPlotYRange simExtCustomUI_removeCurve simExtCustomUI_replot simExtCustomUI_rescaleAxes simExtCustomUI_rescaleAxesAll simExtCustomUI_setLegendVisibility simExtCustomUI_setMouseOptions simExtCustomUI_setPlotLabels simExtCustomUI_setPlotRanges simExtCustomUI_setPlotXRange simExtCustomUI_setPlotYLabel simExtCustomUI_setPlotYRange simExtCustomUI_getWidgetVisibility simExtCustomUI_setEnabled simExtCustomUI_setWidgetVisibility

simExtCustomUI_setPlotXRange

Description Set the X range of the plot widget.
Lua synopsis simExtCustomUI_setPlotXRange(int handle, int id, double xmin, double xmax)
Lua parameters
handle (int): ui handle
id (int): widget id
xmin (double): minimum x range
xmax (double): maximum x range
Lua return values -
See also simExtCustomUI_addCurve simExtCustomUI_addCurveTimePoints simExtCustomUI_addCurveXYPoints simExtCustomUI_clearCurve simExtCustomUI_getCurveData simExtCustomUI_growPlotRanges simExtCustomUI_growPlotXRange simExtCustomUI_growPlotYRange simExtCustomUI_removeCurve simExtCustomUI_replot simExtCustomUI_rescaleAxes simExtCustomUI_rescaleAxesAll simExtCustomUI_setLegendVisibility simExtCustomUI_setMouseOptions simExtCustomUI_setPlotLabels simExtCustomUI_setPlotRanges simExtCustomUI_setPlotXLabel simExtCustomUI_setPlotYLabel simExtCustomUI_setPlotYRange simExtCustomUI_getWidgetVisibility simExtCustomUI_setEnabled simExtCustomUI_setWidgetVisibility

simExtCustomUI_setPlotYLabel

Description Set the Y label of the plot widget.
Lua synopsis simExtCustomUI_setPlotYLabel(int handle, int id, string label)
Lua parameters
handle (int): ui handle
id (int): widget id
label (string): y label
Lua return values -
See also simExtCustomUI_addCurve simExtCustomUI_addCurveTimePoints simExtCustomUI_addCurveXYPoints simExtCustomUI_clearCurve simExtCustomUI_getCurveData simExtCustomUI_growPlotRanges simExtCustomUI_growPlotXRange simExtCustomUI_growPlotYRange simExtCustomUI_removeCurve simExtCustomUI_replot simExtCustomUI_rescaleAxes simExtCustomUI_rescaleAxesAll simExtCustomUI_setLegendVisibility simExtCustomUI_setMouseOptions simExtCustomUI_setPlotLabels simExtCustomUI_setPlotRanges simExtCustomUI_setPlotXLabel simExtCustomUI_setPlotXRange simExtCustomUI_setPlotYRange simExtCustomUI_getWidgetVisibility simExtCustomUI_setEnabled simExtCustomUI_setWidgetVisibility

simExtCustomUI_setPlotYRange

Description Set the Y range of the plot widget.
Lua synopsis simExtCustomUI_setPlotYRange(int handle, int id, double ymin, double ymax)
Lua parameters
handle (int): ui handle
id (int): widget id
ymin (double): minimum y range
ymax (double): maximum y range
Lua return values -
See also simExtCustomUI_addCurve simExtCustomUI_addCurveTimePoints simExtCustomUI_addCurveXYPoints simExtCustomUI_clearCurve simExtCustomUI_getCurveData simExtCustomUI_growPlotRanges simExtCustomUI_growPlotXRange simExtCustomUI_growPlotYRange simExtCustomUI_removeCurve simExtCustomUI_replot simExtCustomUI_rescaleAxes simExtCustomUI_rescaleAxesAll simExtCustomUI_setLegendVisibility simExtCustomUI_setMouseOptions simExtCustomUI_setPlotLabels simExtCustomUI_setPlotRanges simExtCustomUI_setPlotXLabel simExtCustomUI_setPlotXRange simExtCustomUI_setPlotYLabel simExtCustomUI_getWidgetVisibility simExtCustomUI_setEnabled simExtCustomUI_setWidgetVisibility

simExtCustomUI_setPosition

Description Set the position of a UI window.
Lua synopsis simExtCustomUI_setPosition(int handle, int x, int y, bool suppressEvents=true)
Lua parameters
handle (int): ui handle
x (int): X position
y (int): Y position
suppressEvents (bool, default: true): if true, no event will be generated from this call
Lua return values -
See also simExtCustomUI_create simExtCustomUI_destroy simExtCustomUI_getPosition simExtCustomUI_getSize simExtCustomUI_getTitle simExtCustomUI_hide simExtCustomUI_isVisible simExtCustomUI_setSize simExtCustomUI_setTitle simExtCustomUI_show

simExtCustomUI_setRadiobuttonValue

Description Set the value of a radiobutton widget.
Lua synopsis simExtCustomUI_setRadiobuttonValue(int handle, int id, int value, bool suppressEvents=true)
Lua parameters
handle (int): ui handle
id (int): widget id
value (int): value
suppressEvents (bool, default: true): if true, no event will be generated from this call
Lua return values -
See also simExtCustomUI_getRadiobuttonValue simExtCustomUI_getWidgetVisibility simExtCustomUI_setEnabled simExtCustomUI_setWidgetVisibility

simExtCustomUI_setSize

Description Set the size of a UI window.
Lua synopsis simExtCustomUI_setSize(int handle, int w, int h, bool suppressEvents=true)
Lua parameters
handle (int): ui handle
w (int): width
h (int): height
suppressEvents (bool, default: true): if true, no event will be generated from this call
Lua return values -
See also simExtCustomUI_create simExtCustomUI_destroy simExtCustomUI_getPosition simExtCustomUI_getSize simExtCustomUI_getTitle simExtCustomUI_hide simExtCustomUI_isVisible simExtCustomUI_setPosition simExtCustomUI_setTitle simExtCustomUI_show

simExtCustomUI_setSliderValue

Description Set the value of a slider widget.
Lua synopsis simExtCustomUI_setSliderValue(int handle, int id, int value, bool suppressEvents=true)
Lua parameters
handle (int): ui handle
id (int): widget id
value (int): value
suppressEvents (bool, default: true): if true, no event will be generated from this call
Lua return values -
See also simExtCustomUI_getSliderValue simExtCustomUI_getWidgetVisibility simExtCustomUI_setEnabled simExtCustomUI_setWidgetVisibility

simExtCustomUI_setSpinboxValue

Description Set the value of a spinbox widget.
Lua synopsis simExtCustomUI_setSpinboxValue(int handle, int id, float value, bool suppressEvents=true)
Lua parameters
handle (int): ui handle
id (int): widget id
value (float): value
suppressEvents (bool, default: true): if true, no event will be generated from this call
Lua return values -
See also simExtCustomUI_getSpinboxValue simExtCustomUI_getWidgetVisibility simExtCustomUI_setEnabled simExtCustomUI_setWidgetVisibility

simExtCustomUI_setTitle

Description Set the title of a UI window.
Lua synopsis simExtCustomUI_setTitle(int handle, string title, bool suppressEvents=true)
Lua parameters
handle (int): ui handle
title (string): X position
suppressEvents (bool, default: true): if true, no event will be generated from this call
Lua return values -
See also simExtCustomUI_create simExtCustomUI_destroy simExtCustomUI_getPosition simExtCustomUI_getSize simExtCustomUI_getTitle simExtCustomUI_hide simExtCustomUI_isVisible simExtCustomUI_setPosition simExtCustomUI_setSize simExtCustomUI_show

simExtCustomUI_setWidgetVisibility

Description Hide or show a widget.
Lua synopsis simExtCustomUI_setWidgetVisibility(int handle, int id, bool visibility)
Lua parameters
handle (int): ui handle
id (int): widget id
visibility (bool): true if the window is visible, false otherwise
Lua return values -
See also simExtCustomUI_getWidgetVisibility simExtCustomUI_setEnabled

simExtCustomUI_show

Description Show the UI window.
Lua synopsis simExtCustomUI_show(int handle)
Lua parameters
handle (int): ui handle
Lua return values -
See also simExtCustomUI_create simExtCustomUI_destroy simExtCustomUI_getPosition simExtCustomUI_getSize simExtCustomUI_getTitle simExtCustomUI_hide simExtCustomUI_isVisible simExtCustomUI_setPosition simExtCustomUI_setSize simExtCustomUI_setTitle



Constants

curve_type

sim_customui_curve_type_time: a curve with an X-simple domain, i.e. y = f(x)
sim_customui_curve_type_xy: a parametric curve, i.e. x = fx(t), y = fy(t)

curve_style

sim_customui_curve_style_scatter
sim_customui_curve_style_line
sim_customui_curve_style_line_and_scatter
sim_customui_curve_style_step_left: only available for 'time' curves
sim_customui_curve_style_step_center: only available for 'time' curves
sim_customui_curve_style_step_right: only available for 'time' curves
sim_customui_curve_style_impulse: only available for 'time' curves

curve_scatter_shape

sim_customui_curve_scatter_shape_none
sim_customui_curve_scatter_shape_dot
sim_customui_curve_scatter_shape_cross
sim_customui_curve_scatter_shape_plus
sim_customui_curve_scatter_shape_circle
sim_customui_curve_scatter_shape_disc
sim_customui_curve_scatter_shape_square
sim_customui_curve_scatter_shape_diamond
sim_customui_curve_scatter_shape_star
sim_customui_curve_scatter_shape_triangle
sim_customui_curve_scatter_shape_triangle_inverted
sim_customui_curve_scatter_shape_cross_square
sim_customui_curve_scatter_shape_plus_square
sim_customui_curve_scatter_shape_cross_circle
sim_customui_curve_scatter_shape_plus_circle
sim_customui_curve_scatter_shape_peace

line_style

sim_customui_line_style_solid
sim_customui_line_style_dotted
sim_customui_line_style_dashed


Data structures

curve_options

Description Extra options for the curve creation function simExtCustomUI_addCurve. Create this data structure in the form of a hash table, e.g.:
{line_size=3, add_to_legend=false, selectable=true}

Fields
scatter_shape (int, default: sim_customui_curve_scatter_shape_disc): scatter shape. see curve_scatter_shape.
scatter_size (int, default: 10): size of the scatter shape
line_size (int, default: 2): size of the line
line_style (int, default: sim_customui_line_style_solid): style of the pen used to draw the line. see line_style.
add_to_legend (bool, default: true): if false, the curve will not be added to the legend
selectable (bool, default: true): if false, the curve points cannot be selected and will not react to click events
track (bool, default: false): if true, enable the mouse tracker
See also curve_scatter_shape simExtCustomUI_addCurve simExtCustomUI_addCurveTimePoints simExtCustomUI_addCurveXYPoints simExtCustomUI_clearCurve simExtCustomUI_getCurveData simExtCustomUI_growPlotRanges simExtCustomUI_growPlotXRange simExtCustomUI_growPlotYRange simExtCustomUI_removeCurve simExtCustomUI_replot simExtCustomUI_rescaleAxes simExtCustomUI_rescaleAxesAll simExtCustomUI_setLegendVisibility simExtCustomUI_setMouseOptions simExtCustomUI_setPlotLabels simExtCustomUI_setPlotRanges simExtCustomUI_setPlotXLabel simExtCustomUI_setPlotXRange simExtCustomUI_setPlotYLabel simExtCustomUI_setPlotYRange simExtCustomUI_getWidgetVisibility simExtCustomUI_setEnabled simExtCustomUI_setWidgetVisibility