List View - JamJar00/JUI GitHub Wiki

The List View is one of three menus in JUI. It acts similar to the sub-menu screens on Blackberry mobiles.

Usage

To add a List View add

listview_t view;
view = listview_create(component_count, components);

listview_draw(&view);

listview_select(&view, 0);

listview_run(&view);

Reference

listview_create creates the listview _t structure given the number of components and pointer to the components.

listview_draw clears and draws the list on the screen, if you need to redraw at any point then you can just call this again.

listview_select moves the selection cursor to the position specified, if you don't call this the cursor will not be show until the user moves the selection.

listview_scroll moves the selection cursor by a specified amount forward (positive values) or backward (negative values).

listview_up moves the selection cursor up one row.

listview_down moves the selection cursor down one row.

listview_run enters the main loop for the icon menu. This will return when the user presses the left arrow.