summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYakov Goldberg <yakov.g@samsung.com>2014-05-20 18:10:37 +0300
committerYakov Goldberg <yakov.g@samsung.com>2014-05-21 10:47:39 +0300
commitede5bf5aa3719b1f3582d79344e485c730e480d2 (patch)
treedcb692c13f7d01495f05f8c22bd80321089fb99c
parenta1be501fad6d1e9f4d507e48a239160a9c61b668 (diff)
fixing layout
-rw-r--r--src/bin/egui_gui/editor.c49
-rw-r--r--src/bin/egui_gui/egui_layout_c.json2
-rw-r--r--src/bin/egui_gui/egui_layout_h.json34
-rw-r--r--src/bin/egui_gui/propview.c34
4 files changed, 82 insertions, 37 deletions
diff --git a/src/bin/egui_gui/editor.c b/src/bin/egui_gui/editor.c
index e4d6da5..3827a15 100644
--- a/src/bin/egui_gui/editor.c
+++ b/src/bin/egui_gui/editor.c
@@ -1895,9 +1895,11 @@ static void
1895_propsview_toolbar_clicked(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) 1895_propsview_toolbar_clicked(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
1896{ 1896{
1897 const Gui_Widget *wdg = _editor_wdg_selected_get(); 1897 const Gui_Widget *wdg = _editor_wdg_selected_get();
1898 _propsview_toolbar_selected_item_type = (int) (intptr_t) data; 1898 It_Data_Type new_type = (int) (intptr_t) data;
1899 1899
1900 propview_build(wdg, _propsview_toolbar_selected_item_type); 1900// _propsview_toolbar_selected_item_type = new_type;
1901
1902 propview_build(wdg, new_type);
1901} 1903}
1902 1904
1903static void 1905static void
@@ -1974,19 +1976,54 @@ _project_new(char *filename)
1974 * in order to switch between scrollbox for properties 1976 * in order to switch between scrollbox for properties
1975 * and genlist for items. */ 1977 * and genlist for items. */
1976void 1978void
1977_propview_build_post_cb(const Gui_Widget *wdg, It_Data_Type type) 1979_propview_build_post_cb(const Gui_Widget *wdg, It_Data_Type new_type)
1978{ 1980{
1979 switch(type) 1981 /* Unsetting view according to old selected toolbar's item. */
1982 switch (_propsview_toolbar_selected_item_type)
1980 { 1983 {
1981 case DESCRIPTION_TYPE: 1984 case DESCRIPTION_TYPE:
1985 {
1986 break;
1987 }
1982 case PROPERTY_TYPE: 1988 case PROPERTY_TYPE:
1989 {
1990 break;
1991 }
1983 case CALLBACK_TYPE: 1992 case CALLBACK_TYPE:
1993 {
1994 break;
1995 }
1984 case CONTENT_TYPE: 1996 case CONTENT_TYPE:
1985 { 1997 {
1998 break;
1999 }
2000 case ITEM_TYPE:
2001 {
1986 eo_do(g->propsview_sc, evas_obj_visibility_set(EINA_TRUE)); 2002 eo_do(g->propsview_sc, evas_obj_visibility_set(EINA_TRUE));
1987 eo_do(g->itemview_box, evas_obj_visibility_set(EINA_FALSE)); 2003 eo_do(g->itemview_box, evas_obj_visibility_set(EINA_FALSE));
1988 /* FIXME: maybe it's not the best idea to clear item list every time. */ 2004 break;
1989 itemview_clear(); 2005 }
2006 }
2007
2008 _propsview_toolbar_selected_item_type = new_type;
2009
2010 /* Setting view according to new selected toolbar's item. */
2011 switch (new_type)
2012 {
2013 case DESCRIPTION_TYPE:
2014 {
2015 break;
2016 }
2017 case PROPERTY_TYPE:
2018 {
2019 break;
2020 }
2021 case CALLBACK_TYPE:
2022 {
2023 break;
2024 }
2025 case CONTENT_TYPE:
2026 {
1990 break; 2027 break;
1991 } 2028 }
1992 case ITEM_TYPE: 2029 case ITEM_TYPE:
diff --git a/src/bin/egui_gui/egui_layout_c.json b/src/bin/egui_gui/egui_layout_c.json
index c6a691f..2f889e4 100644
--- a/src/bin/egui_gui/egui_layout_c.json
+++ b/src/bin/egui_gui/egui_layout_c.json
@@ -13,7 +13,7 @@ static Eo *main_win;
13 { 13 {
14 "type":"resource" 14 "type":"resource"
15 }, 15 },
16 "Images" : 16 "Images":
17 { 17 {
18 "res_canvas_bg":"src/data/images/canvas_bg.jpg" 18 "res_canvas_bg":"src/data/images/canvas_bg.jpg"
19 }, 19 },
diff --git a/src/bin/egui_gui/egui_layout_h.json b/src/bin/egui_gui/egui_layout_h.json
index f36de2d..07e8c5f 100644
--- a/src/bin/egui_gui/egui_layout_h.json
+++ b/src/bin/egui_gui/egui_layout_h.json
@@ -2,8 +2,11 @@
2#define _egui_layout_h 2#define _egui_layout_h
3#include <Eo.h> 3#include <Eo.h>
4 4
5
5typedef struct 6typedef struct
6{ 7{
8 Eo *fs_win;
9 Eo *fileselector;
7 Eo *rm_win; 10 Eo *rm_win;
8 Eo *rm_toolbar; 11 Eo *rm_toolbar;
9 Eo *rm_table; 12 Eo *rm_table;
@@ -12,15 +15,12 @@ typedef struct
12 Eo *rm_value_entry; 15 Eo *rm_value_entry;
13 Eo *rm_cb_type_hoversel; 16 Eo *rm_cb_type_hoversel;
14 Eo *rm_button_add; 17 Eo *rm_button_add;
15 Eo *fs_win;
16 Eo *fileselector;
17 Eo *main_win; 18 Eo *main_win;
18 Eo *canvas_bg; 19 Eo *canvas_bg;
20 Eo *toolbar;
19 Eo *left_panes; 21 Eo *left_panes;
20 Eo *right_panes;
21 Eo *left_panel_box; 22 Eo *left_panel_box;
22 Eo *fctr_table; 23 Eo *fctr_table;
23 Eo *fctr_actionslider_it;
24 Eo *fctr_win_it; 24 Eo *fctr_win_it;
25 Eo *fctr_bg_it; 25 Eo *fctr_bg_it;
26 Eo *fctr_box_it; 26 Eo *fctr_box_it;
@@ -29,6 +29,7 @@ typedef struct
29 Eo *fctr_check_it; 29 Eo *fctr_check_it;
30 Eo *fctr_icon_it; 30 Eo *fctr_icon_it;
31 Eo *fctr_image_it; 31 Eo *fctr_image_it;
32 Eo *fctr_actionslider_it;
32 Eo *fctr_bubble_it; 33 Eo *fctr_bubble_it;
33 Eo *fctr_calendar_it; 34 Eo *fctr_calendar_it;
34 Eo *fctr_colorselector_it; 35 Eo *fctr_colorselector_it;
@@ -45,34 +46,31 @@ typedef struct
45 Eo *sequences_box; 46 Eo *sequences_box;
46 Eo *seq_table; 47 Eo *seq_table;
47 Eo *seq_list; 48 Eo *seq_list;
49 Eo *right_panes;
48 Eo *right_panel_box; 50 Eo *right_panel_box;
49 Eo *objtree_table; 51 Eo *objtree_table;
52 Eo *objtree_list;
50 Eo *objtree_filter_box; 53 Eo *objtree_filter_box;
51 Eo *objtree_filter_label;
52 Eo *objtree_filter_entry; 54 Eo *objtree_filter_entry;
53 Eo *objtree_list;
54 Eo *itemview_list;
55 Eo *itemview_box;
56 Eo *itemview_buttons_box;
57 Eo *itemview_add_item_but;
58 Eo *itemview_add_item_nested_but;
59 Eo *itemview_add_separator_but;
60 Eo *itemview_del_item_but;
61 Eo *propsview_table; 55 Eo *propsview_table;
62 Eo *propsview_toolbar; 56 Eo *propsview_toolbar;
63 Eo *propsview_list;
64 Eo *propsview_sc; 57 Eo *propsview_sc;
65 Eo *propsview_box; 58 Eo *propsview_box;
66 Eo *toolbar; 59 Eo *itemview_box;
60 Eo *itemview_list;
61 Eo *itemview_buttons_box;
62 Eo *itemview_add_item_nested_but;
63 Eo *itemview_add_separator_but;
67} GUI; 64} GUI;
68 65
69GUI* get_gui(); 66Eina_Bool
67_sequence_graphviz_button_clicked_execute(void *data, Eo *obj, const Eo_Event_Description *desc, void *event_info);
70 68
71Eina_Bool 69Eina_Bool
72_sequence_fs_win_show_execute(void *data, Eo *obj, const Eo_Event_Description *desc, void *event_info); 70_sequence_fs_win_show_execute(void *data, Eo *obj, const Eo_Event_Description *desc, void *event_info);
71
73Eina_Bool 72Eina_Bool
74_sequence_rm_win_show_execute(void *data, Eo *obj, const Eo_Event_Description *desc, void *event_info); 73_sequence_rm_win_show_execute(void *data, Eo *obj, const Eo_Event_Description *desc, void *event_info);
75Eina_Bool
76_sequence_graphviz_button_clicked_execute(void *data, Eo *obj, const Eo_Event_Description *desc, void *event_info);
77 74
75GUI *get_gui();
78#endif 76#endif
diff --git a/src/bin/egui_gui/propview.c b/src/bin/egui_gui/propview.c
index 4c38b73..aa3ed77 100644
--- a/src/bin/egui_gui/propview.c
+++ b/src/bin/egui_gui/propview.c
@@ -585,6 +585,21 @@ propview_build(const Gui_Widget *wdg, It_Data_Type type)
585{ 585{
586 elm_box_clear(sc_box); 586 elm_box_clear(sc_box);
587 if (!wdg) return; 587 if (!wdg) return;
588
589 /* type ITEM_TYPE not assigned to any toolbar's item.
590 * It's assigned when toolbar's item is CONTENT and widget is menu.
591 * So if current type is ITEM_TYPEm we need to assign it to CONTENT_TYPE,
592 * and it will be resolved according to widget's type. */
593 if (type == ITEM_TYPE) type = CONTENT_TYPE;
594
595 if ((type == CONTENT_TYPE) &&
596 (wdg_is_container(wdg, DB_DEF_MENU_CLASS) ||
597 wdg_is_container(wdg, DB_DEF_DISKSELECTOR_CLASS) ||
598 wdg_is_container(wdg, DB_DEF_CTXPOPUP_CLASS)))
599 {
600 type = ITEM_TYPE;
601 }
602
588 switch(type) 603 switch(type)
589 { 604 {
590 case DESCRIPTION_TYPE: 605 case DESCRIPTION_TYPE:
@@ -604,18 +619,13 @@ propview_build(const Gui_Widget *wdg, It_Data_Type type)
604 } 619 }
605 case CONTENT_TYPE: 620 case CONTENT_TYPE:
606 { 621 {
607 if (wdg_is_container(wdg, DB_DEF_MENU_CLASS) || 622 _content_build(wdg);
608 wdg_is_container(wdg, DB_DEF_DISKSELECTOR_CLASS) || 623 break;
609 wdg_is_container(wdg, DB_DEF_CTXPOPUP_CLASS)) 624 }
610 { 625 case ITEM_TYPE:
611 _item_build(wdg); 626 {
612 /* change type in order to call post callback correctly. */ 627 itemview_clear();
613 type = ITEM_TYPE; 628 _item_build(wdg);
614 }
615 else if (IS_CONTAINER(wdg))
616 {
617 _content_build(wdg);
618 }
619 break; 629 break;
620 } 630 }
621 default: 631 default: