GOLSetList Macro

Microchip Graphics Library

Microchip Graphics Library
GOLSetList Macro
C
#define GOLSetList(objsList) \
    _pGolObjects = objsList;     \
    _pObjectFocused = NULL
Overview

This macro sets the given object list as the active list and resets the keyboard focus to none. This macro assigns the receiving keyboard input object _pObjectFocused pointer to NULL. If the new active list has an object�s state set to focus, the _pObjectFocused pointer must be set to this object or the object�s state must be change to unfocused. This is to avoid two objects displaying a focused state when only one object in the active list must be set to a focused state at anytime.

Input Parameters
Input Parameters 
Description 
objsList 
The pointer to the new active list. 
Returns

none

Preconditions

none

Side Effects

This macro sets the focused object pointer (_pObjectFocused) to NULL. Previous active list should be saved if needed to be referenced later. If not, use GOLFree() function to free the memory used by the objects before calling GOLSetList().

Example
OBJ_HEADER *pSave;
pSave = GOLGetList();           // save current list
GOLNewList();                   // start the new list
                                // current list is now NULL

// you can now add objects to the current list
// assume that objects are already created
GOLAddObject(pButton);
GOLAddObject(pWindow);
GOLAddObject(pSlider);

// do something here on the new list
// return the old list
GOLSetList(pSave);
Microchip Graphics Library Version 3.06.02 - October 15, 2012
Copyright © 2012 Microchip Technology, Inc.  All rights reserved