Display demo widget application. More...
#include <led.h>#include <board.h>#include <string.h>#include <gfx/gfx.h>#include <gfx/win.h>#include <gfx/wtk.h>#include <gfx/sysfont.h>#include <membag.h>#include <debug.h>#include <mainloop.h>#include "app_desktop.h"#include "app_widget.h"Go to the source code of this file.
Data Structures | |
| struct | widget_context |
| Widget application context. More... | |
Defines | |
Color scheme | |
| #define | COLOR_SCHEME_0_FG GFX_COLOR(255,255,0) |
| Color scheme 0 foreground color. | |
| #define | COLOR_SCHEME_0_BG GFX_COLOR(0,50,0) |
| Color scheme 0 background color. | |
| #define | COLOR_SCHEME_1_FG GFX_COLOR(0,255,0) |
| Color scheme 1 foreground color. | |
| #define | COLOR_SCHEME_1_BG GFX_COLOR(0,100,100) |
| Color scheme 1 background color. | |
| #define | APP_BACKGROUND_COLOR GFX_COLOR(0,0,0) |
| Background color for application. | |
| #define | SUBFRAME_BACKGROUND_COLOR GFX_COLOR(90,90,90) |
| Background color for subframe. | |
Widget positions and sizes | |
| #define | LABEL_POS_X 10 |
| Label X coordinate. | |
| #define | LABEL_POS_Y 10 |
| Label Y coordinate. | |
| #define | SUBFRAME_HORIZONTAL_SPACING 45 |
| Spacing on each side of the subframe. | |
| #define | SUBFRAME_TOP_SPACING 10 |
| Spacing from label to subframe. | |
| #define | SUBFRAME_BOTTOM_SPACING 30 |
| Spacing from subframe to bottom of screen. | |
| #define | WIDGET_POS_X 10 |
| Leftmost X coordinate in subframe for the widgets. | |
| #define | SLIDER_POS_Y 10 |
| Slider X coordinate, inside subframe. | |
| #define | SLIDER_SIZE_X 80 |
| Width of slider. | |
| #define | SLIDER_SIZE_Y 40 |
| Height of slider. | |
| #define | SLIDER_PB_SPACING_X 10 |
| Spacing between the slider and progress bars. | |
| #define | PB_SIZE_X SLIDER_SIZE_X |
| Width of progress bar. | |
| #define | PB_SIZE_Y SLIDER_SIZE_Y |
| Height of progress bar. | |
| #define | CHECK_BOX_SPACING_Y 20 |
| Spacing above check box to slider and progress bars. | |
| #define | RADIO_BUTTON_SPACING_Y 5 |
| Spacing above each radio button. | |
Enumerations | |
| enum | command_id { RADIO_DEC_ID = 123, RADIO_HEX_ID, BUTTON_EXIT_ID, DUMMY_ID, SLIDER_ID, CHECK_BOX_ID, RADIO_BUTTON_1_ID, RADIO_BUTTON_2_ID, BUTTON_QUIT_ID } |
Command event IDs. More... | |
Functions | |
| static void | app_widget_update_colors (struct widget_context *widget) |
| Update colors. | |
| static bool | widget_frame_command_handler (struct wtk_basic_frame *frame, win_command_t command_data) |
| Frame handler for the application. | |
| void | app_widget_launch (struct workqueue_task *task) |
| Setup widget demo. | |
Variables | |
| static const char | demo_string [] = "Demonstrating widgets" |
| Description for label. | |
| static const char | checkbox_string [] = "Invert colors" |
| Description for check box. | |
| static const char | rb1_string [] = "Color scheme 1" |
| Description for radio buttons. | |
| static const char | rb2_string [] = "Color scheme 2" |
| Description for radio buttons. | |
| static struct widget_context * | widget_ctx |
| Statically allocated context pointer. | |
Display demo widget application.
Copyright (C) 2009 Atmel Corporation. All rights reserved.
Definition in file app_widget.c.
1.6.3