jpeg pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=a0dc0eb5161f88507e3e44bb426ac26245aa6847
commit a0dc0eb5161f88507e3e44bb426ac26245aa6847 Author: Jean-Philippe Andre <jp.an...@samsung.com> Date: Tue Nov 7 22:21:13 2017 +0900 cxx: Fix slider example The fix is not complete. We need to make efl_part() work nicely in C++: - Get the refs work properly (maybe without auto-del) - Generate the parts from the EO file as methods on the object Final form should be close to: slider.indicator().format_string_set("%1.2f"); Where everything autocompletes nicely :) --- src/examples/elementary/slider_cxx_example.cc | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/examples/elementary/slider_cxx_example.cc b/src/examples/elementary/slider_cxx_example.cc index 797e1bd5b6..b3b3676205 100644 --- a/src/examples/elementary/slider_cxx_example.cc +++ b/src/examples/elementary/slider_cxx_example.cc @@ -30,7 +30,9 @@ efl_main(void *data EINA_UNUSED, const Efl_Event *ev EINA_UNUSED) efl::ui::Image ic2(instantiate, win); ic2.icon_set("folder"); ic2.scalable_set(false, false); - efl::eo::downcast<efl::Container>(sl2.part("end")).content_set(ic2); + // FIXME: C++ part API needs special reference handling! This will show ERR! + efl::eo::downcast<efl::Container>(sl2.part("elm.swallow.end")) + .content_set(ic2); sl2.hint_align_set(EFL_GFX_SIZE_HINT_FILL, 0.5); bx.pack_end(sl2); @@ -48,8 +50,12 @@ efl_main(void *data EINA_UNUSED, const Efl_Event *ev EINA_UNUSED) bx.pack_end(sl4); efl::ui::Slider sl5(instantiate, win); - sl5.indicator_format_set("%1.2f"); - sl4.direction_set(EFL_UI_DIR_UP); + + // FIXME: C++ part API needs special reference handling! This will show ERR! + efl::eo::downcast<efl::ui::slider::Part>(sl5.part("indicator")) + .format_string_set("%1.2f"); + + sl5.direction_set(EFL_UI_DIR_UP); sl5.hint_align_set(EFL_GFX_SIZE_HINT_FILL, 0.5); bx.pack_end(sl5); --