radioButton.h
Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
2  * Copyright (c) 2016, Texas Instruments Incorporated
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions
7  * are met:
8  *
9  * * Redistributions of source code must retain the above copyright
10  * notice, this list of conditions and the following disclaimer.
11  *
12  * * Redistributions in binary form must reproduce the above copyright
13  * notice, this list of conditions and the following disclaimer in the
14  * documentation and/or other materials provided with the distribution.
15  *
16  * * Neither the name of Texas Instruments Incorporated nor the names of
17  * its contributors may be used to endorse or promote products derived
18  * from this software without specific prior written permission.
19  *
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31  * --/COPYRIGHT--*/
32 
33 #ifndef RADIOBUTTON_H_
34 #define RADIOBUTTON_H_
35 
36 //*****************************************************************************
37 //
39 //
40 //*****************************************************************************
41 typedef struct Graphics_RadioButton
42 {
43  uint16_t xPosition;
44  uint16_t yPosition;
45  bool selected;
46  uint8_t gap;
47  uint32_t textColor;
48  uint8_t numbOfChar;
49  uint32_t selectedColor;
50  uint32_t notSelectedColor;
52  int8_t *text;
54 
55 //*****************************************************************************
56 //globals
57 //*****************************************************************************
59 
60 //*****************************************************************************
61 // the function prototypes
62 //*****************************************************************************
63 extern void Graphics_drawRadioButton(const Graphics_Context *context,
64  const Graphics_RadioButton *radioButton);
66  const Graphics_RadioButton *radioButton,
67  uint16_t x,
68  uint16_t y);
69 extern void Graphics_drawSelectedRadioButton(const Graphics_Context *context,
70  const Graphics_RadioButton *
71  radioButton);
72 extern void Graphics_drawReleasedRadioButton(const Graphics_Context *context,
73  const Graphics_RadioButton *
74  radioButton);
75 
76 #endif /* RADIOBUTTON_H_ */
uint8_t numbOfChar
Definition: radioButton.h:48
uint16_t yPosition
Definition: radioButton.h:44
Definition: grlib.h:230
This structure describes a font used for drawing text onto the screen.
Definition: grlib.h:190
void Graphics_drawReleasedRadioButton(const Graphics_Context *context, const Graphics_RadioButton *radioButton)
Definition: radioButton.c:183
void Graphics_drawSelectedRadioButton(const Graphics_Context *context, const Graphics_RadioButton *radioButton)
Definition: radioButton.c:148
int8_t * text
Definition: radioButton.h:52
uint16_t xPosition
Definition: radioButton.h:43
struct Graphics_RadioButton Graphics_RadioButton
This structure defines the characteristics of a RadioButton.
void Graphics_drawRadioButton(const Graphics_Context *context, const Graphics_RadioButton *radioButton)
Definition: radioButton.c:58
Graphics_Context g_sContext
uint8_t gap
Definition: radioButton.h:46
uint32_t textColor
Definition: radioButton.h:47
uint32_t selectedColor
Definition: radioButton.h:49
bool selected
Definition: radioButton.h:45
This structure defines the characteristics of a RadioButton.
Definition: radioButton.h:41
const Graphics_Font * font
Definition: radioButton.h:51
uint32_t notSelectedColor
Definition: radioButton.h:50
bool Graphics_isRadioButtonSelected(const Graphics_RadioButton *radioButton, uint16_t x, uint16_t y)
Definition: radioButton.c:119
Copyright 2018, Texas Instruments Incorporated