GOLNewList Macro

Microchip Graphics Library

Microchip Graphics Library
GOLNewList Macro
C
#define GOLNewList \
    _pGolObjects = NULL; \
    _pObjectFocused = NULL
Overview

This macro starts a new linked list of objects and resets the keyboard focus to none. This macro assigns the current active list _pGolObjects and current receiving keyboard input _pObjectFocused object pointers to NULL. Any keyboard inputs at this point will be ignored. Previous active list must be saved in another pointer if to be referenced later. If not needed anymore memory used by that list should be freed by GOLFree() function.

Returns

none

Preconditions

none

Side Effects

This macro sets the focused object pointer (_pObjectFocused) to NULL.

Example
OBJ_HEADER *pSave;

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

// assume that objects are already created
// you can now add objects to the new list
GOLAddObject(pButton);
GOLAddObject(pWindow);
GOLAddObject(pSlider);
Microchip Graphics Library Version 3.06.02 - October 15, 2012
Copyright © 2012 Microchip Technology, Inc.  All rights reserved