3#ifndef PRINTLINES_ALLOWED
4#define PRINTLINES_ALLOWED 0
7static const char *FNAME =
"kest_profile_view.c";
11 KEST_PRINTF(
"create_profile_view_for(profile = %p)\n", profile);
41 profile->view_page = page;
80 queue_msg_to_teensy(create_m_message(KEST_MESSAGE_MOVE_TRANSFORMER,
"sss", effect->
profile->
id, effect->
id, button->
index));
112 KEST_PRINTF(
"profile_view_effect_delete_cb done\n");
182static void save_button_cb(lv_event_t *e)
205static void menu_button_cb(lv_event_t *e)
223 if (profile->sequence)
225 KEST_PRINTF(
"profile has a sequence; enter sequence view %p\n", profile->sequence->view_page);
242 const char *new_name = lv_textarea_get_text(page->
panel->
title);
249 lv_obj_clear_state(page->
panel->
title, LV_STATE_FOCUSED);
250 lv_obj_add_state(page->
container, LV_STATE_FOCUSED);
279 lv_obj_clear_state(page->
panel->
title, LV_STATE_FOCUSED);
280 lv_obj_add_state(page->
container, LV_STATE_FOCUSED);
337 KEST_PRINTF(
"configure_profile_view(page = %p, data = %p)\n", page, data);
355 profile->view_page = page;
368 effect = current->data;
371 if (effect && !effect->view_page)
380 effect->view_page->create_ui(effect->view_page);
384 current = current->next;
444 KEST_PRINTF(
"create_profile_view_ui. profile->name = NULL\n");
448 KEST_PRINTF(
"create_profile_view_ui. profile->name = %s\n", profile->
name);
483 global_cxt.pages.effect_selector.parent = page;
506 KEST_PRINTF(
"profile_view_append_effect done; effect->view_page = %p\n", effect->view_page);
579 KEST_PRINTF(
"profile_view_rep_update. representer = %p, representee = %p\n", representer, representee);
584 if (!page || !profile)
void kest_free(void *ptr)
void * kest_alloc(size_t size)
char * kest_strndup(const char *str, size_t n)
int set_active_profile(kest_profile *profile)
const char * kest_effect_name(kest_effect *effect)
int kest_effect_init_view_page(kest_effect *effect, struct kest_ui_page *parent)
void enter_effect_selector_cb(lv_event_t *e)
#define ERR_UNIMPLEMENTED
int kest_profile_if_active_update_fpga(kest_profile *profile)
int kest_profile_remove_effect(kest_profile *profile, uint16_t id)
int kest_profile_add_representation(kest_profile *profile, kest_representation *rep)
int kest_profile_save(kest_profile *profile)
int kest_profile_update_representations(kest_profile *profile)
int kest_profile_move_effect(kest_profile *profile, int new_pos, int old_pos)
int kest_profile_set_default_name_from_id(kest_profile *profile)
#define PROFILE_NAME_MAX_LEN
int init_profile_settings_page(kest_ui_page *page)
int configure_profile_settings_page(kest_ui_page *page, void *data)
void profile_view_save_name_cb(lv_event_t *e)
int profile_view_save_name(kest_ui_page *page)
int create_profile_view_ui(kest_ui_page *page)
void profile_view_revert_name(lv_event_t *e)
int profile_view_effect_moved_cb(kest_active_button *button)
int profile_view_refresh_save_button(kest_ui_page *page)
int free_profile_view(kest_ui_page *page)
void profile_view_play_button_cb(lv_event_t *e)
void profile_view_enter_settings_page_cb(lv_event_t *e)
int enter_profile_view(kest_ui_page *page)
kest_ui_page * create_profile_view_for(kest_profile *profile)
void profile_view_rep_update(void *representer, void *representee)
int profile_view_recalculate_indices(kest_ui_page *page)
int profile_view_append_effect(kest_ui_page *page, kest_effect *effect)
int configure_profile_view(kest_ui_page *page, void *data)
int profile_view_set_left_button_mode(kest_ui_page *page, int mode)
void profile_view_enter_main_menu_cb(lv_event_t *e)
int init_profile_view(kest_ui_page *page)
int profile_view_refresh_play_button(kest_ui_page *page)
int profile_view_change_name(kest_ui_page *page, char *name)
int profile_view_effect_delete_cb(kest_active_button *button)
int profile_view_effect_click_cb(kest_active_button *button)
int kest_sequence_begin_at(kest_sequence *sequence, kest_profile *profile)
kest_ui_page_panel * new_panel()
int ui_page_set_title_rw(kest_ui_page *page, lv_event_cb_t save_cb, lv_event_cb_t cancel_cb)
int ui_page_add_left_panel_button(kest_ui_page *page, const char *label, lv_event_cb_t cb)
int enter_ui_page_forwards(kest_ui_page *page)
kest_button * ui_page_add_bottom_button(kest_ui_page *page, const char *label, lv_event_cb_t cb)
int ui_page_set_title(kest_ui_page *page, const char *text)
int ui_page_create_base_ui(kest_ui_page *page)
int enter_ui_page_backwards(kest_ui_page *page)
int init_ui_page(kest_ui_page *page)
int ui_page_add_right_panel_button(kest_ui_page *page, const char *label, lv_event_cb_t cb)
#define KEST_UI_PAGE_PROF_VIEW
struct kest_profile * profile
kest_effect_pll * effects
kest_active_button_array * array
lv_obj_t * menu_button_label
kest_ui_page * settings_page
void(* update)(void *representer, void *representee)
kest_ui_page_panel * panel
int(* create_ui)(struct kest_ui_page *page)
struct kest_ui_page * parent
int(* enter_page)(struct kest_ui_page *page)
int(* free_all)(struct kest_ui_page *page)
int(* configure)(struct kest_ui_page *page, void *data)