Functions
Button_api

Functions

void Graphics_drawButton (const Graphics_Context *context, const Graphics_Button *button)
 
bool Graphics_isButtonSelected (const Graphics_Button *button, uint16_t x, uint16_t y)
 
void Graphics_drawSelectedButton (const Graphics_Context *context, const Graphics_Button *button)
 
void Graphics_drawReleasedButton (const Graphics_Context *context, const Graphics_Button *button)
 

Detailed Description

Function Documentation

void Graphics_drawButton ( const Graphics_Context context,
const Graphics_Button button 
)

Draws a button.

Parameters
contextis a pointer to the drawing context to use.
buttonis a pointer to the structure containing the extents of the button.

This function draws a button. The button will contain a text string and will be created based on the parameters passed in the button struct.

Returns
None.

References Graphics_Context::font, Graphics_Context::foreground, g_sContext, Graphics_Button::xMax, Graphics_Button::xMin, Graphics_Button::yMax, and Graphics_Button::yMin.

bool Graphics_isButtonSelected ( const Graphics_Button button,
uint16_t  x,
uint16_t  y 
)

Determines if x and y coordinates are contained in button .

Parameters
buttonis a pointer to the structure containing the extents of the button.
xx-coordinate to be determined if is inside button
yy-coordinate to be determined if is inside button

This function determines if x and y coordinates are contains inside button

Returns
true if x and y coordinates are inside button, false if not

References Graphics_Button::xMax, Graphics_Button::xMin, Graphics_Button::yMax, and Graphics_Button::yMin.

void Graphics_drawSelectedButton ( const Graphics_Context context,
const Graphics_Button button 
)

Draws a selected Button.

Parameters
contextis a pointer to the drawing context to use.
buttonis a pointer to the structure containing the extents of the button.

This function draws a button using the selected parameters.

Returns
None.

References Graphics_Button::borderWidth, Graphics_Context::font, Graphics_Context::foreground, g_sContext, Graphics_Button::xMax, Graphics_Button::xMin, Graphics_Button::yMax, and Graphics_Button::yMin.

void Graphics_drawReleasedButton ( const Graphics_Context context,
const Graphics_Button button 
)

Draws a released Button.

Parameters
contextis a pointer to the drawing context to use.
buttonis a pointer to the structure containing the extents of the button.

This function draws a button using the released parameters.

Returns
None.

References Graphics_Button::borderWidth, Graphics_Context::font, Graphics_Context::foreground, g_sContext, Graphics_Button::xMax, Graphics_Button::xMin, Graphics_Button::yMax, and Graphics_Button::yMin.


Copyright 2016, Texas Instruments Incorporated