Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #ifndef EFL_BETA_API_SUPPORT
- #define EFL_BETA_API_SUPPORT
- #endif
- #ifndef EFL_EO_API_SUPPORT
- #define EFL_EO_API_SUPPORT
- #endif
- #ifndef ELM_INTERNAL_API_ARGESFSDFEFC
- #define ELM_INTERNAL_API_ARGESFSDFEFC
- #endif
- #include <Elementary.h>
- #include <Eo.h>
- #define ELM_WIDGET_PROTECTED
- #include "elm_widget.h"
- #include "elm_widget_container.h"
- #include "elm_interface_scrollable.h"
- void
- win_1_create()
- {
- Eo *win_1 = efl_add(EFL_UI_WIN_CLASS, NULL,
- efl_text_set(efl_added, "Label"),
- efl_ui_win_name_set(efl_added, "label"),
- efl_ui_win_type_set(efl_added, EFL_UI_WIN_BASIC));
- efl_ui_win_autodel_set(win_1, EINA_TRUE);
- efl_gfx_size_set(win_1, 320, 300);
- Eo *box_1 = elm_box_add(win_1);
- efl_gfx_size_hint_weight_set(box_1, 1, 1);
- Eo *label_1 = efl_add(ELM_LABEL_CLASS, box_1);
- elm_obj_widget_part_text_set(label_1, NULL, "<b>This is a small label</b>");
- efl_gfx_size_hint_weight_set(label_1, 0, 0);
- efl_gfx_size_hint_align_set(label_1, -1, -1);
- elm_box_pack_end(box_1, label_1);
- Eo *label_2 = efl_add(ELM_LABEL_CLASS, box_1);
- elm_obj_widget_part_text_set(label_2, NULL, "This is a larger label with newlines<br/>to make it bigger, bit it won't expand or wrap<br/>just be a block of text that can't change its<br/>formatting as it's fixed based on text<br/>");
- efl_gfx_size_hint_weight_set(label_2, 0, 0);
- efl_gfx_size_hint_align_set(label_2, -1, -1);
- elm_box_pack_end(box_1, label_2);
- Eo *label_3 = efl_add(ELM_LABEL_CLASS, box_1);
- elm_obj_label_line_wrap_set(label_3, ELM_WRAP_CHAR);
- elm_obj_widget_part_text_set(label_3, NULL, "<b>This is more text designed to line-wrap here as This object is resized horizontally. As it is resized vertically though, nothing should change. The amount of space allocated vertically should change as horizontal size changes.</b>");
- efl_gfx_size_hint_weight_set(label_3, 1, 0);
- efl_gfx_size_hint_align_set(label_3, -1, -1);
- elm_box_pack_end(box_1, label_3);
- Eo *label_4 = efl_add(ELM_LABEL_CLASS, box_1);
- elm_obj_widget_part_text_set(label_4, NULL, "This small label set to wrap");
- efl_gfx_size_hint_weight_set(label_4, 1, 0);
- efl_gfx_size_hint_align_set(label_4, -1, -1);
- elm_box_pack_end(box_1, label_4);
- Eo *label_5 = efl_add(ELM_LABEL_CLASS, box_1);
- elm_obj_widget_part_text_set(label_5, NULL, "You can also use all the default entry style tags, like <hilight>hilight</hilight>, <success>success</success>, <bigger>bigger</bigger>, <smaller>smaller</smaller>, etc...");
- elm_obj_label_line_wrap_set(label_5, ELM_WRAP_WORD);
- efl_gfx_size_hint_weight_set(label_5, 1, 0);
- efl_gfx_size_hint_align_set(label_5, -1, -1);
- elm_box_pack_end(box_1, label_5);
- efl_gfx_visible_set(win_1, EINA_TRUE);
- efl_content_set(win_1, box_1);
- }
- EAPI_MAIN void efl_main(void *data EINA_UNUSED, const Efl_Event *ev EINA_UNUSED)
- {
- win_1_create(NULL);
- }
- EFL_MAIN()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement