ui_controls.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. #pragma once
  2. #include <inttypes.h>
  3. #include <gui/gui.h>
  4. /**
  5. * @brief Renders TextBox control
  6. * @param canvas canvas to render control at
  7. * @param y vertical position of a control to be rendered at
  8. * @param text text to be rendered inside control
  9. * @param is_selected whether control should be rendered as focused or not
  10. */
  11. void ui_control_text_box_render(
  12. Canvas* const canvas,
  13. int16_t y,
  14. const char* text,
  15. bool is_selected);
  16. /**
  17. * @brief Renders Button control
  18. * @param canvas canvas to render control at
  19. * @param x horizontal position of a control to be rendered at
  20. * @param y vertical position of a control to be rendered at
  21. * @param width control width
  22. * @param height control height
  23. * @param text text to be rendered inside control
  24. * @param is_selected whether control should be rendered as focused or not
  25. */
  26. void ui_control_button_render(
  27. Canvas* const canvas,
  28. int16_t x,
  29. int16_t y,
  30. uint8_t width,
  31. uint8_t height,
  32. const char* text,
  33. bool is_selected);
  34. /**
  35. * @brief Renders Select control
  36. * @param canvas canvas to render control at
  37. * @param x horizontal position of a control to be rendered at
  38. * @param y vertical position of a control to be rendered at
  39. * @param width control width
  40. * @param text text to be rendered inside control
  41. * @param is_selected whether control should be rendered as focused or not
  42. */
  43. void ui_control_select_render(
  44. Canvas* const canvas,
  45. int16_t x,
  46. int16_t y,
  47. uint8_t width,
  48. const char* text,
  49. bool is_selected);