Vault 7: Projects
This publication series is about specific projects related to the Vault 7 main publication.
// find slider pointer
pScrollBar = (GFX_GOL_SCROLLBAR *)GFX_GOL_ObjectFind(ID_SLD1);
// decrement the slider position
GFX_GOL_ScrollBarPositionDecrement(pScrollBar);
// redraw only the thumb
GFX_GOL_ObjectStateSet(pScrollBar, GFX_GOL_SCROLLBAR_DRAW_THUMB_STATE);
}
}
if(objectID == ID_BTN2)
{
if(objMsg == GFX_GOL_BUTTON_ACTION_PRESSED)
{
// find slider pointer
pScrollBar = (GFX_GOL_SCROLLBAR *)GFX_GOL_ObjectFind(ID_SLD1);
// increment the slider position
GFX_GOL_ScrollBarPositionIncrement(pScrollBar);
// redraw only the thumb
GFX_GOL_ObjectStateSet(pScrollBar, GFX_GOL_SCROLLBAR_DRAW_THUMB_STATE);
}
}
return (true);
}
Notice that the callback do not check if the scroll bar was affected by the message. Since the callback returns true, the scroll
bar ACTIONSET_FUNC will be the one that will perform the state change of the scroll bar if the user directly interacted with
the scroll bar.
Graphics Object Action Get and Action Set Functions
Each object has a predefined translated actions (see GFX_GOL_TRANSLATED_ACTION enumeration). These actions are
returned by the object's ACTIONGET_FUNC. The ACTIONGET_FUNC is called by the GFX_GOL_ObjectMessage()
function.
The ACTIONGET_FUNC evaluates the message to determine if the user action affected the object. If the object is affected,
it replies with one of the predefined translated action of the object.
For a button object the following translated actions are returned when the button is affected:
• GFX_GOL_BUTTON_ACTION_PRESSED - button is pressed
• GFX_GOL_BUTTON_ACTION_STILLPRESSED - button is continuously pressed
• GFX_GOL_BUTTON_ACTION_RELEASED - button is released
• GFX_GOL_BUTTON_ACTION_CANCELPRESS - button button press canceled
When the button is not affected it returns:
• GFX_GOL_OBJECT_ACTION_INVALID - invalid message response
All objects returns GFX_GOL_OBJECT_ACTION_INVALID when they are not affected by the message.
the ACTIONSET_FUNC on the other hand performs the actual state change of the object. The draw state bits of the object
are modified to indicate that the object will be redrawn in the next call to the GFX_GOL_ObjectListDraw().
1.4.2 How the Library Works
This section describes how the Graphics Library works and how the Primitive and Object layers are used.
1.4.2.1 Using the Primitive Layer
This section contains information on how to use the Primitive Layer of the Graphics Library.
1.4 Using The Library MLA - Graphics Library Help How the Library Works
50
Protego_Release_01_05-Related-OEM-Documentation-MLA_v2013_12_20-help_mla_gfx.pdf