Work on a new panel widget. Still not complete yet, but it's started :)

SVN revision: 43100
This commit is contained in:
Christopher Michael 2009-10-15 20:34:11 +00:00
parent 0163f8c703
commit 821e101030
6 changed files with 120 additions and 6 deletions

View File

@ -16748,4 +16748,103 @@ collections {
}
}
}
/////////////////////////////////////////////////////////////////////////////
// PANEL
////////////////////////////////////////////////////////////////////////////
group
{
name: "elm/panel/base/default";
images
{
image: "bt_dis_base.png" COMP;
}
parts
{
part
{
name: "base";
type: IMAGE;
mouse_events: 0;
description
{
state: "default" 0.0;
color: 255 255 255 0;
image
{
normal: "bt_dis_base.png";
border: 4 4 4 4;
}
}
description
{
state: "visible" 0.0;
inherit: "default" 0.0;
color: 255 255 255 255;
}
}
part
{
name: "elm.swallow.content";
type: SWALLOW;
description
{
state: "default" 0.0;
rel2.offset: -48 -1;
}
}
part
{
name: "elm.swallow.arrow";
type: SWALLOW;
description
{
state: "default" 0.0;
aspect: 1.0 1.0;
aspect_preference: HORIZONTAL;
rel1
{
relative: 1.0 0.0;
to_x: "elm.swallow.content";
}
rel2.offset: -2 -1;
}
}
}
programs
{
program
{
name: "show";
signal: "elm,action,show";
source: "elm";
action: STATE_SET "visible" 0.0;
target: "base";
}
program
{
name: "show2";
signal: "show";
action: STATE_SET "default" 0.0;
target: "base";
after: "show3";
}
program
{
name: "show3";
action: STATE_SET "visible" 0.0;
target: "base";
transition: LINEAR 0.5;
}
program
{
name: "hide";
signal: "elm,action,hide";
source: "elm";
action: STATE_SET "default" 0.0;
target: "base";
}
}
}
}

View File

@ -63,7 +63,8 @@ test_photo.c \
test_icon_desktops.c \
test_notify.c \
test_slideshow.c \
test_menu.c
test_menu.c \
test_panel.c
elementary_test_LDADD = $(top_builddir)/src/lib/libelementary.la
elementary_test_LDFLAGS =

View File

@ -52,6 +52,7 @@ void test_icon_desktops(void *data, Evas_Object *obj, void *event_info);
void test_notify(void *data, Evas_Object *obj, void *event_info);
void test_slideshow(void *data, Evas_Object *obj, void *event_info);
void test_menu(void *data, Evas_Object *obj, void *event_info);
void test_panel(void *data, Evas_Object *obj, void *event_info);
static void
@ -187,8 +188,7 @@ my_win_main(void)
elm_list_item_append(li, "Notify", NULL, NULL, test_notify, NULL);
elm_list_item_append(li, "Slideshow", NULL, NULL, test_slideshow, NULL);
elm_list_item_append(li, "Menu", NULL, NULL, test_menu, NULL);
elm_list_item_append(li, "Panel", NULL, NULL, test_panel, NULL);
elm_list_go(li);

View File

@ -973,6 +973,18 @@ extern "C" {
* "scroll,drag,stop" - dragging the contents around has stopped
*/
typedef enum _Elm_Panel_Orient
{
ELM_PANEL_ORIENT_TOP,
ELM_PANEL_ORIENT_BOTTOM,
ELM_PANEL_ORIENT_LEFT,
ELM_PANEL_ORIENT_RIGHT,
} Elm_Panel_Orient;
EAPI Evas_Object *elm_panel_add(Evas_Object *parent);
EAPI void elm_panel_orient_set(Evas_Object *obj, Elm_Panel_Orient orient);
EAPI void elm_panel_timeout_set(Evas_Object *obj, int timeout);
EAPI void elm_panel_content_set(Evas_Object *obj, Evas_Object *content);
#ifdef __cplusplus
}
#endif

View File

@ -65,6 +65,7 @@ elm_photocam.c \
elm_notify.c \
elm_slideshow.c \
elm_menu.c \
elm_panel.c \
\
elc_notepad.c \
elc_anchorview.c \

View File

@ -65,7 +65,8 @@ _sizing_eval(Evas_Object *obj)
static void
_changed_size_hints(void *data, Evas *e, Evas_Object *obj, void *event_info)
{
Widget_Data *wd = elm_widget_data_get(data);
// Widget_Data *wd = elm_widget_data_get(data);
_sizing_eval(data);
}
@ -165,7 +166,7 @@ _show(void *data, Evas *e, Evas_Object *obj, void *event_info)
ecore_timer_del(wd->timer);
wd->timer = NULL;
}
if (wd->timeout>0)
if (wd->timeout > 0)
wd->timer = ecore_timer_add(wd->timeout, _timer_cb, obj);
}
@ -322,7 +323,7 @@ elm_notify_timer_init(Evas_Object *obj)
if (wd->timer) ecore_timer_del(wd->timer);
wd->timer = NULL;
if (wd->timeout>0)
if (wd->timeout > 0)
wd->timer = ecore_timer_add(wd->timeout, _timer_cb, obj);
}