2010-10-19 13:21:53 -07:00
|
|
|
#include <Elementary.h>
|
|
|
|
#ifdef HAVE_CONFIG_H
|
|
|
|
# include "elementary_config.h"
|
|
|
|
#endif
|
|
|
|
#ifndef ELM_LIB_QUICKLAUNCH
|
|
|
|
|
2011-10-13 23:05:44 -07:00
|
|
|
|
|
|
|
static void
|
2011-10-13 23:12:04 -07:00
|
|
|
_dismissed(void *data __UNUSED__, Evas_Object *obj, void *event_info __UNUSED__)
|
2011-10-13 23:05:44 -07:00
|
|
|
{
|
|
|
|
evas_object_del(obj);
|
|
|
|
}
|
|
|
|
|
2011-08-28 00:13:04 -07:00
|
|
|
static void
|
|
|
|
_print_current_dir(Evas_Object *obj)
|
|
|
|
{
|
|
|
|
Elm_Ctxpopup_Direction dir;
|
|
|
|
dir = elm_ctxpopup_direction_get(obj);
|
|
|
|
|
|
|
|
switch(dir)
|
|
|
|
{
|
|
|
|
case ELM_CTXPOPUP_DIRECTION_LEFT:
|
|
|
|
printf("ctxpopup direction: left!\n");
|
|
|
|
break;
|
|
|
|
case ELM_CTXPOPUP_DIRECTION_RIGHT:
|
|
|
|
printf("ctxpopup direction: right!\n");
|
|
|
|
break;
|
|
|
|
case ELM_CTXPOPUP_DIRECTION_UP:
|
|
|
|
printf("ctxpopup direction: up!\n");
|
|
|
|
break;
|
|
|
|
case ELM_CTXPOPUP_DIRECTION_DOWN:
|
|
|
|
printf("ctxpopup direction: down!\n");
|
|
|
|
break;
|
2011-09-14 00:50:05 -07:00
|
|
|
case ELM_CTXPOPUP_DIRECTION_UNKNOWN:
|
|
|
|
printf("ctxpopup direction: unknow!\n");
|
2011-08-28 00:13:04 -07:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2011-12-20 22:35:22 -08:00
|
|
|
static Eina_Bool
|
|
|
|
_ctxpopup_raise_timer_cb(void *data)
|
|
|
|
{
|
|
|
|
printf("Timer Called\n");
|
|
|
|
Evas_Object *ctxpopup = (Evas_Object *) data;
|
|
|
|
evas_object_raise(ctxpopup);
|
|
|
|
return EINA_FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
_btn_clicked(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
|
|
|
|
{
|
|
|
|
printf("Button Clicked\n");
|
|
|
|
Evas_Object *ctxpopup = (Evas_Object *) data;
|
|
|
|
Evas_Object *lb = elm_label_add(ctxpopup);
|
|
|
|
elm_label_line_wrap_set(lb, ELM_WRAP_CHAR);
|
|
|
|
elm_object_text_set(lb,
|
|
|
|
"<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."
|
|
|
|
"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>"
|
|
|
|
);
|
|
|
|
evas_object_resize(lb, 200, 400);
|
|
|
|
evas_object_show(lb);
|
|
|
|
|
|
|
|
ecore_timer_add(1.5, _ctxpopup_raise_timer_cb, ctxpopup);
|
|
|
|
}
|
|
|
|
|
From: ChunEon Park <chuneon.park@samsung.com>
Subject: [PATCH] elc_ctxpopup
Here code is for the ctxpopup.
Since the functionalities of ctxpopup are somewhat different,
I'm trying to overwrite the ctxpopup code entirely first.
The main reason is,
Original ctxpopup could determine it's size and position by itself.
Of course, upstreamed version supports this. But it can not be reduced
it's
size
And it supposes the arrow position to center of box edje.
Basically,
This version calculates it's box size first then find available space
from
the it's position.
The origin position of the box is not expected, it finds the available
positions.
But if there is not enough space to be shown, then it finds a best
direction
to be shown again.
In this case, it reduces it's size also as to be shown entirely.
Since the ctxpopup supports scroller, the reduced box could show the all
items also.
(The point is ctxpopup should know the size of total items...)
I'm not sure the upstreamed version could cover the above scenario,
If then, I need to modify it first.
(fixed some minor formatting issue too)
SVN revision: 56021
2011-01-10 00:59:40 -08:00
|
|
|
static void
|
2011-12-20 22:35:22 -08:00
|
|
|
_ctxpopup_item_cb(void *data , Evas_Object *obj __UNUSED__, void *event_info)
|
From: ChunEon Park <chuneon.park@samsung.com>
Subject: [PATCH] elc_ctxpopup
Here code is for the ctxpopup.
Since the functionalities of ctxpopup are somewhat different,
I'm trying to overwrite the ctxpopup code entirely first.
The main reason is,
Original ctxpopup could determine it's size and position by itself.
Of course, upstreamed version supports this. But it can not be reduced
it's
size
And it supposes the arrow position to center of box edje.
Basically,
This version calculates it's box size first then find available space
from
the it's position.
The origin position of the box is not expected, it finds the available
positions.
But if there is not enough space to be shown, then it finds a best
direction
to be shown again.
In this case, it reduces it's size also as to be shown entirely.
Since the ctxpopup supports scroller, the reduced box could show the all
items also.
(The point is ctxpopup should know the size of total items...)
I'm not sure the upstreamed version could cover the above scenario,
If then, I need to modify it first.
(fixed some minor formatting issue too)
SVN revision: 56021
2011-01-10 00:59:40 -08:00
|
|
|
{
|
|
|
|
printf("ctxpopup item selected: %s\n",
|
2011-11-16 18:16:38 -08:00
|
|
|
elm_object_item_text_get(event_info));
|
From: ChunEon Park <chuneon.park@samsung.com>
Subject: [PATCH] elc_ctxpopup
Here code is for the ctxpopup.
Since the functionalities of ctxpopup are somewhat different,
I'm trying to overwrite the ctxpopup code entirely first.
The main reason is,
Original ctxpopup could determine it's size and position by itself.
Of course, upstreamed version supports this. But it can not be reduced
it's
size
And it supposes the arrow position to center of box edje.
Basically,
This version calculates it's box size first then find available space
from
the it's position.
The origin position of the box is not expected, it finds the available
positions.
But if there is not enough space to be shown, then it finds a best
direction
to be shown again.
In this case, it reduces it's size also as to be shown entirely.
Since the ctxpopup supports scroller, the reduced box could show the all
items also.
(The point is ctxpopup should know the size of total items...)
I'm not sure the upstreamed version could cover the above scenario,
If then, I need to modify it first.
(fixed some minor formatting issue too)
SVN revision: 56021
2011-01-10 00:59:40 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
#define ITEM_NEW(_hov, _label, _icon) \
|
|
|
|
if(_icon) \
|
|
|
|
{ \
|
|
|
|
ic = elm_icon_add(obj); \
|
|
|
|
elm_icon_standard_set(ic, _icon); \
|
|
|
|
elm_icon_scale_set(ic, EINA_FALSE, EINA_FALSE); \
|
|
|
|
} \
|
|
|
|
else \
|
|
|
|
ic = NULL; \
|
|
|
|
it = elm_ctxpopup_item_append(_hov, _label, ic, _ctxpopup_item_cb, NULL); \
|
|
|
|
|
2010-10-19 13:21:53 -07:00
|
|
|
static void
|
2011-01-11 01:58:34 -08:00
|
|
|
_list_item_cb(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
|
2010-10-19 13:21:53 -07:00
|
|
|
{
|
From: ChunEon Park <chuneon.park@samsung.com>
Subject: [PATCH] elc_ctxpopup
Here code is for the ctxpopup.
Since the functionalities of ctxpopup are somewhat different,
I'm trying to overwrite the ctxpopup code entirely first.
The main reason is,
Original ctxpopup could determine it's size and position by itself.
Of course, upstreamed version supports this. But it can not be reduced
it's
size
And it supposes the arrow position to center of box edje.
Basically,
This version calculates it's box size first then find available space
from
the it's position.
The origin position of the box is not expected, it finds the available
positions.
But if there is not enough space to be shown, then it finds a best
direction
to be shown again.
In this case, it reduces it's size also as to be shown entirely.
Since the ctxpopup supports scroller, the reduced box could show the all
items also.
(The point is ctxpopup should know the size of total items...)
I'm not sure the upstreamed version could cover the above scenario,
If then, I need to modify it first.
(fixed some minor formatting issue too)
SVN revision: 56021
2011-01-10 00:59:40 -08:00
|
|
|
Evas_Object *ctxpopup, *ic;
|
2011-08-13 20:36:56 -07:00
|
|
|
Elm_Object_Item *it;
|
From: ChunEon Park <chuneon.park@samsung.com>
Subject: [PATCH] elc_ctxpopup
Here code is for the ctxpopup.
Since the functionalities of ctxpopup are somewhat different,
I'm trying to overwrite the ctxpopup code entirely first.
The main reason is,
Original ctxpopup could determine it's size and position by itself.
Of course, upstreamed version supports this. But it can not be reduced
it's
size
And it supposes the arrow position to center of box edje.
Basically,
This version calculates it's box size first then find available space
from
the it's position.
The origin position of the box is not expected, it finds the available
positions.
But if there is not enough space to be shown, then it finds a best
direction
to be shown again.
In this case, it reduces it's size also as to be shown entirely.
Since the ctxpopup supports scroller, the reduced box could show the all
items also.
(The point is ctxpopup should know the size of total items...)
I'm not sure the upstreamed version could cover the above scenario,
If then, I need to modify it first.
(fixed some minor formatting issue too)
SVN revision: 56021
2011-01-10 00:59:40 -08:00
|
|
|
Evas_Coord x,y;
|
|
|
|
|
|
|
|
ctxpopup = elm_ctxpopup_add(obj);
|
2011-10-13 23:05:44 -07:00
|
|
|
evas_object_smart_callback_add(ctxpopup,
|
|
|
|
"dismissed",
|
2011-10-13 23:12:04 -07:00
|
|
|
_dismissed,
|
2011-10-13 23:05:44 -07:00
|
|
|
NULL);
|
From: ChunEon Park <chuneon.park@samsung.com>
Subject: [PATCH] elc_ctxpopup
Here code is for the ctxpopup.
Since the functionalities of ctxpopup are somewhat different,
I'm trying to overwrite the ctxpopup code entirely first.
The main reason is,
Original ctxpopup could determine it's size and position by itself.
Of course, upstreamed version supports this. But it can not be reduced
it's
size
And it supposes the arrow position to center of box edje.
Basically,
This version calculates it's box size first then find available space
from
the it's position.
The origin position of the box is not expected, it finds the available
positions.
But if there is not enough space to be shown, then it finds a best
direction
to be shown again.
In this case, it reduces it's size also as to be shown entirely.
Since the ctxpopup supports scroller, the reduced box could show the all
items also.
(The point is ctxpopup should know the size of total items...)
I'm not sure the upstreamed version could cover the above scenario,
If then, I need to modify it first.
(fixed some minor formatting issue too)
SVN revision: 56021
2011-01-10 00:59:40 -08:00
|
|
|
|
|
|
|
ITEM_NEW(ctxpopup, "Go to home folder", "home");
|
|
|
|
ITEM_NEW(ctxpopup, "Save file", "file");
|
|
|
|
ITEM_NEW(ctxpopup, "Delete file", "delete");
|
|
|
|
ITEM_NEW(ctxpopup, "Navigate to folder", "folder");
|
2011-11-16 18:16:38 -08:00
|
|
|
elm_object_item_disabled_set(it, EINA_TRUE);
|
From: ChunEon Park <chuneon.park@samsung.com>
Subject: [PATCH] elc_ctxpopup
Here code is for the ctxpopup.
Since the functionalities of ctxpopup are somewhat different,
I'm trying to overwrite the ctxpopup code entirely first.
The main reason is,
Original ctxpopup could determine it's size and position by itself.
Of course, upstreamed version supports this. But it can not be reduced
it's
size
And it supposes the arrow position to center of box edje.
Basically,
This version calculates it's box size first then find available space
from
the it's position.
The origin position of the box is not expected, it finds the available
positions.
But if there is not enough space to be shown, then it finds a best
direction
to be shown again.
In this case, it reduces it's size also as to be shown entirely.
Since the ctxpopup supports scroller, the reduced box could show the all
items also.
(The point is ctxpopup should know the size of total items...)
I'm not sure the upstreamed version could cover the above scenario,
If then, I need to modify it first.
(fixed some minor formatting issue too)
SVN revision: 56021
2011-01-10 00:59:40 -08:00
|
|
|
ITEM_NEW(ctxpopup, "Edit entry", "edit");
|
|
|
|
ITEM_NEW(ctxpopup, "Set date and time", "clock");
|
2011-11-16 18:16:38 -08:00
|
|
|
elm_object_item_disabled_set(it, EINA_TRUE);
|
From: ChunEon Park <chuneon.park@samsung.com>
Subject: [PATCH] elc_ctxpopup
Here code is for the ctxpopup.
Since the functionalities of ctxpopup are somewhat different,
I'm trying to overwrite the ctxpopup code entirely first.
The main reason is,
Original ctxpopup could determine it's size and position by itself.
Of course, upstreamed version supports this. But it can not be reduced
it's
size
And it supposes the arrow position to center of box edje.
Basically,
This version calculates it's box size first then find available space
from
the it's position.
The origin position of the box is not expected, it finds the available
positions.
But if there is not enough space to be shown, then it finds a best
direction
to be shown again.
In this case, it reduces it's size also as to be shown entirely.
Since the ctxpopup supports scroller, the reduced box could show the all
items also.
(The point is ctxpopup should know the size of total items...)
I'm not sure the upstreamed version could cover the above scenario,
If then, I need to modify it first.
(fixed some minor formatting issue too)
SVN revision: 56021
2011-01-10 00:59:40 -08:00
|
|
|
|
2011-06-13 04:26:08 -07:00
|
|
|
evas_pointer_canvas_xy_get(evas_object_evas_get(obj), &x, &y);
|
From: ChunEon Park <chuneon.park@samsung.com>
Subject: [PATCH] elc_ctxpopup
Here code is for the ctxpopup.
Since the functionalities of ctxpopup are somewhat different,
I'm trying to overwrite the ctxpopup code entirely first.
The main reason is,
Original ctxpopup could determine it's size and position by itself.
Of course, upstreamed version supports this. But it can not be reduced
it's
size
And it supposes the arrow position to center of box edje.
Basically,
This version calculates it's box size first then find available space
from
the it's position.
The origin position of the box is not expected, it finds the available
positions.
But if there is not enough space to be shown, then it finds a best
direction
to be shown again.
In this case, it reduces it's size also as to be shown entirely.
Since the ctxpopup supports scroller, the reduced box could show the all
items also.
(The point is ctxpopup should know the size of total items...)
I'm not sure the upstreamed version could cover the above scenario,
If then, I need to modify it first.
(fixed some minor formatting issue too)
SVN revision: 56021
2011-01-10 00:59:40 -08:00
|
|
|
evas_object_size_hint_max_set(ctxpopup, 240, 240);
|
|
|
|
evas_object_move(ctxpopup, x, y);
|
|
|
|
evas_object_show(ctxpopup);
|
2011-08-28 00:13:04 -07:00
|
|
|
_print_current_dir(ctxpopup);
|
From: ChunEon Park <chuneon.park@samsung.com>
Subject: [PATCH] elc_ctxpopup
Here code is for the ctxpopup.
Since the functionalities of ctxpopup are somewhat different,
I'm trying to overwrite the ctxpopup code entirely first.
The main reason is,
Original ctxpopup could determine it's size and position by itself.
Of course, upstreamed version supports this. But it can not be reduced
it's
size
And it supposes the arrow position to center of box edje.
Basically,
This version calculates it's box size first then find available space
from
the it's position.
The origin position of the box is not expected, it finds the available
positions.
But if there is not enough space to be shown, then it finds a best
direction
to be shown again.
In this case, it reduces it's size also as to be shown entirely.
Since the ctxpopup supports scroller, the reduced box could show the all
items also.
(The point is ctxpopup should know the size of total items...)
I'm not sure the upstreamed version could cover the above scenario,
If then, I need to modify it first.
(fixed some minor formatting issue too)
SVN revision: 56021
2011-01-10 00:59:40 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2011-01-11 01:58:34 -08:00
|
|
|
_list_item_cb2(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
|
From: ChunEon Park <chuneon.park@samsung.com>
Subject: [PATCH] elc_ctxpopup
Here code is for the ctxpopup.
Since the functionalities of ctxpopup are somewhat different,
I'm trying to overwrite the ctxpopup code entirely first.
The main reason is,
Original ctxpopup could determine it's size and position by itself.
Of course, upstreamed version supports this. But it can not be reduced
it's
size
And it supposes the arrow position to center of box edje.
Basically,
This version calculates it's box size first then find available space
from
the it's position.
The origin position of the box is not expected, it finds the available
positions.
But if there is not enough space to be shown, then it finds a best
direction
to be shown again.
In this case, it reduces it's size also as to be shown entirely.
Since the ctxpopup supports scroller, the reduced box could show the all
items also.
(The point is ctxpopup should know the size of total items...)
I'm not sure the upstreamed version could cover the above scenario,
If then, I need to modify it first.
(fixed some minor formatting issue too)
SVN revision: 56021
2011-01-10 00:59:40 -08:00
|
|
|
{
|
|
|
|
Evas_Object *ctxpopup, *ic;
|
2011-08-13 20:36:56 -07:00
|
|
|
Elm_Object_Item *it;
|
From: ChunEon Park <chuneon.park@samsung.com>
Subject: [PATCH] elc_ctxpopup
Here code is for the ctxpopup.
Since the functionalities of ctxpopup are somewhat different,
I'm trying to overwrite the ctxpopup code entirely first.
The main reason is,
Original ctxpopup could determine it's size and position by itself.
Of course, upstreamed version supports this. But it can not be reduced
it's
size
And it supposes the arrow position to center of box edje.
Basically,
This version calculates it's box size first then find available space
from
the it's position.
The origin position of the box is not expected, it finds the available
positions.
But if there is not enough space to be shown, then it finds a best
direction
to be shown again.
In this case, it reduces it's size also as to be shown entirely.
Since the ctxpopup supports scroller, the reduced box could show the all
items also.
(The point is ctxpopup should know the size of total items...)
I'm not sure the upstreamed version could cover the above scenario,
If then, I need to modify it first.
(fixed some minor formatting issue too)
SVN revision: 56021
2011-01-10 00:59:40 -08:00
|
|
|
Evas_Coord x,y;
|
|
|
|
|
|
|
|
ctxpopup = elm_ctxpopup_add(obj);
|
2011-10-13 23:05:44 -07:00
|
|
|
evas_object_smart_callback_add(ctxpopup,
|
|
|
|
"dismissed",
|
2011-10-13 23:12:04 -07:00
|
|
|
_dismissed,
|
2011-10-13 23:05:44 -07:00
|
|
|
NULL);
|
From: ChunEon Park <chuneon.park@samsung.com>
Subject: [PATCH] elc_ctxpopup
Here code is for the ctxpopup.
Since the functionalities of ctxpopup are somewhat different,
I'm trying to overwrite the ctxpopup code entirely first.
The main reason is,
Original ctxpopup could determine it's size and position by itself.
Of course, upstreamed version supports this. But it can not be reduced
it's
size
And it supposes the arrow position to center of box edje.
Basically,
This version calculates it's box size first then find available space
from
the it's position.
The origin position of the box is not expected, it finds the available
positions.
But if there is not enough space to be shown, then it finds a best
direction
to be shown again.
In this case, it reduces it's size also as to be shown entirely.
Since the ctxpopup supports scroller, the reduced box could show the all
items also.
(The point is ctxpopup should know the size of total items...)
I'm not sure the upstreamed version could cover the above scenario,
If then, I need to modify it first.
(fixed some minor formatting issue too)
SVN revision: 56021
2011-01-10 00:59:40 -08:00
|
|
|
|
|
|
|
ITEM_NEW(ctxpopup, NULL, "home");
|
|
|
|
ITEM_NEW(ctxpopup, NULL, "file");
|
|
|
|
ITEM_NEW(ctxpopup, NULL, "delete");
|
|
|
|
ITEM_NEW(ctxpopup, NULL, "folder");
|
|
|
|
ITEM_NEW(ctxpopup, NULL, "edit");
|
2011-11-16 18:16:38 -08:00
|
|
|
elm_object_item_disabled_set(it, EINA_TRUE);
|
From: ChunEon Park <chuneon.park@samsung.com>
Subject: [PATCH] elc_ctxpopup
Here code is for the ctxpopup.
Since the functionalities of ctxpopup are somewhat different,
I'm trying to overwrite the ctxpopup code entirely first.
The main reason is,
Original ctxpopup could determine it's size and position by itself.
Of course, upstreamed version supports this. But it can not be reduced
it's
size
And it supposes the arrow position to center of box edje.
Basically,
This version calculates it's box size first then find available space
from
the it's position.
The origin position of the box is not expected, it finds the available
positions.
But if there is not enough space to be shown, then it finds a best
direction
to be shown again.
In this case, it reduces it's size also as to be shown entirely.
Since the ctxpopup supports scroller, the reduced box could show the all
items also.
(The point is ctxpopup should know the size of total items...)
I'm not sure the upstreamed version could cover the above scenario,
If then, I need to modify it first.
(fixed some minor formatting issue too)
SVN revision: 56021
2011-01-10 00:59:40 -08:00
|
|
|
ITEM_NEW(ctxpopup, NULL, "clock");
|
|
|
|
|
2011-06-13 04:26:08 -07:00
|
|
|
evas_pointer_canvas_xy_get(evas_object_evas_get(obj), &x, &y);
|
From: ChunEon Park <chuneon.park@samsung.com>
Subject: [PATCH] elc_ctxpopup
Here code is for the ctxpopup.
Since the functionalities of ctxpopup are somewhat different,
I'm trying to overwrite the ctxpopup code entirely first.
The main reason is,
Original ctxpopup could determine it's size and position by itself.
Of course, upstreamed version supports this. But it can not be reduced
it's
size
And it supposes the arrow position to center of box edje.
Basically,
This version calculates it's box size first then find available space
from
the it's position.
The origin position of the box is not expected, it finds the available
positions.
But if there is not enough space to be shown, then it finds a best
direction
to be shown again.
In this case, it reduces it's size also as to be shown entirely.
Since the ctxpopup supports scroller, the reduced box could show the all
items also.
(The point is ctxpopup should know the size of total items...)
I'm not sure the upstreamed version could cover the above scenario,
If then, I need to modify it first.
(fixed some minor formatting issue too)
SVN revision: 56021
2011-01-10 00:59:40 -08:00
|
|
|
evas_object_size_hint_max_set(ctxpopup, 240, 240);
|
|
|
|
evas_object_move(ctxpopup, x, y);
|
|
|
|
evas_object_show(ctxpopup);
|
2011-08-28 00:13:04 -07:00
|
|
|
_print_current_dir(ctxpopup);
|
2010-10-19 13:21:53 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2011-01-11 01:58:34 -08:00
|
|
|
_list_item_cb3(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
|
2010-10-19 13:21:53 -07:00
|
|
|
{
|
From: ChunEon Park <chuneon.park@samsung.com>
Subject: [PATCH] elc_ctxpopup
Here code is for the ctxpopup.
Since the functionalities of ctxpopup are somewhat different,
I'm trying to overwrite the ctxpopup code entirely first.
The main reason is,
Original ctxpopup could determine it's size and position by itself.
Of course, upstreamed version supports this. But it can not be reduced
it's
size
And it supposes the arrow position to center of box edje.
Basically,
This version calculates it's box size first then find available space
from
the it's position.
The origin position of the box is not expected, it finds the available
positions.
But if there is not enough space to be shown, then it finds a best
direction
to be shown again.
In this case, it reduces it's size also as to be shown entirely.
Since the ctxpopup supports scroller, the reduced box could show the all
items also.
(The point is ctxpopup should know the size of total items...)
I'm not sure the upstreamed version could cover the above scenario,
If then, I need to modify it first.
(fixed some minor formatting issue too)
SVN revision: 56021
2011-01-10 00:59:40 -08:00
|
|
|
Evas_Object *ctxpopup, *ic;
|
2011-08-13 20:36:56 -07:00
|
|
|
Elm_Object_Item *it;
|
From: ChunEon Park <chuneon.park@samsung.com>
Subject: [PATCH] elc_ctxpopup
Here code is for the ctxpopup.
Since the functionalities of ctxpopup are somewhat different,
I'm trying to overwrite the ctxpopup code entirely first.
The main reason is,
Original ctxpopup could determine it's size and position by itself.
Of course, upstreamed version supports this. But it can not be reduced
it's
size
And it supposes the arrow position to center of box edje.
Basically,
This version calculates it's box size first then find available space
from
the it's position.
The origin position of the box is not expected, it finds the available
positions.
But if there is not enough space to be shown, then it finds a best
direction
to be shown again.
In this case, it reduces it's size also as to be shown entirely.
Since the ctxpopup supports scroller, the reduced box could show the all
items also.
(The point is ctxpopup should know the size of total items...)
I'm not sure the upstreamed version could cover the above scenario,
If then, I need to modify it first.
(fixed some minor formatting issue too)
SVN revision: 56021
2011-01-10 00:59:40 -08:00
|
|
|
Evas_Coord x,y;
|
|
|
|
|
|
|
|
ctxpopup = elm_ctxpopup_add(obj);
|
2011-10-13 23:05:44 -07:00
|
|
|
evas_object_smart_callback_add(ctxpopup,
|
|
|
|
"dismissed",
|
2011-10-13 23:12:04 -07:00
|
|
|
_dismissed,
|
2011-10-13 23:05:44 -07:00
|
|
|
NULL);
|
From: ChunEon Park <chuneon.park@samsung.com>
Subject: [PATCH] elc_ctxpopup
Here code is for the ctxpopup.
Since the functionalities of ctxpopup are somewhat different,
I'm trying to overwrite the ctxpopup code entirely first.
The main reason is,
Original ctxpopup could determine it's size and position by itself.
Of course, upstreamed version supports this. But it can not be reduced
it's
size
And it supposes the arrow position to center of box edje.
Basically,
This version calculates it's box size first then find available space
from
the it's position.
The origin position of the box is not expected, it finds the available
positions.
But if there is not enough space to be shown, then it finds a best
direction
to be shown again.
In this case, it reduces it's size also as to be shown entirely.
Since the ctxpopup supports scroller, the reduced box could show the all
items also.
(The point is ctxpopup should know the size of total items...)
I'm not sure the upstreamed version could cover the above scenario,
If then, I need to modify it first.
(fixed some minor formatting issue too)
SVN revision: 56021
2011-01-10 00:59:40 -08:00
|
|
|
|
|
|
|
ITEM_NEW(ctxpopup, "Eina", NULL);
|
|
|
|
ITEM_NEW(ctxpopup, "Eet", NULL);
|
|
|
|
ITEM_NEW(ctxpopup, "Evas", NULL);
|
|
|
|
ITEM_NEW(ctxpopup, "Ecore", NULL);
|
2011-11-16 18:16:38 -08:00
|
|
|
elm_object_item_disabled_set(it, EINA_TRUE);
|
From: ChunEon Park <chuneon.park@samsung.com>
Subject: [PATCH] elc_ctxpopup
Here code is for the ctxpopup.
Since the functionalities of ctxpopup are somewhat different,
I'm trying to overwrite the ctxpopup code entirely first.
The main reason is,
Original ctxpopup could determine it's size and position by itself.
Of course, upstreamed version supports this. But it can not be reduced
it's
size
And it supposes the arrow position to center of box edje.
Basically,
This version calculates it's box size first then find available space
from
the it's position.
The origin position of the box is not expected, it finds the available
positions.
But if there is not enough space to be shown, then it finds a best
direction
to be shown again.
In this case, it reduces it's size also as to be shown entirely.
Since the ctxpopup supports scroller, the reduced box could show the all
items also.
(The point is ctxpopup should know the size of total items...)
I'm not sure the upstreamed version could cover the above scenario,
If then, I need to modify it first.
(fixed some minor formatting issue too)
SVN revision: 56021
2011-01-10 00:59:40 -08:00
|
|
|
ITEM_NEW(ctxpopup, "Embryo", NULL);
|
|
|
|
ITEM_NEW(ctxpopup, "Edje", NULL);
|
|
|
|
|
2011-06-13 04:26:08 -07:00
|
|
|
evas_pointer_canvas_xy_get(evas_object_evas_get(obj), &x, &y);
|
From: ChunEon Park <chuneon.park@samsung.com>
Subject: [PATCH] elc_ctxpopup
Here code is for the ctxpopup.
Since the functionalities of ctxpopup are somewhat different,
I'm trying to overwrite the ctxpopup code entirely first.
The main reason is,
Original ctxpopup could determine it's size and position by itself.
Of course, upstreamed version supports this. But it can not be reduced
it's
size
And it supposes the arrow position to center of box edje.
Basically,
This version calculates it's box size first then find available space
from
the it's position.
The origin position of the box is not expected, it finds the available
positions.
But if there is not enough space to be shown, then it finds a best
direction
to be shown again.
In this case, it reduces it's size also as to be shown entirely.
Since the ctxpopup supports scroller, the reduced box could show the all
items also.
(The point is ctxpopup should know the size of total items...)
I'm not sure the upstreamed version could cover the above scenario,
If then, I need to modify it first.
(fixed some minor formatting issue too)
SVN revision: 56021
2011-01-10 00:59:40 -08:00
|
|
|
evas_object_move(ctxpopup, x, y);
|
|
|
|
evas_object_show(ctxpopup);
|
2011-08-28 00:13:04 -07:00
|
|
|
_print_current_dir(ctxpopup);
|
From: ChunEon Park <chuneon.park@samsung.com>
Subject: [PATCH] elc_ctxpopup
Here code is for the ctxpopup.
Since the functionalities of ctxpopup are somewhat different,
I'm trying to overwrite the ctxpopup code entirely first.
The main reason is,
Original ctxpopup could determine it's size and position by itself.
Of course, upstreamed version supports this. But it can not be reduced
it's
size
And it supposes the arrow position to center of box edje.
Basically,
This version calculates it's box size first then find available space
from
the it's position.
The origin position of the box is not expected, it finds the available
positions.
But if there is not enough space to be shown, then it finds a best
direction
to be shown again.
In this case, it reduces it's size also as to be shown entirely.
Since the ctxpopup supports scroller, the reduced box could show the all
items also.
(The point is ctxpopup should know the size of total items...)
I'm not sure the upstreamed version could cover the above scenario,
If then, I need to modify it first.
(fixed some minor formatting issue too)
SVN revision: 56021
2011-01-10 00:59:40 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2011-01-11 01:58:34 -08:00
|
|
|
_list_item_cb4(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
|
From: ChunEon Park <chuneon.park@samsung.com>
Subject: [PATCH] elc_ctxpopup
Here code is for the ctxpopup.
Since the functionalities of ctxpopup are somewhat different,
I'm trying to overwrite the ctxpopup code entirely first.
The main reason is,
Original ctxpopup could determine it's size and position by itself.
Of course, upstreamed version supports this. But it can not be reduced
it's
size
And it supposes the arrow position to center of box edje.
Basically,
This version calculates it's box size first then find available space
from
the it's position.
The origin position of the box is not expected, it finds the available
positions.
But if there is not enough space to be shown, then it finds a best
direction
to be shown again.
In this case, it reduces it's size also as to be shown entirely.
Since the ctxpopup supports scroller, the reduced box could show the all
items also.
(The point is ctxpopup should know the size of total items...)
I'm not sure the upstreamed version could cover the above scenario,
If then, I need to modify it first.
(fixed some minor formatting issue too)
SVN revision: 56021
2011-01-10 00:59:40 -08:00
|
|
|
{
|
|
|
|
Evas_Object *ctxpopup, *ic;
|
2011-08-13 20:36:56 -07:00
|
|
|
Elm_Object_Item *it;
|
From: ChunEon Park <chuneon.park@samsung.com>
Subject: [PATCH] elc_ctxpopup
Here code is for the ctxpopup.
Since the functionalities of ctxpopup are somewhat different,
I'm trying to overwrite the ctxpopup code entirely first.
The main reason is,
Original ctxpopup could determine it's size and position by itself.
Of course, upstreamed version supports this. But it can not be reduced
it's
size
And it supposes the arrow position to center of box edje.
Basically,
This version calculates it's box size first then find available space
from
the it's position.
The origin position of the box is not expected, it finds the available
positions.
But if there is not enough space to be shown, then it finds a best
direction
to be shown again.
In this case, it reduces it's size also as to be shown entirely.
Since the ctxpopup supports scroller, the reduced box could show the all
items also.
(The point is ctxpopup should know the size of total items...)
I'm not sure the upstreamed version could cover the above scenario,
If then, I need to modify it first.
(fixed some minor formatting issue too)
SVN revision: 56021
2011-01-10 00:59:40 -08:00
|
|
|
Evas_Coord x,y;
|
|
|
|
|
|
|
|
ctxpopup = elm_ctxpopup_add(obj);
|
2011-10-13 23:05:44 -07:00
|
|
|
evas_object_smart_callback_add(ctxpopup,
|
|
|
|
"dismissed",
|
2011-10-13 23:12:04 -07:00
|
|
|
_dismissed,
|
2011-10-13 23:05:44 -07:00
|
|
|
NULL);
|
|
|
|
|
From: ChunEon Park <chuneon.park@samsung.com>
Subject: [PATCH] elc_ctxpopup
Here code is for the ctxpopup.
Since the functionalities of ctxpopup are somewhat different,
I'm trying to overwrite the ctxpopup code entirely first.
The main reason is,
Original ctxpopup could determine it's size and position by itself.
Of course, upstreamed version supports this. But it can not be reduced
it's
size
And it supposes the arrow position to center of box edje.
Basically,
This version calculates it's box size first then find available space
from
the it's position.
The origin position of the box is not expected, it finds the available
positions.
But if there is not enough space to be shown, then it finds a best
direction
to be shown again.
In this case, it reduces it's size also as to be shown entirely.
Since the ctxpopup supports scroller, the reduced box could show the all
items also.
(The point is ctxpopup should know the size of total items...)
I'm not sure the upstreamed version could cover the above scenario,
If then, I need to modify it first.
(fixed some minor formatting issue too)
SVN revision: 56021
2011-01-10 00:59:40 -08:00
|
|
|
elm_ctxpopup_horizontal_set(ctxpopup, EINA_TRUE);
|
|
|
|
|
|
|
|
ITEM_NEW(ctxpopup, NULL, "home");
|
|
|
|
ITEM_NEW(ctxpopup, NULL, "file");
|
|
|
|
ITEM_NEW(ctxpopup, NULL, "delete");
|
|
|
|
ITEM_NEW(ctxpopup, NULL, "folder");
|
|
|
|
ITEM_NEW(ctxpopup, NULL, "edit");
|
|
|
|
ITEM_NEW(ctxpopup, NULL, "clock");
|
|
|
|
|
2011-06-13 04:26:08 -07:00
|
|
|
evas_pointer_canvas_xy_get(evas_object_evas_get(obj), &x, &y);
|
From: ChunEon Park <chuneon.park@samsung.com>
Subject: [PATCH] elc_ctxpopup
Here code is for the ctxpopup.
Since the functionalities of ctxpopup are somewhat different,
I'm trying to overwrite the ctxpopup code entirely first.
The main reason is,
Original ctxpopup could determine it's size and position by itself.
Of course, upstreamed version supports this. But it can not be reduced
it's
size
And it supposes the arrow position to center of box edje.
Basically,
This version calculates it's box size first then find available space
from
the it's position.
The origin position of the box is not expected, it finds the available
positions.
But if there is not enough space to be shown, then it finds a best
direction
to be shown again.
In this case, it reduces it's size also as to be shown entirely.
Since the ctxpopup supports scroller, the reduced box could show the all
items also.
(The point is ctxpopup should know the size of total items...)
I'm not sure the upstreamed version could cover the above scenario,
If then, I need to modify it first.
(fixed some minor formatting issue too)
SVN revision: 56021
2011-01-10 00:59:40 -08:00
|
|
|
evas_object_size_hint_max_set(ctxpopup, 240, 240);
|
|
|
|
evas_object_move(ctxpopup, x, y);
|
|
|
|
evas_object_show(ctxpopup);
|
2011-08-28 00:13:04 -07:00
|
|
|
_print_current_dir(ctxpopup);
|
From: ChunEon Park <chuneon.park@samsung.com>
Subject: [PATCH] elc_ctxpopup
Here code is for the ctxpopup.
Since the functionalities of ctxpopup are somewhat different,
I'm trying to overwrite the ctxpopup code entirely first.
The main reason is,
Original ctxpopup could determine it's size and position by itself.
Of course, upstreamed version supports this. But it can not be reduced
it's
size
And it supposes the arrow position to center of box edje.
Basically,
This version calculates it's box size first then find available space
from
the it's position.
The origin position of the box is not expected, it finds the available
positions.
But if there is not enough space to be shown, then it finds a best
direction
to be shown again.
In this case, it reduces it's size also as to be shown entirely.
Since the ctxpopup supports scroller, the reduced box could show the all
items also.
(The point is ctxpopup should know the size of total items...)
I'm not sure the upstreamed version could cover the above scenario,
If then, I need to modify it first.
(fixed some minor formatting issue too)
SVN revision: 56021
2011-01-10 00:59:40 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static void
|
2011-01-11 01:58:34 -08:00
|
|
|
_list_item_cb5(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
|
From: ChunEon Park <chuneon.park@samsung.com>
Subject: [PATCH] elc_ctxpopup
Here code is for the ctxpopup.
Since the functionalities of ctxpopup are somewhat different,
I'm trying to overwrite the ctxpopup code entirely first.
The main reason is,
Original ctxpopup could determine it's size and position by itself.
Of course, upstreamed version supports this. But it can not be reduced
it's
size
And it supposes the arrow position to center of box edje.
Basically,
This version calculates it's box size first then find available space
from
the it's position.
The origin position of the box is not expected, it finds the available
positions.
But if there is not enough space to be shown, then it finds a best
direction
to be shown again.
In this case, it reduces it's size also as to be shown entirely.
Since the ctxpopup supports scroller, the reduced box could show the all
items also.
(The point is ctxpopup should know the size of total items...)
I'm not sure the upstreamed version could cover the above scenario,
If then, I need to modify it first.
(fixed some minor formatting issue too)
SVN revision: 56021
2011-01-10 00:59:40 -08:00
|
|
|
{
|
2011-02-03 00:23:19 -08:00
|
|
|
Evas_Object *ctxpopup, *btn, *sc, *bx;
|
From: ChunEon Park <chuneon.park@samsung.com>
Subject: [PATCH] elc_ctxpopup
Here code is for the ctxpopup.
Since the functionalities of ctxpopup are somewhat different,
I'm trying to overwrite the ctxpopup code entirely first.
The main reason is,
Original ctxpopup could determine it's size and position by itself.
Of course, upstreamed version supports this. But it can not be reduced
it's
size
And it supposes the arrow position to center of box edje.
Basically,
This version calculates it's box size first then find available space
from
the it's position.
The origin position of the box is not expected, it finds the available
positions.
But if there is not enough space to be shown, then it finds a best
direction
to be shown again.
In this case, it reduces it's size also as to be shown entirely.
Since the ctxpopup supports scroller, the reduced box could show the all
items also.
(The point is ctxpopup should know the size of total items...)
I'm not sure the upstreamed version could cover the above scenario,
If then, I need to modify it first.
(fixed some minor formatting issue too)
SVN revision: 56021
2011-01-10 00:59:40 -08:00
|
|
|
Evas_Coord x,y;
|
|
|
|
|
2011-02-03 00:23:19 -08:00
|
|
|
bx = elm_box_add(obj);
|
|
|
|
evas_object_size_hint_min_set(bx, 150, 150);
|
|
|
|
|
|
|
|
sc = elm_scroller_add(bx);
|
|
|
|
elm_scroller_bounce_set(sc, EINA_FALSE, EINA_TRUE);
|
|
|
|
evas_object_size_hint_fill_set(sc, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
|
|
|
evas_object_size_hint_weight_set(sc, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
|
|
|
evas_object_show(sc);
|
|
|
|
|
|
|
|
btn = elm_button_add(sc);
|
2011-06-29 00:11:54 -07:00
|
|
|
elm_object_text_set(btn, "Enlightenment");
|
2011-02-03 00:23:19 -08:00
|
|
|
evas_object_size_hint_min_set(btn, 140, 140);
|
|
|
|
|
2011-10-30 19:56:03 -07:00
|
|
|
elm_object_content_set(sc, btn);
|
2011-02-03 00:23:19 -08:00
|
|
|
|
|
|
|
elm_box_pack_end(bx, sc);
|
From: ChunEon Park <chuneon.park@samsung.com>
Subject: [PATCH] elc_ctxpopup
Here code is for the ctxpopup.
Since the functionalities of ctxpopup are somewhat different,
I'm trying to overwrite the ctxpopup code entirely first.
The main reason is,
Original ctxpopup could determine it's size and position by itself.
Of course, upstreamed version supports this. But it can not be reduced
it's
size
And it supposes the arrow position to center of box edje.
Basically,
This version calculates it's box size first then find available space
from
the it's position.
The origin position of the box is not expected, it finds the available
positions.
But if there is not enough space to be shown, then it finds a best
direction
to be shown again.
In this case, it reduces it's size also as to be shown entirely.
Since the ctxpopup supports scroller, the reduced box could show the all
items also.
(The point is ctxpopup should know the size of total items...)
I'm not sure the upstreamed version could cover the above scenario,
If then, I need to modify it first.
(fixed some minor formatting issue too)
SVN revision: 56021
2011-01-10 00:59:40 -08:00
|
|
|
|
|
|
|
ctxpopup = elm_ctxpopup_add(obj);
|
2011-10-13 23:05:44 -07:00
|
|
|
evas_object_smart_callback_add(ctxpopup,
|
|
|
|
"dismissed",
|
2011-10-13 23:12:04 -07:00
|
|
|
_dismissed,
|
2011-10-13 23:05:44 -07:00
|
|
|
NULL);
|
|
|
|
|
2011-08-03 02:32:15 -07:00
|
|
|
elm_object_content_set(ctxpopup, bx);
|
From: ChunEon Park <chuneon.park@samsung.com>
Subject: [PATCH] elc_ctxpopup
Here code is for the ctxpopup.
Since the functionalities of ctxpopup are somewhat different,
I'm trying to overwrite the ctxpopup code entirely first.
The main reason is,
Original ctxpopup could determine it's size and position by itself.
Of course, upstreamed version supports this. But it can not be reduced
it's
size
And it supposes the arrow position to center of box edje.
Basically,
This version calculates it's box size first then find available space
from
the it's position.
The origin position of the box is not expected, it finds the available
positions.
But if there is not enough space to be shown, then it finds a best
direction
to be shown again.
In this case, it reduces it's size also as to be shown entirely.
Since the ctxpopup supports scroller, the reduced box could show the all
items also.
(The point is ctxpopup should know the size of total items...)
I'm not sure the upstreamed version could cover the above scenario,
If then, I need to modify it first.
(fixed some minor formatting issue too)
SVN revision: 56021
2011-01-10 00:59:40 -08:00
|
|
|
|
2011-06-13 04:26:08 -07:00
|
|
|
evas_pointer_canvas_xy_get(evas_object_evas_get(obj), &x, &y);
|
From: ChunEon Park <chuneon.park@samsung.com>
Subject: [PATCH] elc_ctxpopup
Here code is for the ctxpopup.
Since the functionalities of ctxpopup are somewhat different,
I'm trying to overwrite the ctxpopup code entirely first.
The main reason is,
Original ctxpopup could determine it's size and position by itself.
Of course, upstreamed version supports this. But it can not be reduced
it's
size
And it supposes the arrow position to center of box edje.
Basically,
This version calculates it's box size first then find available space
from
the it's position.
The origin position of the box is not expected, it finds the available
positions.
But if there is not enough space to be shown, then it finds a best
direction
to be shown again.
In this case, it reduces it's size also as to be shown entirely.
Since the ctxpopup supports scroller, the reduced box could show the all
items also.
(The point is ctxpopup should know the size of total items...)
I'm not sure the upstreamed version could cover the above scenario,
If then, I need to modify it first.
(fixed some minor formatting issue too)
SVN revision: 56021
2011-01-10 00:59:40 -08:00
|
|
|
evas_object_move(ctxpopup, x, y);
|
|
|
|
evas_object_show(ctxpopup);
|
2011-08-28 00:13:04 -07:00
|
|
|
_print_current_dir(ctxpopup);
|
2011-12-20 22:35:22 -08:00
|
|
|
|
|
|
|
evas_object_smart_callback_add(btn, "clicked", _btn_clicked, ctxpopup);
|
2010-10-19 13:21:53 -07:00
|
|
|
}
|
|
|
|
|
From: ChunEon Park <chuneon.park@samsung.com>
Subject: [PATCH] elc_ctxpopup
Here code is for the ctxpopup.
Since the functionalities of ctxpopup are somewhat different,
I'm trying to overwrite the ctxpopup code entirely first.
The main reason is,
Original ctxpopup could determine it's size and position by itself.
Of course, upstreamed version supports this. But it can not be reduced
it's
size
And it supposes the arrow position to center of box edje.
Basically,
This version calculates it's box size first then find available space
from
the it's position.
The origin position of the box is not expected, it finds the available
positions.
But if there is not enough space to be shown, then it finds a best
direction
to be shown again.
In this case, it reduces it's size also as to be shown entirely.
Since the ctxpopup supports scroller, the reduced box could show the all
items also.
(The point is ctxpopup should know the size of total items...)
I'm not sure the upstreamed version could cover the above scenario,
If then, I need to modify it first.
(fixed some minor formatting issue too)
SVN revision: 56021
2011-01-10 00:59:40 -08:00
|
|
|
|
2010-10-19 13:21:53 -07:00
|
|
|
static void _list_clicked(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info)
|
|
|
|
{
|
|
|
|
elm_list_item_selected_set(event_info, EINA_FALSE);
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
2010-11-30 22:52:46 -08:00
|
|
|
test_ctxpopup(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
|
2010-10-19 13:21:53 -07:00
|
|
|
{
|
2011-01-11 01:58:34 -08:00
|
|
|
Evas_Object *win, *bg, *list;
|
2010-10-19 13:21:53 -07:00
|
|
|
|
2011-02-21 07:33:40 -08:00
|
|
|
win = elm_win_add(NULL, "Contextual Popup", ELM_WIN_BASIC);
|
From: ChunEon Park <chuneon.park@samsung.com>
Subject: [PATCH] elc_ctxpopup
Here code is for the ctxpopup.
Since the functionalities of ctxpopup are somewhat different,
I'm trying to overwrite the ctxpopup code entirely first.
The main reason is,
Original ctxpopup could determine it's size and position by itself.
Of course, upstreamed version supports this. But it can not be reduced
it's
size
And it supposes the arrow position to center of box edje.
Basically,
This version calculates it's box size first then find available space
from
the it's position.
The origin position of the box is not expected, it finds the available
positions.
But if there is not enough space to be shown, then it finds a best
direction
to be shown again.
In this case, it reduces it's size also as to be shown entirely.
Since the ctxpopup supports scroller, the reduced box could show the all
items also.
(The point is ctxpopup should know the size of total items...)
I'm not sure the upstreamed version could cover the above scenario,
If then, I need to modify it first.
(fixed some minor formatting issue too)
SVN revision: 56021
2011-01-10 00:59:40 -08:00
|
|
|
elm_win_title_set(win, "Contextual Popup");
|
2010-10-19 13:21:53 -07:00
|
|
|
elm_win_autodel_set(win, EINA_TRUE);
|
|
|
|
|
|
|
|
bg = elm_bg_add(win);
|
|
|
|
evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
|
|
|
elm_win_resize_object_add(win, bg);
|
|
|
|
evas_object_show(bg);
|
|
|
|
|
|
|
|
list = elm_list_add(win);
|
|
|
|
elm_win_resize_object_add(win, list);
|
2011-08-13 20:36:56 -07:00
|
|
|
evas_object_size_hint_weight_set(list, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
2010-10-19 13:21:53 -07:00
|
|
|
elm_list_mode_set(list, ELM_LIST_COMPRESS);
|
|
|
|
evas_object_smart_callback_add(list, "selected", _list_clicked, NULL);
|
|
|
|
|
|
|
|
#undef ITEM_NEW
|
2010-11-30 22:52:46 -08:00
|
|
|
elm_list_item_append(list, "Ctxpopup with icons and labels", NULL, NULL,
|
From: ChunEon Park <chuneon.park@samsung.com>
Subject: [PATCH] elc_ctxpopup
Here code is for the ctxpopup.
Since the functionalities of ctxpopup are somewhat different,
I'm trying to overwrite the ctxpopup code entirely first.
The main reason is,
Original ctxpopup could determine it's size and position by itself.
Of course, upstreamed version supports this. But it can not be reduced
it's
size
And it supposes the arrow position to center of box edje.
Basically,
This version calculates it's box size first then find available space
from
the it's position.
The origin position of the box is not expected, it finds the available
positions.
But if there is not enough space to be shown, then it finds a best
direction
to be shown again.
In this case, it reduces it's size also as to be shown entirely.
Since the ctxpopup supports scroller, the reduced box could show the all
items also.
(The point is ctxpopup should know the size of total items...)
I'm not sure the upstreamed version could cover the above scenario,
If then, I need to modify it first.
(fixed some minor formatting issue too)
SVN revision: 56021
2011-01-10 00:59:40 -08:00
|
|
|
_list_item_cb, NULL);
|
2010-11-30 22:52:46 -08:00
|
|
|
elm_list_item_append(list, "Ctxpopup with icons only", NULL, NULL,
|
From: ChunEon Park <chuneon.park@samsung.com>
Subject: [PATCH] elc_ctxpopup
Here code is for the ctxpopup.
Since the functionalities of ctxpopup are somewhat different,
I'm trying to overwrite the ctxpopup code entirely first.
The main reason is,
Original ctxpopup could determine it's size and position by itself.
Of course, upstreamed version supports this. But it can not be reduced
it's
size
And it supposes the arrow position to center of box edje.
Basically,
This version calculates it's box size first then find available space
from
the it's position.
The origin position of the box is not expected, it finds the available
positions.
But if there is not enough space to be shown, then it finds a best
direction
to be shown again.
In this case, it reduces it's size also as to be shown entirely.
Since the ctxpopup supports scroller, the reduced box could show the all
items also.
(The point is ctxpopup should know the size of total items...)
I'm not sure the upstreamed version could cover the above scenario,
If then, I need to modify it first.
(fixed some minor formatting issue too)
SVN revision: 56021
2011-01-10 00:59:40 -08:00
|
|
|
_list_item_cb2, NULL);
|
|
|
|
elm_list_item_append(list, "Ctxpopup with labels only", NULL, NULL,
|
|
|
|
_list_item_cb3, NULL);
|
2010-11-30 22:52:46 -08:00
|
|
|
elm_list_item_append(list, "Ctxpopup at horizontal mode", NULL, NULL,
|
From: ChunEon Park <chuneon.park@samsung.com>
Subject: [PATCH] elc_ctxpopup
Here code is for the ctxpopup.
Since the functionalities of ctxpopup are somewhat different,
I'm trying to overwrite the ctxpopup code entirely first.
The main reason is,
Original ctxpopup could determine it's size and position by itself.
Of course, upstreamed version supports this. But it can not be reduced
it's
size
And it supposes the arrow position to center of box edje.
Basically,
This version calculates it's box size first then find available space
from
the it's position.
The origin position of the box is not expected, it finds the available
positions.
But if there is not enough space to be shown, then it finds a best
direction
to be shown again.
In this case, it reduces it's size also as to be shown entirely.
Since the ctxpopup supports scroller, the reduced box could show the all
items also.
(The point is ctxpopup should know the size of total items...)
I'm not sure the upstreamed version could cover the above scenario,
If then, I need to modify it first.
(fixed some minor formatting issue too)
SVN revision: 56021
2011-01-10 00:59:40 -08:00
|
|
|
_list_item_cb4, NULL);
|
|
|
|
elm_list_item_append(list, "Ctxpopup with user content", NULL, NULL,
|
|
|
|
_list_item_cb5, NULL);
|
2010-10-19 13:21:53 -07:00
|
|
|
evas_object_show(list);
|
|
|
|
elm_list_go(list);
|
|
|
|
|
From: ChunEon Park <chuneon.park@samsung.com>
Subject: [PATCH] elc_ctxpopup
Here code is for the ctxpopup.
Since the functionalities of ctxpopup are somewhat different,
I'm trying to overwrite the ctxpopup code entirely first.
The main reason is,
Original ctxpopup could determine it's size and position by itself.
Of course, upstreamed version supports this. But it can not be reduced
it's
size
And it supposes the arrow position to center of box edje.
Basically,
This version calculates it's box size first then find available space
from
the it's position.
The origin position of the box is not expected, it finds the available
positions.
But if there is not enough space to be shown, then it finds a best
direction
to be shown again.
In this case, it reduces it's size also as to be shown entirely.
Since the ctxpopup supports scroller, the reduced box could show the all
items also.
(The point is ctxpopup should know the size of total items...)
I'm not sure the upstreamed version could cover the above scenario,
If then, I need to modify it first.
(fixed some minor formatting issue too)
SVN revision: 56021
2011-01-10 00:59:40 -08:00
|
|
|
evas_object_resize(win, 400, 400);
|
2010-10-19 13:21:53 -07:00
|
|
|
evas_object_show(win);
|
|
|
|
}
|
|
|
|
#endif
|