ButtonBar

ButtonBarHitTest

Find the button bar slot at a screen position

Syntax

Signature
int         ButtonBarHitTest( const ButtonBar *buttonBar, int row, int col );

Arguments

buttonBar the button bar.

row, col the screen row and column to test.

Return value

The one-based item position, or HTNOWHERE if the bar is empty, the coordinates are outside its last-row span or the object is NULL.

Description

The test uses the current screen dimensions and the same slot widths as drawing. A disabled item or separator still has a slot. Use `ButtonBarApplyKey()` to dispatch clicks on selectable buttons.

See also