-#include <Elementary.h>
#ifdef HAVE_CONFIG_H
# include "elementary_config.h"
#endif
+#include <Elementary.h>
#ifndef ELM_LIB_QUICKLAUNCH
#define LIST_ITEM_MAX 20
void
test_panel(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
- Evas_Object *win, *bg, *panel, *bx, *vbx, *toolbar;
+ Evas_Object *win, *panel, *bx, *vbx, *toolbar;
Evas_Object *list;
- win = elm_win_add(NULL, "panel", ELM_WIN_BASIC);
- elm_win_title_set(win, "Panel");
+ win = elm_win_util_standard_add("panel", "Panel");
elm_win_autodel_set(win, EINA_TRUE);
- bg = elm_bg_add(win);
- elm_win_resize_object_add(win, bg);
- evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_show(bg);
-
vbx = elm_box_add(win);
elm_win_resize_object_add(win, vbx);
evas_object_size_hint_weight_set(vbx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(bx, EVAS_HINT_FILL, EVAS_HINT_FILL);
evas_object_show(bx);
- panel = elm_panel_add(win);
+ panel = elm_panel_add(vbx);
elm_panel_orient_set(panel, ELM_PANEL_ORIENT_TOP);
evas_object_size_hint_weight_set(panel, EVAS_HINT_EXPAND, 0);
evas_object_size_hint_align_set(panel, EVAS_HINT_FILL, EVAS_HINT_FILL);
- toolbar = elm_toolbar_add(win);
+ toolbar = elm_toolbar_add(panel);
elm_toolbar_homogeneous_set(toolbar, 0);
elm_toolbar_shrink_mode_set(toolbar, ELM_TOOLBAR_SHRINK_NONE);
evas_object_size_hint_weight_set(toolbar, EVAS_HINT_EXPAND, 0);
elm_box_pack_end(vbx, panel);
evas_object_show(panel);
- panel = elm_panel_add(win);
+ panel = elm_panel_add(bx);
elm_panel_orient_set(panel, ELM_PANEL_ORIENT_LEFT);
evas_object_size_hint_weight_set(panel, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(panel, 0, EVAS_HINT_FILL);
itc.func.state_get = _state_get;
itc.func.del = _item_del;
- list = elm_genlist_add(win);
+ list = elm_genlist_add(panel);
evas_object_size_hint_min_set(list, 100, -1);
evas_object_size_hint_weight_set(list, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(list, EVAS_HINT_FILL, EVAS_HINT_FILL);
_fill_list(list);
- panel = elm_panel_add(win);
+ panel = elm_panel_add(bx);
elm_panel_orient_set(panel, ELM_PANEL_ORIENT_RIGHT);
evas_object_size_hint_weight_set(panel, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(panel, 1, EVAS_HINT_FILL);
elm_panel_hidden_set(panel, EINA_TRUE);
- list = elm_genlist_add(win);
+ list = elm_genlist_add(panel);
evas_object_size_hint_min_set(list, 100, -1);
evas_object_size_hint_weight_set(list, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(list, EVAS_HINT_FILL, EVAS_HINT_FILL);
elm_box_pack_end(vbx, bx);
- panel = elm_panel_add(win);
+ panel = elm_panel_add(vbx);
elm_panel_orient_set(panel, ELM_PANEL_ORIENT_BOTTOM);
evas_object_size_hint_weight_set(panel, EVAS_HINT_EXPAND, 0);
evas_object_size_hint_align_set(panel, EVAS_HINT_FILL, EVAS_HINT_FILL);
elm_panel_hidden_set(panel, EINA_TRUE);
- toolbar = elm_toolbar_add(win);
+ toolbar = elm_toolbar_add(panel);
elm_toolbar_homogeneous_set(toolbar, 0);
elm_toolbar_shrink_mode_set(toolbar, ELM_TOOLBAR_SHRINK_NONE);
evas_object_size_hint_weight_set(toolbar, EVAS_HINT_EXPAND, 0);