From 5d47dce16ab007ebcd5953d0e43325ecb593111a Mon Sep 17 00:00:00 2001 From: Olliver Schinagl Date: Tue, 7 Apr 2015 08:12:16 +0200 Subject: Add a multi-screen rather then multi-text type Signed-off-by: Olliver Schinagl --- src/eulogium.c | 31 ++++++++++++++++++++++++++++++- src/eulogium.h | 16 ++++++++++++++++ 2 files changed, 46 insertions(+), 1 deletion(-) diff --git a/src/eulogium.c b/src/eulogium.c index 5126e93..40239c1 100644 --- a/src/eulogium.c +++ b/src/eulogium.c @@ -475,13 +475,42 @@ Evas_Object *eulogium_multi_text_menu(struct eulogium_data *eulogium, Evas_Objec multi_text_next_cb_data->pageindex = EINA_TRUE; _bottom = elm_button_add(parent); - elm_object_text_set(_bottom, button ? button->text : "NEXT"); + elm_object_text_set(_bottom, button ? button->text : "NEXT"); /* change to txtdata->buttontext */ evas_object_smart_callback_add(_bottom, "clicked", _eulogium_multi_text_next_cb, multi_text_next_cb_data); evas_object_show(_bottom); return eulogium_split_screen(parent, _top, _bottom); } +Evas_Object *eulogium_multi_screen_menu(struct eulogium_data *eulogium, Evas_Object *parent, Eina_List *multi_screen_data) +{ + Evas_Object *object; + Evas_Object *_top, *_bottom; + struct multi_screen *screen; + + switch (screen->type) { + case TEXT: + break; + } + + _bottom = elm_box_add(parent); + evas_object_show(_bottom); + if (screen->prev_button) { + object = elm_button_add(_bottom); + elm_object_text_set(_bottom, screen->prev_button); + evas_object_show(object); + elm_box_pack_end(_bottom, object); + } + if (screen->next_button) { + object = elm_button_add(_bottom); + elm_object_text_set(_bottom, screen->next_button); + evas_object_show(object); + elm_box_pack_end(_bottom, object); + } + + return eulogium_split_screen(parent, _top, _bottom);; +} + Evas_Object *eulogium_tripple_button_menu(Evas_Object *parent, const struct button_def *left, const struct button_def *right, const struct button_def *bottom) { Evas_Object *object; diff --git a/src/eulogium.h b/src/eulogium.h index 88cecc4..ee6294d 100644 --- a/src/eulogium.h +++ b/src/eulogium.h @@ -6,6 +6,13 @@ #include #include +enum screen_type { + TEXT, + BUTTON, + MATERIAL, + PROGRESS, +}; + struct print_data { Evas_Object *progress; Evas_Object *status; @@ -35,9 +42,18 @@ struct button_def { struct multi_text { uint_fast8_t count; + const char *button_text; const char *text[]; }; +struct multi_screen { + enum screen_type type; + char *text; + void *data; + char *next_button; + char *prev_button; +}; + void eulogium_print_file_set(struct eulogium_data *eulogium, char *filepath); void eulogium_button_cb_set(struct button_def *button, struct button_cb *cb); -- cgit v0.12