StCreate Function

Microchip Graphics Library

Microchip Graphics Library
StCreate Function
C
STATICTEXT * StCreate(
    WORD ID, 
    SHORT left, 
    SHORT top, 
    SHORT right, 
    SHORT bottom, 
    WORD state, 
    XCHAR * pText, 
    GOL_SCHEME * pScheme
);
Overview

This function creates a STATICTEXT 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.

Input Parameters
Input Parameters 
Description 
WORD ID 
Unique user defined ID for the object instance. 
SHORT left 
Left most position of the object. 
SHORT top 
Top most position of the object. 
SHORT right 
Right most position of the object. 
SHORT bottom 
Bottom most position of the object. 
WORD state 
Sets the initial state of the object. 
XCHAR * pText 
Pointer to the text used in the static text. 
GOL_SCHEME * pScheme 
Pointer to the style scheme. Set to NULL if default style scheme is used. 
Returns

Returns the pointer to the object created.

Preconditions

none

Side Effects

none

Example
GOL_SCHEME *pScheme;
STATICTEXT *pSt;
    
    pScheme = GOLCreateScheme();
    state = ST_DRAW | ST_FRAME | ST_CENTER_ALIGN;
    StCreate(ID_STATICTEXT1,          // ID
             30,80,235,160,           // dimension
             state,                   // has frame and center aligned
             "Static Textn Example", // text
             pScheme);                // use given scheme
    
    while(!StDraw(pSt));              // draw the object
Microchip Graphics Library Version 3.06.02 - October 15, 2012
Copyright © 2012 Microchip Technology, Inc.  All rights reserved