IupMglLabel (since 3.11.1)

Creates a label interface element using MathGL so it can display TeX symbols. It inherits from IupMglPlot.

Creation

Ihandle* IupMglLabel(const char *title); [in C]
iup.mgllabel{[title = title: string]} -> (ih: ihandle) [in Lua]
mgllabel(title) [in LED]

title: Text to be shown on the label. It can be NULL. It will set the LABELTITLE attribute.

Returns: the identifier of the created element, or NULL if an error occurs.

Attributes

The IupMglLabel element handle all attributes defined for a IupMglPlot control.


BGCOLOR: By default will use the background color of the native parent.

LABELTITLE (non inheritable): Label's text.

LABELFONT (non inheritable): same as DRAWFONT.

LABELFONTSIZE (non inheritable): same as DRAWFONTSIZE.

LABELFONTSTYLE (non inheritable): same as DRAWFONTSTYLE.

Notes

All MARGIN* attributes are set to NO. All AXS_* attributes are set to NO. EXPAND and BORDER are set to NO. And POSTDRAW_CB callback is implemented.

The IupMglLabel can NOT contain images.

The Natural size is NOT computed from its contents. The application must set SIZE or RASTERSIZE and then set LABELFONTSIZE to obtain the desired result. MathGL does not have the same font scale as IUP.

Examples

lbl = IupMglLabel("\\int \\alpha \\sqrt{sin(\\pi x)^2 + \\gamma_{i_k}} dx");
IupSetAttribute(lbl, "RASTERSIZE", "400x80");
IupSetAttribute(lbl, "LABELFONTSIZE", "10");

IupMglLabel

Browse for Example Files

See Also

IupMglPlot.