• Source
    1. /**
    2.   ******************************************************************************
    3.   * @file Form.c
    4.   * @author Neil Lab :: Left Radio
    5.   * @version v1.0.0
    6.   * @date 2015-12-06 03:02:46.443406
    7.   * @brief NGL Page Form sourse
    8.   ******************************************************************************
    9. **/
    10.  
    11. /* Define --------------------------------------------------------------------*/
    12.  
    13. /* Includes ------------------------------------------------------------------*/
    14. #include "NGL.h"
    15. #include "fonts.h"
    16. #include "bitmaps.h"
    17. #include "form_greeds.h"
    18.  
    19.  
    20. /* Private typedef -----------------------------------------------------------*/
    21. /* Private define ------------------------------------------------------------*/
    22. /* Private macro -------------------------------------------------------------*/
    23. /* Extern functions ----------------------------------------------------------*/
    24. /* Private function prototypes -----------------------------------------------*/
    25. static void Form_Draw(void);
    26. static void Form_Click(Coordinate data, NGL_TouchType type);
    27.  
    28. /* Private variables ---------------------------------------------------------*/
    29. NGL_Page Form = {
    30. { 0, 0, 400, 300 }, // [X0, Y0, X1, Y1]
    31. 0, // ID
    32. 0x0, // BackColor
    33. TRUE, // Exit allowed
    34.  
    35. /* Objects pointers array (Buttons, Labels, FillBars, etc.) */
    36. {
    37. form_greeds, 1,
    38.  
    39. },
    40.  
    41. Form_Draw, // Page draw function
    42. Form_Click, // Page click (or index change) function
    43. };
    44.  
    45. /* Private functions ---------------------------------------------------------*/
    46. /**
    47.   * @brief Form_Draw
    48.   * Draw page objects function
    49.   * @param None
    50.   * @retval None
    51. */
    52. static void Form_Draw(void)
    53. {
    54. uint8_t cnt = 0;
    55.  
    56. /* Clear all screen */
    57. NGL_LCD_Clear_AllScreen(0x0);
    58.  
    59. /* Draw all static graphics primitive, labels, etc. */
    60.  
    61.  
    62. /* Draw objects */
    63. NGL_GUI_DrawPageObjects();
    64. }
    65.  
    66. /**
    67.   * @brief Form_Click
    68.   * Common click page objects
    69.   * @param None
    70.   * @retval None
    71. */
    72. static void Form_Click(Coordinate data, NGL_TouchType type)
    73. {
    74.  
    75. }
    76.  
    77.  
    78.  
    79.  
    80.  
    81.  
    82. /*********************************************************************************************************
    83.   END FILE
    84. *********************************************************************************************************/