Vault 7: Projects

This publication series is about specific projects related to the Vault 7 main publication.

Description
This function creates a GFX_GOL_SCROLLBAR object with the parameters given. It automatically attaches the new object
into a global linked list of objects and returns the address of the object.
This function returns the pointer to the newly created object. If the object is not successfully created, it returns NULL.
The object can be configured as a scroll bar or a slider. Use the state bit GFX_GOL_SCROLLBAR_SLIDER_MODE_STATE
to enable the usage of the object as a slider. If this state bit is not enabled, the object is set up as a scroll bar.
The object can also be configured with vertical orientation. Use the state bit GFX_GOL_SCROLLBAR_VERTICAL_STATE
to set up the object with vertical orientation. If this state bit is not set, the object is used with horizontal orientation.
The behavior of GFX_GOL_ScrollBarCreate() will be undefined if one of the following is true:
left >= right
top >= bottom
pScheme is not pointing to a GFX_GOL_OBJ_SCHEME
page is set to zero.
range is set to zero.
page > range.
Preconditions
None.
Example
// assume pScheme is initialized
GFX_GOL_OBJ_SCHEME *pScheme;
GFX_GOL_SCROLLBAR *srollBarArray[3];
uint16_t state;
// create a slider with
// range = [0 - 50000]
// delta = 500
// initial position = 25000
state = GFX_GOL_SCROLLBAR_DRAW_STATE;
srollBarArray[0] = GFX_GOL_ScrollBarCreate( 5,
150, 145, 285, 181,
state,
50000, 500, 25000,
pScheme);
if (slider[0] == NULL)
return 0;
// create a slider with
// range = [0 - 100]
// delta = 20
// initial position = 0
state = GFX_GOL_SCROLLBAR_DRAW_STATE |
GFX_GOL_SCROLLBAR_SLIDER_MODE_STATE;
srollBarArray[1] = GFX_GOL_ScrollBarCreate( 6,
150, 190, 285, 220,
state,
100, 20, 0,
pScheme);
if (slider[1] == NULL)
return 0;
// create a vertical scroll bars with
// range = [0 - 30]
// delta = 2
// initial position = 20
1.6 Library Interface MLA - Graphics Library Help Graphics Object Layer
258

e-Highlighter

Click to send permalink to address bar, or right-click to copy permalink.

Un-highlight all Un-highlight selectionu Highlight selectionh