summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSavio Sena <savio@expertisesolutions.com.br>2014-10-06 18:59:42 -0300
committerSavio Sena <savio@expertisesolutions.com.br>2014-10-06 20:28:38 -0300
commit2360632b3752e0b9b68cbc430d0b0479664170fb (patch)
tree6e5c4f0aa410268a5380bfe1ad798e26277ba084
parent55a7eae96fb77f877d88e318a10a3108c15052cc (diff)
expedite-cxx: Unfinished widget tests.
-rw-r--r--src/bin/cxx/widgets_file_icons_2_grouped.cc17
-rw-r--r--src/bin/cxx/widgets_file_icons_3.cc2
-rw-r--r--src/bin/cxx/widgets_list_2_grouped.cc2
-rw-r--r--src/bin/cxx/widgets_list_3.cc3
-rw-r--r--src/bin/cxx/widgets_list_3_grouped.cc2
5 files changed, 18 insertions, 8 deletions
diff --git a/src/bin/cxx/widgets_file_icons_2_grouped.cc b/src/bin/cxx/widgets_file_icons_2_grouped.cc
index 10f714b..226da91 100644
--- a/src/bin/cxx/widgets_file_icons_2_grouped.cc
+++ b/src/bin/cxx/widgets_file_icons_2_grouped.cc
@@ -66,7 +66,7 @@ static void _setup(void)
66 } 66 }
67 for (evas::image& img : images) 67 for (evas::image& img : images)
68 { 68 {
69 img.raise(); 69 img.evas::object::raise();
70 } 70 }
71 efl::eina::list<evas::image>::iterator 71 efl::eina::list<evas::image>::iterator
72 it1 = images.begin(), 72 it1 = images.begin(),
@@ -74,7 +74,10 @@ static void _setup(void)
74 for (int i = 0; i < NUM; i++, ++it1) 74 for (int i = 0; i < NUM; i++, ++it1)
75 { 75 {
76 if (i > 13) 76 if (i > 13)
77 (*it1).stack_above(*it2++); 77 {
78 (*it1).evas::object::stack_above(*it2);
79 ++it2; // XXX
80 }
78 } 81 }
79 done = 0; 82 done = 0;
80} 83}
@@ -83,11 +86,17 @@ static void _setup(void)
83static void _cleanup(void) 86static void _cleanup(void)
84{ 87{
85 for (evas::image& i : images) 88 for (evas::image& i : images)
86 i.parent_set(efl::eo::base(nullptr)); 89 {
90 i.visibility_set(false); // XXX
91 i.parent_set(efl::eo::base(nullptr));
92 }
87 images.clear(); 93 images.clear();
88 94
89 for (evas::text& t : texts) 95 for (evas::text& t : texts)
90 t.parent_set(efl::eo::base(nullptr)); 96 {
97 t.visibility_set(false); // XXX
98 t.parent_set(efl::eo::base(nullptr));
99 }
91 texts.clear(); 100 texts.clear();
92} 101}
93 102
diff --git a/src/bin/cxx/widgets_file_icons_3.cc b/src/bin/cxx/widgets_file_icons_3.cc
index 56077ad..bae8f69 100644
--- a/src/bin/cxx/widgets_file_icons_3.cc
+++ b/src/bin/cxx/widgets_file_icons_3.cc
@@ -89,7 +89,7 @@ static void _loop(double t, int f)
89 efl::eina::list<evas::text>::iterator 89 efl::eina::list<evas::text>::iterator
90 it2 = texts.begin(), 90 it2 = texts.begin(),
91 end2 = texts.end(); 91 end2 = texts.end();
92 for (; it1 != end1 && it2 != end2; ++it1, ++it2) 92 for (; it1 != end1 && it2 != end2; ++it1, ++it2)
93 { 93 {
94 (*it1).evas::object::position_set(x + 8, y); 94 (*it1).evas::object::position_set(x + 8, y);
95 (*it2).evas::object::size_get(&tw, &th); 95 (*it2).evas::object::size_get(&tw, &th);
diff --git a/src/bin/cxx/widgets_list_2_grouped.cc b/src/bin/cxx/widgets_list_2_grouped.cc
index b86a5ab..62b8b3f 100644
--- a/src/bin/cxx/widgets_list_2_grouped.cc
+++ b/src/bin/cxx/widgets_list_2_grouped.cc
@@ -116,7 +116,7 @@ static void _loop(double t, int f)
116 efl::eina::list<evas::text>::iterator 116 efl::eina::list<evas::text>::iterator
117 it2 = texts.begin(), 117 it2 = texts.begin(),
118 end2 = texts.end(); 118 end2 = texts.end();
119 for (int i = 0; i < NUM; i++) 119 for (; it1 != end1 && it2 != end2; ++it1, ++it2)
120 { 120 {
121 (*it1).evas::object::position_set(x, y); 121 (*it1).evas::object::position_set(x, y);
122 (*it2).evas::object::size_get(&tw, &th); 122 (*it2).evas::object::size_get(&tw, &th);
diff --git a/src/bin/cxx/widgets_list_3.cc b/src/bin/cxx/widgets_list_3.cc
index 1528249..ca11bd8 100644
--- a/src/bin/cxx/widgets_list_3.cc
+++ b/src/bin/cxx/widgets_list_3.cc
@@ -143,7 +143,7 @@ static void _loop(double t, int f)
143 efl::eina::list<evas::text>::iterator 143 efl::eina::list<evas::text>::iterator
144 it3 = texts.begin(), 144 it3 = texts.begin(),
145 end3 = texts.end(); 145 end3 = texts.end();
146 for (int i = 0; i < NUM; i++) 146 while (it1 != end1 && it2 != end2 && it3 != end3)
147 { 147 {
148 (*it1).evas::object::position_set(x, y); 148 (*it1).evas::object::position_set(x, y);
149 (*it2).evas::object::position_set(x + 4, y + 4); 149 (*it2).evas::object::position_set(x + 4, y + 4);
@@ -151,6 +151,7 @@ static void _loop(double t, int f)
151 cent = (ICON_SIZE - th) / 2; 151 cent = (ICON_SIZE - th) / 2;
152 (*it3).evas::object::position_set(x + 8 + ICON_SIZE + 8, y + cent); 152 (*it3).evas::object::position_set(x + 8 + ICON_SIZE + 8, y + cent);
153 y += ICON_SIZE; 153 y += ICON_SIZE;
154 ++it1; ++it2; ++it3;
154 } 155 }
155 FPS_STD(NAME); 156 FPS_STD(NAME);
156} 157}
diff --git a/src/bin/cxx/widgets_list_3_grouped.cc b/src/bin/cxx/widgets_list_3_grouped.cc
index d4828fc..eb14803 100644
--- a/src/bin/cxx/widgets_list_3_grouped.cc
+++ b/src/bin/cxx/widgets_list_3_grouped.cc
@@ -137,7 +137,7 @@ static void _cleanup(void)
137 i.parent_set(efl::eo::base(nullptr)); 137 i.parent_set(efl::eo::base(nullptr));
138 images.clear(); 138 images.clear();
139 139
140 for (int i = 0; i < NUM; i++) // XXX 140 for (int i = 0; i < NUM; ++i) // XXX
141 { 141 {
142 icons[i]->parent_set(efl::eo::base(nullptr)); 142 icons[i]->parent_set(efl::eo::base(nullptr));
143 icons[i]->_reset(nullptr); 143 icons[i]->_reset(nullptr);