Contents

TwAddSeparator (function)

int TwAddSeparator(TwBar *bar, const char *name, const char *def)

Description

This function adds a horizontal separator line to a tweak bar. It may be useful if one wants to separate several sets of variables inside a same group.

Note that you can also add a line of text in a tweak bar using a special button, see TwAddButton.

Parameters

bar

The tweak bar to which adding the separator.

name

The name of the separator. It is optional, this parameter can be set to NULL. But if you need to refer to this separator later in other commands, name it (like for other var names, choose a unique, simple and short name, and avoid special characters like spaces or punctuation marks).

def

An optional definition string used to modify the behavior of this new entry. This string must follow the variable parameters syntax, or set to NULL to get the default behavior. It could be set or modified later by calling the TwDefine or TwSetParam functions.

Return value

Example

TwAddSeparator(bar, NULL, " group='Parameters' ");
 
TwAddSeparator(bar, "sep1", NULL);
TwDefine(" barName/sep1 group='Parameters' ");

See also

TwAddVarRO, TwAddVarRW, TwAddVarCB, TwAddButton, TwRemoveVar, TwDefine, TwSetParam, TwGetParam