make use of the signal propagatin to child objects for cursors etc. and so

indicate focus with a cursor.



SVN revision: 37689
This commit is contained in:
Carsten Haitzler 2008-11-17 05:58:21 +00:00
parent d43b3344e2
commit 1917ae7240
6 changed files with 63 additions and 18 deletions

View File

@ -1,4 +1,3 @@
collections {
///////////////////////////////////////////////////////////////////////////////
@ -2976,9 +2975,23 @@ collections {
image: "cur_glow.png" COMP;
}
parts {
part { name: "clip2";
type: RECT;
mouse_events: 0;
description { state: "default" 0.0;
rel1.to: "clip";
rel2.to: "clip";
visible: 0;
}
description { state: "focused" 0.0;
inherit: "default" 0.0;
visible: 1;
}
}
part { name: "clip";
type: RECT;
mouse_events: 0;
clip_to: "clip2";
description { state: "default" 0.0;
rel1.offset: -10 0;
rel2.offset: 9 9;
@ -3027,6 +3040,7 @@ collections {
part { name: "shine";
mouse_events: 0;
clip_to: "clip";
clip_to: "clip2";
description { state: "default" 0.0;
rel1.to: "base";
rel2.to: "base";
@ -3038,6 +3052,7 @@ collections {
}
part { name: "glow";
mouse_events: 0;
clip_to: "clip2";
description { state: "default" 0.0;
rel1.to: "base";
rel1.relative: 0.0 -2.0;
@ -3084,6 +3099,18 @@ collections {
target: "glow";
after: "show";
}
program { name: "focused";
signal: "elm,action,focus";
source: "elm";
action: STATE_SET "focused" 0.0;
target: "clip2";
}
program { name: "unfocused";
signal: "elm,action,unfocus";
source: "elm";
action: STATE_SET "default" 0.0;
target: "clip2";
}
}
}

View File

@ -281,19 +281,28 @@ extern "C" {
*/
// FIXME: fixes to do
// * current sizing tree inefficient
// * scroller could do with page up/down/left/right buttons and and idea of
// a page size
// (bugs)
// * entry click below text doesnt put cursor at end
// * single line entry on scale change adds newlines
// * scale change for hover doesnt seem to do new size alloc nicely
// * left/right arrow broken with password mode for entry
// * for some reason on oe builds of elementary initial text set doesnt work.
//
// (incomplete)
// * disabled not supported
// * tab widget focusing (not useful for touchscreen tho...)
// * entry has no way to show its focused vs other entries
// * entry needs to support setting selection to all, or clearing
// * bubble should allow style (left/right + top/bottom)
// * need to get toplevel
// * entry needs to set vkbd properties/hint (as does win)
// * entry selection conflicts with finger scroll
// * on the fly theme changes - test (should work)
//
// (more widgets/features)
// * toolbar widget (edje + box + button + separators)
// * listitem widget (simple label + icon)
// * radio widget + group handling
// * checkbox widget (like toggle)
// * entry needs to support setting selection to all, or clearing
// * entry click below text doesnt put cursor at end
// * bubble should allow style (left/right + top/bottom)
// * need separator widget (h/v)
// * need slide-open "panel" that can hold stuff and optionally scroll
// * need "photoframe" widget (for contact photos?)
@ -301,9 +310,6 @@ extern "C" {
// * need multi-sel (with button + hover + ...)
// * need slider widget
// * need range selector (select range of values from X to Y over an interval)
// * need a way to filter entry data for entry (eg for phone numbers)
// * entry needs to set vkbd properties/hint (as does win)
// * need to get toplevel
// * need "dialogbutton" widget (bigger button for bottom of wins)
// * need dialog window widget
// * need a phone-number widget (hilight country dial prefixes, add flags,
@ -311,8 +317,12 @@ extern "C" {
// * need imageview widget (for large not iconic images)
// * tiled image + zoom widget (tiled map viewer)
// * dialpad widget - need one with a phone dialpad
// * on the fly theme changes - test (should work)
// * single line entry on scale change adds newlines
// * scale change for hover doesnt seem to do new size alloc nicely
// * left/right arrow broken with password mode for entry
//
// (improvements)
// * widgets should show who is focused (not useful for touchscreen)
// * scroller could do with page up/down/left/right buttons and and idea of
// a page size
// * current sizing tree inefficient
// * need a way to filter entry data for entry (eg for phone numbers)
//
#endif

View File

@ -15,7 +15,6 @@ static void _del_pre_hook(Evas_Object *obj);
static void _del_hook(Evas_Object *obj);
static void _sizing_eval(Evas_Object *obj);
static void _changed_size_hints(void *data, Evas *e, Evas_Object *obj, void *event_info);
static void _on_focus_hook(void *data, Evas_Object *obj);
static void _parent_del(void *data, Evas *e, Evas_Object *obj, void *event_info);
static void

View File

@ -15,7 +15,6 @@ static void _del_pre_hook(Evas_Object *obj);
static void _del_hook(Evas_Object *obj);
static void _sizing_eval(Evas_Object *obj);
static void _changed_size_hints(void *data, Evas *e, Evas_Object *obj, void *event_info);
static void _on_focus_hook(void *data, Evas_Object *obj);
static void _parent_del(void *data, Evas *e, Evas_Object *obj, void *event_info);
static void

View File

@ -98,7 +98,16 @@ static void
_on_focus_hook(void *data, Evas_Object *obj)
{
Widget_Data *wd = elm_widget_data_get(obj);
evas_object_focus_set(wd->ent, 1);
if (elm_widget_focus_get(obj))
{
evas_object_focus_set(wd->ent, 1);
edje_object_signal_emit(wd->ent, "elm,action,focus", "elm");
}
else
{
edje_object_signal_emit(wd->ent, "elm,action,unfocus", "elm");
evas_object_focus_set(wd->ent, 0);
}
}
static void

View File

@ -443,6 +443,7 @@ elm_widget_focused_object_clear(Evas_Object *obj)
}
}
if (sd->focus_func) sd->focus_func(obj);
if (sd->on_focus_func) sd->on_focus_func(sd->on_focus_data, obj);
}
EAPI void