Enventor: Prototipe of Drag-n-Drop feature. Patch 2.
Summary: Second patch of Drag-n-Drop feature contains new layout for editing parts relative sizes before insertion. This patch improves parts templates in order to allow set parts sizes. Reviewers: Hermet Projects: #enventor Differential Revision: https://phab.enlightenment.org/D1309
This commit is contained in:
parent
c8d6ec6538
commit
478e058200
Binary file not shown.
After Width: | Height: | Size: 148 B |
Binary file not shown.
After Width: | Height: | Size: 162 B |
Binary file not shown.
After Width: | Height: | Size: 158 B |
|
@ -7,6 +7,15 @@ images {
|
|||
image: "shine.png" COMP;
|
||||
image: "bub_over_bot.png" COMP;
|
||||
image: "disabler.png" COMP;
|
||||
image: "live_edit_icons/rel1.dragable.png" COMP;
|
||||
image: "live_edit_icons/rel2.dragable.png" COMP;
|
||||
image: "live_edit_icons/bg_glow_in.png" COMP;
|
||||
}
|
||||
|
||||
styles {
|
||||
style { name: "entry_live_edit_style";
|
||||
base: "font="FN" font_size=11 text_class=entry color=#ffffff style=shadow,bottom shadow_color=#00000080 glow_color=#3399ff18 valign=1 ellipsis=1.0 wrap=none";
|
||||
}
|
||||
}
|
||||
|
||||
group { name: "about_layout";
|
||||
|
@ -1279,6 +1288,166 @@ group { name: "search_layout";
|
|||
}
|
||||
}
|
||||
|
||||
#define BG_COLOR 88 99 122
|
||||
#define BORDER_COLOR 220 250 255
|
||||
#define REL_SIZE 70 35
|
||||
#define INFO_SIZE 130 50
|
||||
|
||||
group { name: "viewer_layout_dragable_container";
|
||||
parts {
|
||||
part { name: "bg";
|
||||
type: RECT;
|
||||
description { state: "default" 0.0;
|
||||
color: 255 255 255 0;
|
||||
}
|
||||
description { state: "show" 0.0;
|
||||
color: 255 255 255 30;
|
||||
}
|
||||
}
|
||||
part { name: "new_part_bg";
|
||||
type: RECT;
|
||||
scale: 1;
|
||||
description { state: "default" 0.0;
|
||||
color: BG_COLOR 0;
|
||||
rel1.to: "rel1.dragable";
|
||||
rel2.to: "rel2.dragable";
|
||||
}
|
||||
description { state: "show" 0.0;
|
||||
inherit:"default" 0.0;
|
||||
color: BG_COLOR 230;
|
||||
}
|
||||
}
|
||||
part { name: "new_part_bg_decorations";
|
||||
scale: 1;
|
||||
description { state: "default" 0.0;
|
||||
image.normal: "live_edit_icons/bg_glow_in.png";
|
||||
image.border: 1 1 1 1;
|
||||
rel1.to: "new_part_bg";
|
||||
rel2.to: "new_part_bg";
|
||||
color: BORDER_COLOR 0;
|
||||
}
|
||||
description { state: "show" 0.0;
|
||||
inherit:"default" 0.0;
|
||||
color: BORDER_COLOR 255;
|
||||
}
|
||||
}
|
||||
part { name: "rel1.dragable";
|
||||
scale: 1;
|
||||
description { state: "default" 0.0;
|
||||
image.normal: "live_edit_icons/rel1.dragable.png";
|
||||
image.border: 3 3 3 3;
|
||||
min: REL_SIZE;
|
||||
max: REL_SIZE;
|
||||
color: BORDER_COLOR 0;
|
||||
}
|
||||
description { state: "show" 0.0;
|
||||
inherit:"default" 0.0;
|
||||
color: BORDER_COLOR 255;
|
||||
}
|
||||
dragable {
|
||||
confine: "bg";
|
||||
x: 1 1 0;
|
||||
y: 1 1 0;
|
||||
}
|
||||
}
|
||||
part { name: "elm.text.live_edit.rel1";
|
||||
type: TEXTBLOCK;
|
||||
scale: 1;
|
||||
repeat_events: 1;
|
||||
description {
|
||||
text.style: "entry_live_edit_style";
|
||||
rel1.to: "rel1.dragable";
|
||||
rel2.to: "rel1.dragable";
|
||||
}
|
||||
}
|
||||
part { name: "rel2.dragable";
|
||||
scale: 1;
|
||||
description { state: "default" 0.0;
|
||||
image.normal: "live_edit_icons/rel2.dragable.png";
|
||||
image.border: 3 3 3 3;
|
||||
min: REL_SIZE;
|
||||
max: REL_SIZE;
|
||||
color: BORDER_COLOR 0;
|
||||
}
|
||||
description { state: "show" 0.0;
|
||||
inherit:"default" 0.0;
|
||||
color: BORDER_COLOR 255;
|
||||
}
|
||||
dragable {
|
||||
confine: "bg";
|
||||
x: 1 1 0;
|
||||
y: 1 1 0;
|
||||
}
|
||||
}
|
||||
part { name: "elm.text.live_edit.rel2";
|
||||
type: TEXTBLOCK;
|
||||
scale: 1;
|
||||
repeat_events: 1;
|
||||
description {
|
||||
text.style: "entry_live_edit_style";
|
||||
rel1.to: "rel2.dragable";
|
||||
rel2.to: "rel2.dragable";
|
||||
}
|
||||
}
|
||||
part { name: "info_bg";
|
||||
scale: 1;
|
||||
repeat_events: 1;
|
||||
description { state: "default" 0.0;
|
||||
image.normal: "live_edit_icons/rel2.dragable.png";
|
||||
image.border: 3 3 3 3;
|
||||
min: INFO_SIZE;
|
||||
max: INFO_SIZE;
|
||||
color: BORDER_COLOR 0;
|
||||
align: 1.0 1.0;
|
||||
}
|
||||
description { state: "show" 0.0;
|
||||
inherit:"default" 0.0;
|
||||
color: BORDER_COLOR 122;
|
||||
}
|
||||
}
|
||||
part { name: "elm.text.live_edit.new_part_info";
|
||||
type: TEXTBLOCK;
|
||||
scale: 1;
|
||||
repeat_events: 1;
|
||||
description {
|
||||
text.style: "entry_live_edit_style";
|
||||
rel1.to: "info_bg";
|
||||
rel2.to: "info_bg";
|
||||
color: 255 255 255 120;
|
||||
}
|
||||
}
|
||||
}
|
||||
programs {
|
||||
program { name: "on_load_init";
|
||||
signal: "load";
|
||||
source: "";
|
||||
script {
|
||||
set_drag(PART:"rel1.dragable", 0.2, 0.2);
|
||||
set_drag(PART:"rel2.dragable", 0.8, 0.8);
|
||||
}
|
||||
after: "on_load_show";
|
||||
}
|
||||
program { name: "on_load_show";
|
||||
action: STATE_SET "show" 0.0;
|
||||
target: "bg";
|
||||
target: "new_part_bg_decorations";
|
||||
target: "new_part_bg";
|
||||
target: "rel1.dragable";
|
||||
target: "rel2.dragable";
|
||||
target: "info_bg";
|
||||
transition: DECELERATE 0.25;
|
||||
after: "emit_drag_signal";
|
||||
}
|
||||
program { name: "emit_drag_signal";
|
||||
action: SIGNAL_EMIT "drag" "rel2.dragable";
|
||||
}
|
||||
}
|
||||
}
|
||||
#undef BG_COLOR
|
||||
#undef BORDER_COLOR
|
||||
#undef REL_SIZE
|
||||
#undef INFO_SIZE
|
||||
|
||||
group { name: "viewer_layout";
|
||||
parts {
|
||||
part { name: "prev_clipper";
|
||||
|
@ -1316,6 +1485,12 @@ group { name: "viewer_layout";
|
|||
rel2.to: "cur_clipper";
|
||||
}
|
||||
}
|
||||
part { name: "elm.swallow.live_edit";
|
||||
type: SWALLOW;
|
||||
repeat_events: 1;
|
||||
description { state: "default" 0.0;
|
||||
}
|
||||
}
|
||||
}
|
||||
programs {
|
||||
program { name: "switch_instant";
|
||||
|
|
|
@ -7,10 +7,21 @@ typedef struct menu_data_s
|
|||
int type;
|
||||
} menu_data;
|
||||
|
||||
typedef struct cur_part_data_s
|
||||
{
|
||||
unsigned int type;
|
||||
float rel1_x, rel1_y, rel2_x, rel2_y;
|
||||
Evas_Coord x, y, w, h;
|
||||
} cur_part_data;
|
||||
|
||||
typedef struct live_editor_s
|
||||
{
|
||||
Evas_Object *menu;
|
||||
Evas_Object *layout;
|
||||
edit_data *ed;
|
||||
cur_part_data *cur_part_data;
|
||||
|
||||
Ecore_Event_Handler *key_down_handler;
|
||||
} live_data;
|
||||
|
||||
const int MENU_ITEMS_NUM = 6;
|
||||
|
@ -27,22 +38,149 @@ static const menu_data MENU_ITEMS[] =
|
|||
|
||||
static live_data *g_ld = NULL;
|
||||
|
||||
#define LIVE_EDIT_NEW_PART_DATA_MAX_LEN 80
|
||||
static const char *LIVE_EDIT_NEW_PART_DATA_STR =
|
||||
" %s<br/>"
|
||||
" X: %5d Y: %5d<br/>"
|
||||
" W: %5d H: %5d";
|
||||
|
||||
#define LIVE_EDIT_NEW_PART_REL_STR_MAX_LEN 16
|
||||
static const char *LIVE_EDIT_NEW_PART_REL_STR = " %.2f %.2f";
|
||||
|
||||
static void
|
||||
live_edit_current_part_values_update(live_data *ld, Evas_Object *layout)
|
||||
{
|
||||
Evas_Coord x, y, w, h;
|
||||
Evas_Coord view_w, view_h;
|
||||
|
||||
config_view_size_get(&view_w, &view_h);
|
||||
edje_object_part_geometry_get(layout, "new_part_bg", &x, &y, &w, &h);
|
||||
|
||||
ld->cur_part_data->rel1_x = (float)x/view_w;
|
||||
ld->cur_part_data->rel1_y = (float)y/view_h;
|
||||
ld->cur_part_data->rel2_x = (float)(x + w)/view_w;
|
||||
ld->cur_part_data->rel2_y = (float)(y + h)/view_h;
|
||||
ld->cur_part_data->x = x;
|
||||
ld->cur_part_data->y = y;
|
||||
ld->cur_part_data->w = w;
|
||||
ld->cur_part_data->h = h;
|
||||
}
|
||||
|
||||
static Evas_Object *
|
||||
create_dragable_container(live_data *led)
|
||||
{
|
||||
Evas_Object *viewer_layout = edj_mgr_obj_get();
|
||||
Evas_Object *layout = elm_layout_add(viewer_layout);
|
||||
elm_layout_file_set(layout, EDJE_PATH, "viewer_layout_dragable_container");
|
||||
evas_object_size_hint_weight_set(layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
evas_object_size_hint_align_set(layout, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||
elm_object_part_content_set(viewer_layout, "elm.swallow.live_edit", layout);
|
||||
return layout;
|
||||
}
|
||||
|
||||
static void
|
||||
live_edit_part_info_update(live_data *ld)
|
||||
{
|
||||
Evas_Object *layout = elm_layout_edje_get(ld->layout);
|
||||
|
||||
live_edit_current_part_values_update(ld, layout);
|
||||
|
||||
char part_info[LIVE_EDIT_NEW_PART_DATA_MAX_LEN];
|
||||
|
||||
snprintf(part_info,
|
||||
LIVE_EDIT_NEW_PART_DATA_MAX_LEN, LIVE_EDIT_NEW_PART_DATA_STR,
|
||||
MENU_ITEMS[ld->cur_part_data->type].name,
|
||||
ld->cur_part_data->x, ld->cur_part_data->y,
|
||||
ld->cur_part_data->w, ld->cur_part_data->h);
|
||||
edje_object_part_text_set(layout,
|
||||
"elm.text.live_edit.new_part_info", part_info);
|
||||
snprintf(part_info,
|
||||
LIVE_EDIT_NEW_PART_REL_STR_MAX_LEN, LIVE_EDIT_NEW_PART_REL_STR,
|
||||
ld->cur_part_data->rel1_x, ld->cur_part_data->rel1_y);
|
||||
edje_object_part_text_set(layout,
|
||||
"elm.text.live_edit.rel1", part_info);
|
||||
snprintf(part_info,
|
||||
LIVE_EDIT_NEW_PART_REL_STR_MAX_LEN, LIVE_EDIT_NEW_PART_REL_STR,
|
||||
ld->cur_part_data->rel2_x, ld->cur_part_data->rel2_y);
|
||||
edje_object_part_text_set(layout,
|
||||
"elm.text.live_edit.rel2", part_info);
|
||||
}
|
||||
|
||||
static void
|
||||
live_edit_part_geometry_changed_cb(void *data,
|
||||
Evas_Object *obj EINA_UNUSED,
|
||||
const char *emission EINA_UNUSED,
|
||||
const char *source EINA_UNUSED)
|
||||
{
|
||||
//TODO: recalc on viewport size changed
|
||||
live_edit_part_info_update(data);
|
||||
}
|
||||
|
||||
static void
|
||||
live_edit_reset(live_data *ld)
|
||||
{
|
||||
edje_object_signal_callback_del(elm_layout_edje_get(ld->layout),
|
||||
"drag", "rel1.dragable",
|
||||
live_edit_part_geometry_changed_cb);
|
||||
edje_object_signal_callback_del(elm_layout_edje_get(ld->layout),
|
||||
"drag", "rel2.dragable",
|
||||
live_edit_part_geometry_changed_cb);
|
||||
ecore_event_handler_del(ld->key_down_handler);
|
||||
ld->key_down_handler = NULL;
|
||||
|
||||
evas_object_del(ld->layout);
|
||||
ld->layout = NULL;
|
||||
}
|
||||
|
||||
static Eina_Bool
|
||||
drag_n_drop_mode_toggle_cb(void *data, int type EINA_UNUSED, void *ev)
|
||||
{
|
||||
Ecore_Event_Key *event = ev;
|
||||
live_data *ld = data;
|
||||
|
||||
if (!strcmp(event->key, "Return"))
|
||||
{
|
||||
template_live_edit_part_insert(ld->ed,
|
||||
MENU_ITEMS[ld->cur_part_data->type].type,
|
||||
ld->cur_part_data->rel1_x,
|
||||
ld->cur_part_data->rel1_y,
|
||||
ld->cur_part_data->rel2_x,
|
||||
ld->cur_part_data->rel2_y,
|
||||
view_group_name_get(VIEW_DATA));
|
||||
}
|
||||
else if (strcmp(event->key, "Delete")) return EINA_TRUE;
|
||||
|
||||
live_edit_reset(ld);
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
setup_layout(live_data *ld)
|
||||
{
|
||||
ld->key_down_handler = ecore_event_handler_add(ECORE_EVENT_KEY_DOWN,
|
||||
drag_n_drop_mode_toggle_cb,
|
||||
ld);
|
||||
Evas_Object *layout = create_dragable_container(ld);
|
||||
ld->layout = layout;
|
||||
|
||||
edje_object_signal_callback_add(elm_layout_edje_get(layout),
|
||||
"drag", "rel1.dragable",
|
||||
live_edit_part_geometry_changed_cb, ld);
|
||||
edje_object_signal_callback_add(elm_layout_edje_get(layout),
|
||||
"drag", "rel2.dragable",
|
||||
live_edit_part_geometry_changed_cb, ld);
|
||||
|
||||
live_edit_part_info_update(ld);
|
||||
}
|
||||
|
||||
static void
|
||||
menu_it_selected_cb(void *data, Evas_Object *obj EINA_UNUSED, void *event_info)
|
||||
{
|
||||
live_data *ld = data;
|
||||
const Elm_Object_Item *it = event_info;
|
||||
unsigned int idx = elm_menu_item_index_get(it);
|
||||
template_live_edit_part_insert(ld->ed, MENU_ITEMS[idx].type,
|
||||
view_group_name_get(VIEW_DATA));
|
||||
evas_object_del(ld->menu);
|
||||
ld->menu = NULL;
|
||||
}
|
||||
ld->cur_part_data->type = elm_menu_item_index_get(it);
|
||||
setup_layout(ld);
|
||||
|
||||
static void
|
||||
menu_dismissed_cb(void *data, Evas_Object *obj, void *event_info EINA_UNUSED)
|
||||
{
|
||||
live_data *ld = data;
|
||||
evas_object_del(ld->menu);
|
||||
ld->menu = NULL;
|
||||
}
|
||||
|
@ -64,8 +202,6 @@ menu_create(Evas_Object *parent, live_data *ld)
|
|||
elm_object_item_part_content_set(it, NULL, icon);
|
||||
}
|
||||
|
||||
evas_object_smart_callback_add(menu, "dismissed", menu_dismissed_cb, ld);
|
||||
|
||||
return menu;
|
||||
}
|
||||
|
||||
|
@ -103,6 +239,7 @@ live_edit_toggle(void)
|
|||
{
|
||||
evas_object_event_callback_del(event_obj, EVAS_CALLBACK_MOUSE_UP,
|
||||
layout_mouse_up_cb);
|
||||
live_edit_reset(ld);
|
||||
}
|
||||
|
||||
edit_disabled_set(ld->ed, on);
|
||||
|
@ -124,7 +261,18 @@ live_edit_init(edit_data *ed)
|
|||
}
|
||||
g_ld = ld;
|
||||
|
||||
ld->cur_part_data = calloc(1, sizeof(cur_part_data));
|
||||
if (!ld->cur_part_data)
|
||||
{
|
||||
EINA_LOG_ERR("Faild to allocate Memory!");
|
||||
return;
|
||||
}
|
||||
|
||||
ld->ed = ed;
|
||||
|
||||
ld->menu = NULL;
|
||||
ld->layout = NULL;
|
||||
ld->key_down_handler = NULL;
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -132,6 +280,8 @@ live_edit_term()
|
|||
{
|
||||
live_data *ld = g_ld;
|
||||
if (ld->menu) evas_object_del(ld->menu);
|
||||
if (ld->layout) live_edit_reset(ld);
|
||||
free(ld->cur_part_data);
|
||||
free(ld);
|
||||
g_ld = NULL;
|
||||
}
|
||||
|
|
|
@ -410,6 +410,7 @@ config_update_cb(void *data)
|
|||
base_statusbar_toggle(EINA_FALSE);
|
||||
edit_part_highlight_toggle(ad->ed, EINA_FALSE);
|
||||
view_dummy_toggle(VIEW_DATA, EINA_FALSE);
|
||||
if (config_live_edit_get()) live_edit_toggle();
|
||||
|
||||
//previous build was failed, Need to rebuild then reload the edj.
|
||||
if (edj_mgr_reload_need_get())
|
||||
|
|
|
@ -26,6 +26,21 @@ template_part_first_line_get(void)
|
|||
return (const char *) buf;
|
||||
}
|
||||
|
||||
static const char *
|
||||
template_part_relative_line_get(char rel_no, float relative_x, float relative_y)
|
||||
{
|
||||
if ((rel_no != 1) && (rel_no != 2))
|
||||
return NULL;
|
||||
|
||||
static char buf[40];
|
||||
int i;
|
||||
|
||||
snprintf(buf, sizeof(buf), " rel%d.relative: %.2f %.2f;<br/>",
|
||||
rel_no, relative_x, relative_y);
|
||||
|
||||
return (const char *) buf;
|
||||
}
|
||||
|
||||
void
|
||||
template_insert(edit_data *ed)
|
||||
{
|
||||
|
@ -91,7 +106,7 @@ template_insert(edit_data *ed)
|
|||
elm_entry_entry_insert(entry, p);
|
||||
elm_entry_entry_insert(entry, t[i]);
|
||||
}
|
||||
edit_line_increase(ed, (line_cnt -1));
|
||||
edit_line_increase(ed, line_cnt);
|
||||
elm_entry_entry_insert(entry, p);
|
||||
elm_entry_entry_insert(entry, t[i]);
|
||||
|
||||
|
@ -136,7 +151,6 @@ image_description_add(edit_data *ed)
|
|||
elm_entry_cursor_pos_set(edit_entry, cursor_pos_to_restore);
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
template_part_insert_cursor_pos_set(edit_data *ed,
|
||||
Template_Part_Insert_Type insert_type,
|
||||
|
@ -158,10 +172,11 @@ template_part_insert_cursor_pos_set(edit_data *ed,
|
|||
return cursor_pos;
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
internal_template_part_insert(edit_data *ed,
|
||||
Edje_Part_Type type,
|
||||
float rel1_x, float rel1_y,
|
||||
float rel2_x, float rel2_y,
|
||||
Template_Part_Insert_Type insert_type,
|
||||
const Eina_Stringshare *group_name)
|
||||
{
|
||||
|
@ -229,13 +244,15 @@ internal_template_part_insert(edit_data *ed,
|
|||
break;
|
||||
}
|
||||
|
||||
// insert the first line of the part block with generated name.
|
||||
elm_entry_entry_insert(edit_entry, p);
|
||||
const char *first_line = template_part_first_line_get();
|
||||
elm_entry_entry_insert(edit_entry, first_line);
|
||||
edit_line_increase(ed, 1);
|
||||
|
||||
// insert the body of the part
|
||||
int i;
|
||||
for (i = 0; i < (line_cnt - 1); i++)
|
||||
for (i = 0; i < line_cnt; i++)
|
||||
{
|
||||
elm_entry_entry_insert(edit_entry, p);
|
||||
elm_entry_entry_insert(edit_entry, t[i]);
|
||||
|
@ -243,7 +260,21 @@ internal_template_part_insert(edit_data *ed,
|
|||
edit_line_increase(ed, 1);
|
||||
}
|
||||
|
||||
elm_entry_entry_insert(edit_entry, t[i]);
|
||||
// insert relatives
|
||||
elm_entry_entry_insert(edit_entry, p);
|
||||
elm_entry_entry_insert(edit_entry, template_part_relative_line_get(1, rel1_x, rel1_y));
|
||||
elm_entry_entry_insert(edit_entry, p);
|
||||
elm_entry_entry_insert(edit_entry, template_part_relative_line_get(2, rel2_x, rel2_y));
|
||||
edit_line_increase(ed, 2);
|
||||
|
||||
// insert the tale of the part that contains closing brackets
|
||||
t = (char **) &TEMPLATE_PART_TALE;
|
||||
for (i = 0; i < TEMPLATE_PART_TALE_LINE_CNT; i++)
|
||||
{
|
||||
elm_entry_entry_insert(edit_entry, p);
|
||||
elm_entry_entry_insert(edit_entry, t[i]);
|
||||
edit_line_increase(ed, 1);
|
||||
}
|
||||
|
||||
int cursor_pos2 = elm_entry_cursor_pos_get(edit_entry);
|
||||
edit_redoundo_region_push(ed, cursor_pos1, cursor_pos2);
|
||||
|
@ -258,15 +289,19 @@ internal_template_part_insert(edit_data *ed,
|
|||
|
||||
void
|
||||
template_live_edit_part_insert(edit_data *ed, Edje_Part_Type type,
|
||||
float rel1_x, float rel1_y,
|
||||
float rel2_x, float rel2_y,
|
||||
const Eina_Stringshare *group_name)
|
||||
{
|
||||
internal_template_part_insert(ed, type, TEMPLATE_PART_INSERT_LIVE_EDIT,
|
||||
internal_template_part_insert(ed, type,
|
||||
rel1_x, rel1_y, rel2_x, rel2_y,
|
||||
TEMPLATE_PART_INSERT_LIVE_EDIT,
|
||||
group_name);
|
||||
}
|
||||
|
||||
void
|
||||
template_part_insert(edit_data *ed, Edje_Part_Type type)
|
||||
{
|
||||
internal_template_part_insert(ed, type,
|
||||
TEMPLATE_PART_INSERT_DEFAULT, NULL);
|
||||
internal_template_part_insert(ed, type, TEMPLATE_PART_INSERT_DEFAULT,
|
||||
0.25, 0.25, 0.75, 0.75, NULL);
|
||||
}
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
void template_insert(edit_data *ed);
|
||||
void template_part_insert(edit_data *ed, Edje_Part_Type type);
|
||||
void template_live_edit_part_insert(edit_data *ed, Edje_Part_Type type, const Eina_Stringshare *group_name);
|
||||
void template_live_edit_part_insert(edit_data *ed, Edje_Part_Type type, float rel1_x, float rel1_y, float rel2_x, float rel2_y, const Eina_Stringshare *group_name);
|
||||
|
|
|
@ -32,7 +32,15 @@ const char *TEMPLATE_GROUP[TEMPLATE_GROUP_LINE_CNT] =
|
|||
"}"
|
||||
};
|
||||
|
||||
#define TEMPLATE_PART_IMAGE_LINE_CNT 15
|
||||
#define TEMPLATE_PART_TALE_LINE_CNT 2
|
||||
|
||||
const char *TEMPLATE_PART_TALE[TEMPLATE_PART_TALE_LINE_CNT] =
|
||||
{
|
||||
" }<br/>",
|
||||
"}<br/>"
|
||||
};
|
||||
|
||||
#define TEMPLATE_PART_IMAGE_LINE_CNT 10
|
||||
|
||||
const char *TEMPLATE_PART_IMAGE[TEMPLATE_PART_IMAGE_LINE_CNT] =
|
||||
{
|
||||
|
@ -40,20 +48,15 @@ const char *TEMPLATE_PART_IMAGE[TEMPLATE_PART_IMAGE_LINE_CNT] =
|
|||
" scale: 1;<br/>",
|
||||
" mouse_events: 1;<br/>",
|
||||
" description { state: \"default\" 0.0;<br/>",
|
||||
" rel1 { relative: 0.25 0.25; offset: 0 0; /*to: \"XXX\";*/ }<br/>",
|
||||
" rel2 { relative: 0.75 0.75; offset: -1 -1; /*to: \"XXX\";*/ }<br/>",
|
||||
" align: 0.5 0.5;<br/>",
|
||||
" fixed: 0 0;<br/>",
|
||||
" min: 0 0;<br/>",
|
||||
" visible: 1;<br/>",
|
||||
" image.normal: \"logo.png\";<br/>",
|
||||
" //aspect: 1 1;<br/>",
|
||||
" }<br/>",
|
||||
"}<br/>",
|
||||
""
|
||||
" //aspect: 1 1;<br/>"
|
||||
};
|
||||
|
||||
#define TEMPLATE_PART_RECT_LINE_CNT 14
|
||||
#define TEMPLATE_PART_RECT_LINE_CNT 9
|
||||
|
||||
const char *TEMPLATE_PART_RECT[TEMPLATE_PART_RECT_LINE_CNT] =
|
||||
{
|
||||
|
@ -61,19 +64,14 @@ const char *TEMPLATE_PART_RECT[TEMPLATE_PART_RECT_LINE_CNT] =
|
|||
" scale: 1;<br/>",
|
||||
" mouse_events: 1;<br/>",
|
||||
" description { state: \"default\" 0.0;<br/>",
|
||||
" rel1 { relative: 0.25 0.25; offset: 0 0; /*to: \"XXX\";*/ }<br/>",
|
||||
" rel2 { relative: 0.75 0.75; offset: -1 -1; /*to: \"XXX\";*/ }<br/>",
|
||||
" color: 255 255 255 255;<br/>",
|
||||
" align: 0.5 0.5;<br/>",
|
||||
" fixed: 0 0;<br/>",
|
||||
" min: 0 0;<br/>",
|
||||
" visible: 1;<br/>",
|
||||
" }<br/>",
|
||||
"}<br/>",
|
||||
""
|
||||
" visible: 1;<br/>"
|
||||
};
|
||||
|
||||
#define TEMPLATE_PART_SWALLOW_LINE_CNT 13
|
||||
#define TEMPLATE_PART_SWALLOW_LINE_CNT 8
|
||||
|
||||
const char *TEMPLATE_PART_SWALLOW[TEMPLATE_PART_SWALLOW_LINE_CNT] =
|
||||
{
|
||||
|
@ -81,35 +79,25 @@ const char *TEMPLATE_PART_SWALLOW[TEMPLATE_PART_SWALLOW_LINE_CNT] =
|
|||
" scale: 1;<br/>",
|
||||
" mouse_events: 1;<br/>",
|
||||
" description { state: \"default\" 0.0;<br/>",
|
||||
" rel1 { relative: 0.25 0.25; offset: 0 0; /*to: \"XXXX\";*/ }<br/>",
|
||||
" rel2 { relative: 0.75 0.75; offset: -1 -1; /*to: \"XXX\";*/ }<br/>",
|
||||
" align: 0.5 0.5;<br/>",
|
||||
" fixed: 0 0;<br/>",
|
||||
" min: 0 0;<br/>",
|
||||
" visible: 1;<br/>",
|
||||
" }<br/>",
|
||||
"}<br/>",
|
||||
""
|
||||
" visible: 1;<br/>"
|
||||
};
|
||||
|
||||
#define TEMPLATE_PART_SPACER_LINE_CNT 11
|
||||
#define TEMPLATE_PART_SPACER_LINE_CNT 6
|
||||
|
||||
const char *TEMPLATE_PART_SPACER[TEMPLATE_PART_SPACER_LINE_CNT] =
|
||||
{
|
||||
" type: SPACER;<br/>",
|
||||
" scale: 1;<br/>",
|
||||
" description { state: \"default\" 0.0;<br/>",
|
||||
" rel1 { relative: 0.25 0.25; offset: 0 0; /*to: \"XXX\";*/ }<br/>",
|
||||
" rel2 { relative: 0.75 0.75; offset: -1 -1; /*to: \"XXX\";*/ }<br/>",
|
||||
" align: 0.5 0.5;<br/>",
|
||||
" fixed: 0 0;<br/>",
|
||||
" min: 0 0;<br/>",
|
||||
" }<br/>",
|
||||
"}<br/>",
|
||||
""
|
||||
" min: 0 0;<br/>"
|
||||
};
|
||||
|
||||
#define TEMPLATE_PART_TEXT_LINE_CNT 24
|
||||
#define TEMPLATE_PART_TEXT_LINE_CNT 19
|
||||
|
||||
const char *TEMPLATE_PART_TEXT[TEMPLATE_PART_TEXT_LINE_CNT] =
|
||||
{
|
||||
|
@ -118,8 +106,6 @@ const char *TEMPLATE_PART_TEXT[TEMPLATE_PART_TEXT_LINE_CNT] =
|
|||
" mouse_events: 1;<br/>",
|
||||
" //effect: SHADOW;<br/>",
|
||||
" description { state: \"default\" 0.0;<br/>",
|
||||
" rel1 { relative: 0.25 0.25; offset: 0 0; /*to: \"XXX\";*/ }<br/>",
|
||||
" rel2 { relative: 0.75 0.75; offset: -1 -1; /*to: \"XXX\";*/ }<br/>",
|
||||
" align: 0.5 0.5;<br/>",
|
||||
" fixed: 0 0;<br/>",
|
||||
" min: 0 0;<br/>",
|
||||
|
@ -133,20 +119,15 @@ const char *TEMPLATE_PART_TEXT[TEMPLATE_PART_TEXT_LINE_CNT] =
|
|||
" text: \"TEXT\";<br/>",
|
||||
" align: 0.5 0.5;<br/>",
|
||||
" min: 0 0;<br/>",
|
||||
" }<br/>",
|
||||
" }<br/>",
|
||||
"}<br/>",
|
||||
""
|
||||
" }<br/>"
|
||||
};
|
||||
|
||||
#define TEMPLATE_PART_TEXTBLOCK_LINE_CNT 17
|
||||
#define TEMPLATE_PART_TEXTBLOCK_LINE_CNT 12
|
||||
|
||||
const char *TEMPLATE_PART_TEXTBLOCK[TEMPLATE_PART_TEXTBLOCK_LINE_CNT] =
|
||||
{
|
||||
" type: TEXTBLOCK;<br/>",
|
||||
" description { state: \"default\" 0.0;<br/>",
|
||||
" rel1 { relative: 0.25 0.25; offset: 0 0; /*to: \"XXX\";*/ }<br/>",
|
||||
" rel2 { relative: 0.75 0.75; offset: -1 -1; /*to: \"XXX\";*/ }<br/>",
|
||||
" align: 0.5 0.5;<br/>",
|
||||
" fixed: 0 0;<br/>",
|
||||
" min: 0 0;<br/>",
|
||||
|
@ -156,10 +137,7 @@ const char *TEMPLATE_PART_TEXTBLOCK[TEMPLATE_PART_TEXTBLOCK_LINE_CNT] =
|
|||
" text: \"TEXTBLOCK\";<br/>",
|
||||
" align: 0.5 0.5;<br/>",
|
||||
" min: 0 0;<br/>",
|
||||
" }<br/>",
|
||||
" }<br/>",
|
||||
"}<br/>",
|
||||
""
|
||||
" }<br/>"
|
||||
};
|
||||
|
||||
#define TEMPLATE_DESC_LINE_CNT 10
|
||||
|
|
Loading…
Reference in New Issue