main/buttons.h

changeset 1
ad2c8b13eb88
parent 0
b74b0e4902c3
child 19
49e2960d4642
equal deleted inserted replaced
0:b74b0e4902c3 1:ad2c8b13eb88
4 */ 4 */
5 5
6 #ifndef _BUTTONS_H 6 #ifndef _BUTTONS_H
7 #define _BUTTONS_H 7 #define _BUTTONS_H
8 8
9 #define MAXBUTTONS 40 9 #define MAXBUTTONS 40 ///< Maximum buttons on a screen
10 10
11 11
12 /** 12 /**
13 * @brief Definition of the touch screen buttons. 13 * @brief Definition of the touch screen buttons.
14 */ 14 */
38 * @brief Add a button to the buttons list. 38 * @brief Add a button to the buttons list.
39 * @param x The X start position 39 * @param x The X start position
40 * @param y The Y start position 40 * @param y The Y start position
41 * @param w The width of the button in pixels 41 * @param w The width of the button in pixels
42 * @param h The height of the button in pixels. 42 * @param h The height of the button in pixels.
43 * @param text The text to display on the button. 43 * @param txt The text to display on the button.
44 * If the text is empty, no key will be shown. 44 * If the txt is empty, no key will be shown.
45 * Use this for other areas that must act as a key. 45 * Use this for other areas that must act as a key.
46 * @param order The order number in the list. 46 * @param order The order number in the list.
47 */ 47 */
48 void Buttons_Add(int x, int y, int w, int h, char *txt, int order); 48 void Buttons_Add(int x, int y, int w, int h, char *txt, int order);
49 49
50 /** 50 /**
72 * @return The ASCII code of the key, or -1 if no key is pressed. 72 * @return The ASCII code of the key, or -1 if no key is pressed.
73 */ 73 */
74 int KeyBoardAll(void); 74 int KeyBoardAll(void);
75 75
76 /** 76 /**
77 * @brief Scan keyboard, just digits.
78 * @return The ASCII code of the key, or -1 if no key is pressed.
79 */
80 int KeyBoardDigits(void);
81
82 /**
77 * @brief Show data text field. 83 * @brief Show data text field.
78 * @param x The X position on the screen 84 * @param x The X position on the screen
79 * @param y The Y position on the screen 85 * @param y The Y position on the screen
80 * @param label The field name text 86 * @param label The field name text
81 * @param txt The field text data 87 * @param txt The field text data
211 * @param val The field integer data 217 * @param val The field integer data
212 */ 218 */
213 void EditBool(char *label, bool *val); 219 void EditBool(char *label, bool *val);
214 220
215 /** 221 /**
216 * @bried Edit SSR2 value. 222 * @brief Edit SSR2 value.
217 * @param val The SSR2 value. 223 * @param val The SSR2 value.
218 */ 224 */
219 void EditSSR2(int *val); 225 void EditSSR2(int *val);
220 226
221 /** 227 /**
222 * @brief Confirm or not choice. Uses the whole screen. 228 * @brief Confirm or not choice. Uses the whole screen.
223 * @param top The top screen message. 229 * @param top The top screen message.
224 * #param yes The text for the ack button. 230 * @param ack The text for the ack button.
225 * @param no The text for the nack button. 231 * @param nak The text for the nack button.
226 * @return true when ack, or false. 232 * @return true when ack, or false.
227 */ 233 */
228 int Confirm(char *top, char *ack, char *nak); 234 int Confirm(char *top, char *ack, char *nak);
229 235
230 #endif 236 #endif

mercurial