/* Frame handler for the application. 
Handles all command events from the widgets in the application frame. */
static bool widget_frame_command_handler(struct wtk_basic_frame *frame, win_command_t command_data)
/* Frame handler for the application. 
Handles all command events from the widgets in the application frame. */
static bool widget_frame_command_handler(struct wtk_basic_frame *frame, win_command_t command_data)
{
	struct widget_context *widget;
	char command;
	widget = (struct widget_context *)wtk_basic_frame_get_custom_data(frame);
	command = (uintptr_t)command_data;
	switch (command) {
	case BUTTON_ID:
		wtk_plot_add_value(widget->plot, wtk_slider_get_value(widget->slider));
		win_redraw(wtk_plot_as_child(widget->plot));
		break;
	}
	return false;
}