forked from enlightenment/efl
examples: Remove now broken cxx elm examples
Bubble, thumb and separator cxx examples rely on APIs we don't want to expose in EO, so not available in C++ either. Those are legacy only.
This commit is contained in:
parent
d4929e58fc
commit
34e6c834ce
|
@ -187,9 +187,6 @@ calendar_cxx_example_05.cc \
|
|||
clock_cxx_example.cc \
|
||||
datetime_cxx_example.cc \
|
||||
icon_cxx_example_01.cc \
|
||||
separator_cxx_example_01.cc \
|
||||
thumb_cxx_example_01.cc \
|
||||
bubble_cxx_example_01.cc \
|
||||
button_cxx_example_00.cc
|
||||
endif
|
||||
#table_cxx_example_02.cc \
|
||||
|
@ -413,17 +410,12 @@ calendar_cxx_example_05 \
|
|||
clock_cxx_example \
|
||||
datetime_cxx_example \
|
||||
icon_cxx_example_01 \
|
||||
thumb_cxx_example_01 \
|
||||
separator_cxx_example_01 \
|
||||
bubble_cxx_example_01 \
|
||||
button_cxx_example_00
|
||||
# examples_PROGRAMS += \
|
||||
# thumb_cxx_example_01 \
|
||||
# table_cxx_example_02 \
|
||||
# table_cxx_example_01 \
|
||||
# spinner_cxx_example \
|
||||
# slider_cxx_example \
|
||||
# separator_cxx_example_01 \
|
||||
# radio_cxx_example_01 \
|
||||
# popup_cxx_example_01 \
|
||||
# menu_cxx_example_01 \
|
||||
|
@ -440,7 +432,6 @@ button_cxx_example_00
|
|||
# calendar_cxx_example_01 \
|
||||
# button_cxx_example_01 \
|
||||
# button_cxx_example_00 \
|
||||
# bubble_cxx_example_01 \
|
||||
# box_cxx_example_02 \
|
||||
# bg_cxx_example_02 \
|
||||
# bg_cxx_example_01
|
||||
|
@ -469,15 +460,11 @@ calendar_cxx_example_02_SOURCES = calendar_cxx_example_02.cc
|
|||
calendar_cxx_example_01_SOURCES = calendar_cxx_example_01.cc
|
||||
bg_cxx_example_02_SOURCES = bg_cxx_example_02.cc
|
||||
bg_cxx_example_01_SOURCES = bg_cxx_example_01.cc
|
||||
thumb_cxx_example_01_SOURCES = thumb_cxx_example_01.cc
|
||||
separator_cxx_example_01_SOURCES = separator_cxx_example_01.cc
|
||||
bubble_cxx_example_01_SOURCES = bubble_cxx_example_01.cc
|
||||
button_cxx_example_00_SOURCES = button_cxx_example_00.cc
|
||||
# table_cxx_example_02_SOURCES = table_cxx_example_02.cc
|
||||
# table_cxx_example_01_SOURCES = table_cxx_example_01.cc
|
||||
# spinner_cxx_example_SOURCES = spinner_cxx_example.cc
|
||||
# slider_cxx_example_SOURCES = slider_cxx_example.cc
|
||||
# separator_cxx_example_01_SOURCES = separator_cxx_example_01.cc
|
||||
# radio_cxx_example_01_SOURCES = radio_cxx_example_01.cc
|
||||
# popup_cxx_example_01_SOURCES = popup_cxx_example_01.cc
|
||||
# menu_cxx_example_01_SOURCES = menu_cxx_example_01.cc
|
||||
|
@ -494,7 +481,6 @@ button_cxx_example_00_SOURCES = button_cxx_example_00.cc
|
|||
# calendar_cxx_example_01_SOURCES = calendar_cxx_example_01.cc
|
||||
# button_cxx_example_01_SOURCES = button_cxx_example_01.cc
|
||||
# button_cxx_example_00_SOURCES = button_cxx_example_00.cc
|
||||
# bubble_cxx_example_01_SOURCES = bubble_cxx_example_01.cc
|
||||
# box_cxx_example_02_SOURCES = box_cxx_example_02.cc
|
||||
# bg_cxx_example_02_SOURCES = bg_cxx_example_02.cc
|
||||
# bg_cxx_example_01_SOURCES = bg_cxx_example_01.cc
|
||||
|
@ -590,7 +576,6 @@ if HAVE_CXX11
|
|||
SCREENSHOTS += \
|
||||
bg_cxx_example_02:bg_cxx_example_02.png:0.0 \
|
||||
box_cxx_example_02:box_cxx_example_02.png:1.3 \
|
||||
bubble_cxx_example_01:bubble_cxx_example_01.png:0.0 \
|
||||
button_cxx_example_00:button_cxx_example_00.png:0.0 \
|
||||
button_cxx_example_01:button_cxx_example_01.png:0.0 \
|
||||
calendar_cxx_example_01:calendar_cxx_example_01.png:0.0 \
|
||||
|
@ -606,12 +591,10 @@ SCREENSHOTS += \
|
|||
popup_cxx_example_01:popup_cxx_example_01.png:1.0 \
|
||||
popup_cxx_example_01:popup_cxx_example_01_a.png:6.0 \
|
||||
radio_cxx_example_01:radio_cxx_example_01.png:0.0 \
|
||||
separator_cxx_example_01:separator_cxx_example_01.png:0.0 \
|
||||
slider_cxx_example:slider_cxx_example.png:0.0 \
|
||||
spinner_cxx_example:spinner_cxx_example.png:0.0 \
|
||||
table_cxx_example_01:table_cxx_example_01.png:0.0 \
|
||||
table_cxx_example_02:table_cxx_example_02.png:0.0 \
|
||||
thumb_cxx_example_01:thumb_cxx_example_01.png:0.5
|
||||
table_cxx_example_02:table_cxx_example_02.png:0.0
|
||||
endif
|
||||
|
||||
HTML_SS_DIR=$(top_builddir)/doc/html/screenshots
|
||||
|
|
|
@ -1,66 +0,0 @@
|
|||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#include "elementary_config.h"
|
||||
#endif
|
||||
|
||||
#include <Elementary.hh>
|
||||
#include <Evas.hh>
|
||||
|
||||
EAPI_MAIN int
|
||||
elm_main (int argc, char *argv[])
|
||||
{
|
||||
elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_HIDDEN);
|
||||
|
||||
efl::ui::win::Standard win;
|
||||
// win.title_set("Bubble");
|
||||
win.autohide_set(true);
|
||||
|
||||
::elm::Label label1(win);
|
||||
label1.text_set(nullptr, "Bubble with no icon, info or label");
|
||||
label1.visible_set(true);
|
||||
|
||||
//::evas::Rectangle icon(efl::eo::parent = win);
|
||||
elm::Icon icon(win);
|
||||
icon.eo_cxx::efl::Gfx::color_set( 0, 0, 255, 255);
|
||||
icon.visible_set(true);
|
||||
|
||||
::elm::Bubble bubble1(win);
|
||||
efl::Container xxx = efl::eo::downcast<efl::Container>
|
||||
(bubble1.part("icon"));
|
||||
xxx.content_set(icon);
|
||||
// bubble1.part_content_set("icon", icon);
|
||||
bubble1.text_set("info", "INFO");
|
||||
bubble1.text_set(nullptr, "LABEL");
|
||||
bubble1.content_set(label1);
|
||||
bubble1.eo_cxx::efl::Gfx::size_set(300, 100);
|
||||
bubble1.visible_set(true);
|
||||
|
||||
auto on_click = std::bind([&] ()
|
||||
{
|
||||
static unsigned char corner = 0;
|
||||
++corner;
|
||||
if (corner > 3)
|
||||
bubble1.pos_set(ELM_BUBBLE_POS_TOP_LEFT);
|
||||
else
|
||||
bubble1.pos_set(static_cast<Elm_Bubble_Pos>(corner));
|
||||
});
|
||||
|
||||
efl::eolian::event_add(/*bubble1.clicked_event*/efl::ui::Clickable::clicked_event, bubble1, on_click);
|
||||
|
||||
::elm::Label label2(win);
|
||||
label2.text_set(nullptr, "Bubble with no icon, info or label");
|
||||
label2.visible_set(true);
|
||||
|
||||
::elm::Bubble bubble2(win);
|
||||
bubble2.content_set(label2);
|
||||
bubble2.eo_cxx::efl::Gfx::size_set(200, 50);
|
||||
bubble2.eo_cxx::efl::Gfx::position_set(0, 110);
|
||||
bubble2.visible_set(true);
|
||||
|
||||
win.eo_cxx::efl::Gfx::size_set(300, 200);
|
||||
win.visible_set(true);
|
||||
|
||||
elm_run();
|
||||
return 0;
|
||||
}
|
||||
ELM_MAIN()
|
|
@ -1,54 +0,0 @@
|
|||
|
||||
#include <Elementary.hh>
|
||||
#include <Evas.hh>
|
||||
|
||||
EAPI_MAIN int
|
||||
elm_main (int argc, char *argv[])
|
||||
{
|
||||
elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_HIDDEN);
|
||||
|
||||
::efl::ui::win::Standard win;
|
||||
//win.title_set("Separator");
|
||||
win.autohide_set(true);
|
||||
|
||||
::efl::ui::Box bx(win);
|
||||
bx.eo_cxx::efl::Orientation::orientation_set(EFL_ORIENT_HORIZONTAL);
|
||||
//bx.horizontal_set(true);
|
||||
// bx.size_hint_weight_set(EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
//win.resize_object_add(bx);
|
||||
bx.eo_cxx::efl::Gfx::size_set(200,200);
|
||||
bx.visible_set(true);
|
||||
|
||||
efl::canvas::Rectangle rect(win);
|
||||
rect.color_set( 0, 255, 0, 255);
|
||||
// rect.size_hint_min_set( 90, 200);
|
||||
// rect.size_hint_weight_set(EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
// rect.size_hint_align_set(EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||
rect.visible_set(true);
|
||||
rect.eo_cxx::efl::Gfx::size_set(20,20);
|
||||
bx.pack_end(rect);
|
||||
|
||||
::elm::Separator separator(win);
|
||||
separator.eo_cxx::efl::Orientation::orientation_set(EFL_ORIENT_HORIZONTAL);
|
||||
// separator.horizontal_set(true);
|
||||
separator.visible_set(true);
|
||||
separator.eo_cxx::efl::Gfx::size_set(200,200);
|
||||
bx.pack_end(separator);
|
||||
|
||||
efl::canvas::Rectangle rect2(win);
|
||||
rect2.color_set( 0, 0, 255, 255);
|
||||
// rect2.size_hint_min_set( 90, 200);
|
||||
// rect2.size_hint_weight_set(EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
// rect2.size_hint_align_set(EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||
rect2.visible_set(true);
|
||||
rect2.eo_cxx::efl::Gfx::size_set(10,10);
|
||||
bx.pack_end(rect2);
|
||||
|
||||
win.eo_cxx::efl::Gfx::size_set(200,200);
|
||||
win.visible_set(true);
|
||||
|
||||
elm_run();
|
||||
return 0;
|
||||
}
|
||||
ELM_MAIN()
|
||||
|
|
@ -1,47 +0,0 @@
|
|||
#include <Elementary.hh>
|
||||
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
|
||||
EAPI_MAIN int
|
||||
elm_main(int argc, char *argv[])
|
||||
{
|
||||
elm_need_ethumb();
|
||||
|
||||
elm_app_info_set(reinterpret_cast<void*>(elm_main), "elementary", "images/plant_01.jpg");
|
||||
elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_HIDDEN);
|
||||
|
||||
efl::ui::win::Standard win;
|
||||
//win.title_set("Thumbnailer");
|
||||
win.autohide_set(true);
|
||||
|
||||
elm::Thumb thumb(win);
|
||||
|
||||
auto generation_started = std::bind([] { std::cout << "thumbnail generation started." << std::endl; });
|
||||
|
||||
auto generation_finished = std::bind([] { std::cout << "thumbnail generation finished." << std::endl; });
|
||||
|
||||
auto generation_error = std::bind([] { std::cout << "thumbnail generation error." << std::endl; });
|
||||
|
||||
efl::eolian::event_add(thumb.generate_start_event, thumb, generation_started);
|
||||
efl::eolian::event_add(thumb.generate_stop_event, thumb, generation_finished);
|
||||
efl::eolian::event_add(thumb.generate_error_event, thumb, generation_error);
|
||||
|
||||
std::stringstream ss;
|
||||
ss << elm_app_data_dir_get() << "/images/plant_01.jpg";
|
||||
thumb.file_set(ss.str(), "image");
|
||||
thumb.eo_cxx::efl::Gfx::size_set(160, 160);
|
||||
//thumb.reload();
|
||||
|
||||
// thumb.size_hint_weight_set(EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
//win.resize_object_add(thumb);
|
||||
thumb.visible_set(true);
|
||||
|
||||
win.eo_cxx::efl::Gfx::size_set(200, 200);
|
||||
win.visible_set(true);
|
||||
|
||||
elm_run();
|
||||
return 0;
|
||||
}
|
||||
ELM_MAIN()
|
||||
|
Loading…
Reference in New Issue