Microchip® Advanced Software Framework

services/wtk/example3_plot/widget_gui.c File Reference

Display demo widget application.

Copyright (c) 2014-2018 Microchip Technology Inc. and its subsidiaries.

#include <asf.h>
#include <string.h>
#include "widget_gui.h"

Data Structures

struct  widget_context
 Widget application context. More...
 

Enumerations

enum  command_id {
  DUMMY_ID,
  ICON_BUTTON_1_ID,
  ICON_BUTTON_2_ID,
  ICON_BUTTON_3_ID,
  BUTTON_PREV_ID,
  BUTTON_NEXT_ID,
  BUTTON_SELECT_ID,
  DUMMY_ID,
  SLIDER_ID,
  CHECK_BOX_ID,
  RADIO_BUTTON_1_ID,
  RADIO_BUTTON_2_ID,
  BUTTON_ID,
  DUMMY_ID,
  SLIDER_ID,
  BUTTON_ID,
  ICON_DUMMY_ID = 0,
  ICON_AUDIO_RECORD_ID,
  ICON_AUDIO_MIC_ID,
  ICON_AUDIO_PLAY_PAUSE_ID,
  ICON_AUDIO_STOP_ID,
  ICON_AUDIO_VOLUME_ID,
  ICON_AUDIO_RET_ID,
  ICON_AUDIO_MAX_ID,
  ICON_DUMMY_ID = 0,
  ICON_LPM_WAIT_ID,
  ICON_LPM_SLEEP_ID,
  ICON_LPM_BACKUP_ID,
  ICON_LPM_RET_ID,
  ICON_LPM_MAX
}
 Command event IDs. More...
 

Functions

bool app_widget_launch (void)
 Setup widget demo. More...
 
static bool widget_frame_command_handler (struct wtk_basic_frame *frame, win_command_t command_data)
 Frame handler for the application. More...
 

Variables

static struct widget_contextwidget_ctx
 Statically allocated context pointer. More...
 

static bool widget_frame_command_handler ( struct wtk_basic_frame frame,
win_command_t  command_data 
)
static

Frame handler for the application.

Handles all command events from the widgets in the application frame.

See Also
wtk_basic_frame_command_handler_t
Parameters
framePointer to the application frame
command_dataCommand event ID
Returns
True if exiting, to destroy the window

References BUTTON_ID, widget_context::plot, widget_context::slider, win_redraw(), wtk_basic_frame_get_custom_data(), wtk_plot_add_value(), wtk_plot_as_child(), and wtk_slider_get_value().