A scrollbar is used to scroll an object. To each scrollbar, there are three state variables: a total size, a display size and a starting position. Total size is the size of the object being scrolled, e.g. the total number of lines in a text widget; display size is the maximal size can be displayed simultaneously in a widget window, e.g. the number of lines in a text widget window; and starting position is the starting position of the object in the scrolled window, e.g. the index of the first line displayed in the text widget window.
A scrollbar is created by calling
EZ_CreateWidget
with type EZ_WIDGET_HORIZONTAL_SCROLLBAR
EZ_WIDGET_HORIZONTAL_SCROLLBAR
, or by calling
the next function.
EZ_Widget *EZ_CreateScrollbar(EZ_Widget *parent, int type)
This function creates a scrollbar widget and returns the allocated data structure.