forked from enlightenment/efl
parent
49ace8dd7b
commit
091bde8aaa
|
@ -35,7 +35,6 @@ group { name: "elm/frame/base/default";
|
||||||
}
|
}
|
||||||
part { name: "elm.text";
|
part { name: "elm.text";
|
||||||
type: TEXT;
|
type: TEXT;
|
||||||
mouse_events: 0;
|
|
||||||
scale: 1;
|
scale: 1;
|
||||||
description { state: "default" 0.0;
|
description { state: "default" 0.0;
|
||||||
align: 0.0 0.0;
|
align: 0.0 0.0;
|
||||||
|
@ -85,6 +84,13 @@ group { name: "elm/frame/base/default";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
programs {
|
||||||
|
program { name: "click";
|
||||||
|
signal: "mouse,up,1";
|
||||||
|
source: "elm.text";
|
||||||
|
action: SIGNAL_EMIT "elm,action,click" "elm";
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
group { name: "elm/frame/base/pad_small";
|
group { name: "elm/frame/base/pad_small";
|
||||||
|
|
|
@ -10,6 +10,13 @@ struct _Widget_Data
|
||||||
const char *label;
|
const char *label;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static const char SIG_CLICKED[] = "clicked";
|
||||||
|
|
||||||
|
static const Evas_Smart_Cb_Description _signals[] = {
|
||||||
|
{SIG_CLICKED, ""},
|
||||||
|
{NULL, NULL}
|
||||||
|
};
|
||||||
|
|
||||||
static const char *widtype = NULL;
|
static const char *widtype = NULL;
|
||||||
static void _del_hook(Evas_Object *obj);
|
static void _del_hook(Evas_Object *obj);
|
||||||
static void _mirrored_set(Evas_Object *obj, Eina_Bool rtl);
|
static void _mirrored_set(Evas_Object *obj, Eina_Bool rtl);
|
||||||
|
@ -178,6 +185,15 @@ _content_unset_hook(Evas_Object *obj, const char *part)
|
||||||
return content;
|
return content;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
_signal_click(void *data __UNUSED__, Evas_Object *obj, const char *emission __UNUSED__, const char *source __UNUSED__)
|
||||||
|
{
|
||||||
|
Widget_Data *wd;
|
||||||
|
wd = elm_widget_data_get(obj);
|
||||||
|
if (!wd) return;
|
||||||
|
evas_object_smart_callback_call(obj, SIG_CLICKED, NULL);
|
||||||
|
}
|
||||||
|
|
||||||
EAPI Evas_Object *
|
EAPI Evas_Object *
|
||||||
elm_frame_add(Evas_Object *parent)
|
elm_frame_add(Evas_Object *parent)
|
||||||
{
|
{
|
||||||
|
@ -206,6 +222,9 @@ elm_frame_add(Evas_Object *parent)
|
||||||
elm_widget_resize_object_set(obj, wd->frm);
|
elm_widget_resize_object_set(obj, wd->frm);
|
||||||
|
|
||||||
evas_object_smart_callback_add(obj, "sub-object-del", _sub_del, obj);
|
evas_object_smart_callback_add(obj, "sub-object-del", _sub_del, obj);
|
||||||
|
edje_object_signal_callback_add(obj, "elm,action,click", "elm",
|
||||||
|
_signal_click, NULL);
|
||||||
|
evas_object_smart_callbacks_descriptions_set(obj, _signals);
|
||||||
|
|
||||||
_mirrored_set(obj, elm_widget_mirrored_get(obj));
|
_mirrored_set(obj, elm_widget_mirrored_get(obj));
|
||||||
_sizing_eval(obj);
|
_sizing_eval(obj);
|
||||||
|
|
|
@ -16,7 +16,10 @@
|
||||||
* @li outdent_top
|
* @li outdent_top
|
||||||
* @li outdent_bottom
|
* @li outdent_bottom
|
||||||
*
|
*
|
||||||
* Of all this styles only default shows the title. Frame emits no signals.
|
* Of all this styles only default shows the title.
|
||||||
|
*
|
||||||
|
* Smart callbacks one can listen to:
|
||||||
|
* - @c "clicked" - The user has clicked the frame's label
|
||||||
*
|
*
|
||||||
* Default contents parts of the frame widget that you can use for are:
|
* Default contents parts of the frame widget that you can use for are:
|
||||||
* @li "default" - A content of the frame
|
* @li "default" - A content of the frame
|
||||||
|
|
Loading…
Reference in New Issue