part { name: "arrow_top";
mouse_events: 0;
+ clip_to: "disclip";
scale: 1;
description { state: "default" 0.0;
min: 15 15;
}
part { name: "arrow_bottom";
mouse_events: 0;
+ clip_to: "disclip";
scale: 1;
description { state: "default" 0.0;
min: 15 15;
type: RECT;
mouse_events: 0;
name: "top_clipper";
+ clip_to: "disclip";
description {
state: "default" 0.0;
rel1.to: "t";
type: RECT;
mouse_events: 0;
name: "bottom_clipper";
+ clip_to: "disclip";
description {
state: "default" 0.0;
rel1.to: "b";
visible: 1;
}
}
+
+ part {
+ type: RECT;
+ name: "disclip";
+ description {
+ state: "default" 0.0;
+ color: 255 255 255 255;
+ }
+ description {
+ state: "enabled" 0.0;
+ color: 100 100 100 100;
+ }
+ }
+
+ part {
+ type: RECT;
+ name: "event_blocker";
+ description {
+ state: "default" 0.0;
+ color: 0 0 0 0;
+ visible: 0;
+ }
+ description {
+ state: "enabled" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ }
+ }
+
}
programs {
source: "b";
action: SIGNAL_EMIT "elm,action,down,stop" "";
}
+ program { name: "disable";
+ signal: "elm,state,disabled";
+ source: "elm";
+ action: STATE_SET "enabled" 0.0;
+ target: "disclip";
+ target: "event_blocker";
+ }
+ program { name: "enable";
+ signal: "elm,state,enabled";
+ source: "elm";
+ action: STATE_SET "default" 0.0;
+ target: "disclip";
+ target: "event_blocker";
+ }
}
}
#include <elm_factory.h> //Done
#include <elm_finger.h> //Done
#include <elm_flip.h> //Done. There are many TODOs in flip.c
-#include <elm_flipselector.h>
+#include <elm_flipselector.h> //Done.
#include <elm_focus.h>
#include <elm_fonts.h>
#include <elm_frame.h>
/* TODO: if one ever wants to extend it to receiving generic widgets
as items, be my guest. in this case, remember to implement the
items tooltip infra. */
-/* TODO: implement disabled mode -- disable_hook() and stuff. */
/* TODO: fix default theme image borders for looong strings as item
labels. */
/* TODO: set text elipsis on labels if one enforces mininum size on
}
static void
+_disable_hook(Evas_Object *obj)
+{
+ Widget_Data *wd = elm_widget_data_get(obj);
+ if (!wd) return;
+
+ if (elm_widget_disabled_get(obj))
+ edje_object_signal_emit(wd->base, "elm,state,disabled", "elm");
+ else
+ edje_object_signal_emit(wd->base, "elm,state,enabled", "elm");
+}
+
+static void
_theme_hook(Evas_Object *obj)
{
Widget_Data *wd;
wd->self = obj;
elm_widget_del_hook_set(obj, _del_hook);
elm_widget_theme_hook_set(obj, _theme_hook);
+ elm_widget_disable_hook_set(obj, _disable_hook);
elm_widget_can_focus_set(obj, EINA_TRUE);
elm_widget_on_focus_hook_set(obj, _on_focus_hook, NULL);
* Default text parts of the flipselector items that you can use for are:
* @li "default" - label of the flipselector item
*
+ * Supported elm_object common APIs.
+ * @li elm_object_disabled_set
+ * @li elm_object_disabled_get
+ *
* Supported elm_object_item common APIs.
* @li elm_object_item_text_set
* @li elm_object_item_part_text_set