}
part { name: "elm.text";
type: TEXT;
- mouse_events: 0;
scale: 1;
description { state: "default" 0.0;
align: 0.0 0.0;
}
}
}
+ 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";
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 void _del_hook(Evas_Object *obj);
static void _mirrored_set(Evas_Object *obj, Eina_Bool rtl);
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 *
elm_frame_add(Evas_Object *parent)
{
elm_widget_resize_object_set(obj, wd->frm);
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));
_sizing_eval(obj);
* @li outdent_top
* @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:
* @li "default" - A content of the frame