combobox: add new widget.
Summary:
Combobox is a combinational widget of a drop-down list and single line entry.
Based on the text entered in the entry, the list items are filtered accordingly.
Signed-Off By: Cedric Bail <cedric.bail@free.fr>
Signed-Off By: Divyesh Purohit <div.purohit@samsung.com>
Test Plan: test_combobox.c is added to elementary test
Reviewers: raster, shilpasingh, cedric, jpeg, stefan_schmidt
Reviewed By: raster, shilpasingh, cedric
Subscribers: SanghyeonLee, shashank0990, singh.amitesh, tasn, raster, seoz, poornima.srinivasan, rajeshps, govi
Differential Revision: https://phab.enlightenment.org/D2537
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-01-04 15:22:46 -08:00
|
|
|
#ifdef HAVE_CONFIG_H
|
|
|
|
# include "elementary_config.h"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#define ELM_INTERFACE_ATSPI_ACCESSIBLE_PROTECTED
|
|
|
|
#define ELM_INTERFACE_ATSPI_WIDGET_ACTION_PROTECTED
|
|
|
|
|
|
|
|
#include <Elementary.h>
|
|
|
|
#include "elm_priv.h"
|
|
|
|
#include "elm_widget_combobox.h"
|
|
|
|
|
|
|
|
#define MY_CLASS ELM_COMBOBOX_CLASS
|
|
|
|
|
|
|
|
#define MY_CLASS_NAME "Elm_Combobox"
|
|
|
|
#define MY_CLASS_NAME_LEGACY "elm_combobox"
|
|
|
|
|
|
|
|
static const char SIG_DISMISSED[] = "dismissed";
|
|
|
|
static const char SIG_EXPANDED[] = "expanded";
|
2016-01-19 11:33:47 -08:00
|
|
|
static const char SIG_ITEM_SELECTED[] = "item,selected";
|
combobox: add new widget.
Summary:
Combobox is a combinational widget of a drop-down list and single line entry.
Based on the text entered in the entry, the list items are filtered accordingly.
Signed-Off By: Cedric Bail <cedric.bail@free.fr>
Signed-Off By: Divyesh Purohit <div.purohit@samsung.com>
Test Plan: test_combobox.c is added to elementary test
Reviewers: raster, shilpasingh, cedric, jpeg, stefan_schmidt
Reviewed By: raster, shilpasingh, cedric
Subscribers: SanghyeonLee, shashank0990, singh.amitesh, tasn, raster, seoz, poornima.srinivasan, rajeshps, govi
Differential Revision: https://phab.enlightenment.org/D2537
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-01-04 15:22:46 -08:00
|
|
|
static const char SIG_ITEM_PRESSED[] = "item,pressed";
|
|
|
|
static const char SIG_FILTER_DONE[] = "filter,done";
|
2016-10-14 03:37:46 -07:00
|
|
|
static const char SIG_CLICKED[] = "clicked";
|
combobox: add new widget.
Summary:
Combobox is a combinational widget of a drop-down list and single line entry.
Based on the text entered in the entry, the list items are filtered accordingly.
Signed-Off By: Cedric Bail <cedric.bail@free.fr>
Signed-Off By: Divyesh Purohit <div.purohit@samsung.com>
Test Plan: test_combobox.c is added to elementary test
Reviewers: raster, shilpasingh, cedric, jpeg, stefan_schmidt
Reviewed By: raster, shilpasingh, cedric
Subscribers: SanghyeonLee, shashank0990, singh.amitesh, tasn, raster, seoz, poornima.srinivasan, rajeshps, govi
Differential Revision: https://phab.enlightenment.org/D2537
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-01-04 15:22:46 -08:00
|
|
|
|
|
|
|
static const Evas_Smart_Cb_Description _smart_callbacks[] = {
|
|
|
|
{SIG_DISMISSED, ""},
|
|
|
|
{SIG_EXPANDED, ""},
|
2016-01-19 11:33:47 -08:00
|
|
|
{SIG_ITEM_SELECTED, ""},
|
combobox: add new widget.
Summary:
Combobox is a combinational widget of a drop-down list and single line entry.
Based on the text entered in the entry, the list items are filtered accordingly.
Signed-Off By: Cedric Bail <cedric.bail@free.fr>
Signed-Off By: Divyesh Purohit <div.purohit@samsung.com>
Test Plan: test_combobox.c is added to elementary test
Reviewers: raster, shilpasingh, cedric, jpeg, stefan_schmidt
Reviewed By: raster, shilpasingh, cedric
Subscribers: SanghyeonLee, shashank0990, singh.amitesh, tasn, raster, seoz, poornima.srinivasan, rajeshps, govi
Differential Revision: https://phab.enlightenment.org/D2537
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-01-04 15:22:46 -08:00
|
|
|
{SIG_ITEM_PRESSED, ""},
|
|
|
|
{SIG_FILTER_DONE, ""},
|
2016-10-14 03:37:46 -07:00
|
|
|
{SIG_CLICKED, ""}, /**< handled by parent button class */
|
combobox: add new widget.
Summary:
Combobox is a combinational widget of a drop-down list and single line entry.
Based on the text entered in the entry, the list items are filtered accordingly.
Signed-Off By: Cedric Bail <cedric.bail@free.fr>
Signed-Off By: Divyesh Purohit <div.purohit@samsung.com>
Test Plan: test_combobox.c is added to elementary test
Reviewers: raster, shilpasingh, cedric, jpeg, stefan_schmidt
Reviewed By: raster, shilpasingh, cedric
Subscribers: SanghyeonLee, shashank0990, singh.amitesh, tasn, raster, seoz, poornima.srinivasan, rajeshps, govi
Differential Revision: https://phab.enlightenment.org/D2537
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-01-04 15:22:46 -08:00
|
|
|
{SIG_WIDGET_LANG_CHANGED, ""}, /**< handled by elm_widget */
|
|
|
|
{SIG_WIDGET_ACCESS_CHANGED, ""}, /**< handled by elm_widget */
|
|
|
|
{NULL, NULL}
|
|
|
|
};
|
|
|
|
|
2017-03-31 12:23:48 -07:00
|
|
|
static void _table_resize(void *data);
|
combobox: add new widget.
Summary:
Combobox is a combinational widget of a drop-down list and single line entry.
Based on the text entered in the entry, the list items are filtered accordingly.
Signed-Off By: Cedric Bail <cedric.bail@free.fr>
Signed-Off By: Divyesh Purohit <div.purohit@samsung.com>
Test Plan: test_combobox.c is added to elementary test
Reviewers: raster, shilpasingh, cedric, jpeg, stefan_schmidt
Reviewed By: raster, shilpasingh, cedric
Subscribers: SanghyeonLee, shashank0990, singh.amitesh, tasn, raster, seoz, poornima.srinivasan, rajeshps, govi
Differential Revision: https://phab.enlightenment.org/D2537
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-01-04 15:22:46 -08:00
|
|
|
static Eina_Bool _key_action_move(Evas_Object *obj, const char *params);
|
|
|
|
static Eina_Bool _key_action_activate(Evas_Object *obj, const char *params);
|
|
|
|
|
|
|
|
static const Elm_Action key_actions[] = {
|
|
|
|
{"activate", _key_action_activate},
|
|
|
|
{"move", _key_action_move},
|
|
|
|
{NULL, NULL}
|
|
|
|
};
|
|
|
|
|
|
|
|
EOLIAN static Eina_Bool
|
|
|
|
_elm_combobox_elm_widget_translate(Eo *obj EINA_UNUSED, Elm_Combobox_Data *sd)
|
|
|
|
{
|
2016-08-15 06:44:41 -07:00
|
|
|
elm_obj_widget_translate(efl_super(obj, MY_CLASS));
|
2016-03-02 04:10:48 -08:00
|
|
|
elm_obj_widget_translate(sd->genlist);
|
|
|
|
elm_obj_widget_translate(sd->entry);
|
combobox: add new widget.
Summary:
Combobox is a combinational widget of a drop-down list and single line entry.
Based on the text entered in the entry, the list items are filtered accordingly.
Signed-Off By: Cedric Bail <cedric.bail@free.fr>
Signed-Off By: Divyesh Purohit <div.purohit@samsung.com>
Test Plan: test_combobox.c is added to elementary test
Reviewers: raster, shilpasingh, cedric, jpeg, stefan_schmidt
Reviewed By: raster, shilpasingh, cedric
Subscribers: SanghyeonLee, shashank0990, singh.amitesh, tasn, raster, seoz, poornima.srinivasan, rajeshps, govi
Differential Revision: https://phab.enlightenment.org/D2537
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-01-04 15:22:46 -08:00
|
|
|
|
|
|
|
if (sd->hover)
|
2016-03-02 04:10:48 -08:00
|
|
|
elm_obj_widget_translate(sd->hover);
|
combobox: add new widget.
Summary:
Combobox is a combinational widget of a drop-down list and single line entry.
Based on the text entered in the entry, the list items are filtered accordingly.
Signed-Off By: Cedric Bail <cedric.bail@free.fr>
Signed-Off By: Divyesh Purohit <div.purohit@samsung.com>
Test Plan: test_combobox.c is added to elementary test
Reviewers: raster, shilpasingh, cedric, jpeg, stefan_schmidt
Reviewed By: raster, shilpasingh, cedric
Subscribers: SanghyeonLee, shashank0990, singh.amitesh, tasn, raster, seoz, poornima.srinivasan, rajeshps, govi
Differential Revision: https://phab.enlightenment.org/D2537
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-01-04 15:22:46 -08:00
|
|
|
|
|
|
|
return EINA_TRUE;
|
|
|
|
}
|
|
|
|
|
theme: return enum from elm_widget_style_set instead of bool
Summary:
if trying to apply incorrect theme, widget apply default theme and return TRUE.
so there is no way to check it really apply correct theme.
To resolve this problem, _elm_theme_set return three type enum
* related history : 4ca3ef45146e05908a13d1010909abeba9693ad6
* elm_object_style_set is public api, so I didn't change it.
* typedef name [ Theme_Apply ] is temporarily, please suggest better one.
@fix
Reviewers: singh.amitesh, herb, Hermet, cedric, jpeg, raster
Subscribers: cedric, jpeg
Differential Revision: https://phab.enlightenment.org/D4073
2016-06-30 23:09:42 -07:00
|
|
|
EOLIAN static Elm_Theme_Apply
|
combobox: add new widget.
Summary:
Combobox is a combinational widget of a drop-down list and single line entry.
Based on the text entered in the entry, the list items are filtered accordingly.
Signed-Off By: Cedric Bail <cedric.bail@free.fr>
Signed-Off By: Divyesh Purohit <div.purohit@samsung.com>
Test Plan: test_combobox.c is added to elementary test
Reviewers: raster, shilpasingh, cedric, jpeg, stefan_schmidt
Reviewed By: raster, shilpasingh, cedric
Subscribers: SanghyeonLee, shashank0990, singh.amitesh, tasn, raster, seoz, poornima.srinivasan, rajeshps, govi
Differential Revision: https://phab.enlightenment.org/D2537
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-01-04 15:22:46 -08:00
|
|
|
_elm_combobox_elm_widget_theme_apply(Eo *obj, Elm_Combobox_Data *sd)
|
|
|
|
{
|
|
|
|
const char *style;
|
theme: return enum from elm_widget_style_set instead of bool
Summary:
if trying to apply incorrect theme, widget apply default theme and return TRUE.
so there is no way to check it really apply correct theme.
To resolve this problem, _elm_theme_set return three type enum
* related history : 4ca3ef45146e05908a13d1010909abeba9693ad6
* elm_object_style_set is public api, so I didn't change it.
* typedef name [ Theme_Apply ] is temporarily, please suggest better one.
@fix
Reviewers: singh.amitesh, herb, Hermet, cedric, jpeg, raster
Subscribers: cedric, jpeg
Differential Revision: https://phab.enlightenment.org/D4073
2016-06-30 23:09:42 -07:00
|
|
|
Elm_Theme_Apply int_ret = ELM_THEME_APPLY_FAILED;
|
combobox: add new widget.
Summary:
Combobox is a combinational widget of a drop-down list and single line entry.
Based on the text entered in the entry, the list items are filtered accordingly.
Signed-Off By: Cedric Bail <cedric.bail@free.fr>
Signed-Off By: Divyesh Purohit <div.purohit@samsung.com>
Test Plan: test_combobox.c is added to elementary test
Reviewers: raster, shilpasingh, cedric, jpeg, stefan_schmidt
Reviewed By: raster, shilpasingh, cedric
Subscribers: SanghyeonLee, shashank0990, singh.amitesh, tasn, raster, seoz, poornima.srinivasan, rajeshps, govi
Differential Revision: https://phab.enlightenment.org/D2537
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-01-04 15:22:46 -08:00
|
|
|
Eina_Bool mirrored;
|
|
|
|
char buf[128];
|
|
|
|
|
theme: return enum from elm_widget_style_set instead of bool
Summary:
if trying to apply incorrect theme, widget apply default theme and return TRUE.
so there is no way to check it really apply correct theme.
To resolve this problem, _elm_theme_set return three type enum
* related history : 4ca3ef45146e05908a13d1010909abeba9693ad6
* elm_object_style_set is public api, so I didn't change it.
* typedef name [ Theme_Apply ] is temporarily, please suggest better one.
@fix
Reviewers: singh.amitesh, herb, Hermet, cedric, jpeg, raster
Subscribers: cedric, jpeg
Differential Revision: https://phab.enlightenment.org/D4073
2016-06-30 23:09:42 -07:00
|
|
|
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, ELM_THEME_APPLY_FAILED);
|
combobox: add new widget.
Summary:
Combobox is a combinational widget of a drop-down list and single line entry.
Based on the text entered in the entry, the list items are filtered accordingly.
Signed-Off By: Cedric Bail <cedric.bail@free.fr>
Signed-Off By: Divyesh Purohit <div.purohit@samsung.com>
Test Plan: test_combobox.c is added to elementary test
Reviewers: raster, shilpasingh, cedric, jpeg, stefan_schmidt
Reviewed By: raster, shilpasingh, cedric
Subscribers: SanghyeonLee, shashank0990, singh.amitesh, tasn, raster, seoz, poornima.srinivasan, rajeshps, govi
Differential Revision: https://phab.enlightenment.org/D2537
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-01-04 15:22:46 -08:00
|
|
|
|
2016-01-22 11:07:01 -08:00
|
|
|
style = eina_stringshare_add(elm_widget_style_get(obj));
|
combobox: add new widget.
Summary:
Combobox is a combinational widget of a drop-down list and single line entry.
Based on the text entered in the entry, the list items are filtered accordingly.
Signed-Off By: Cedric Bail <cedric.bail@free.fr>
Signed-Off By: Divyesh Purohit <div.purohit@samsung.com>
Test Plan: test_combobox.c is added to elementary test
Reviewers: raster, shilpasingh, cedric, jpeg, stefan_schmidt
Reviewed By: raster, shilpasingh, cedric
Subscribers: SanghyeonLee, shashank0990, singh.amitesh, tasn, raster, seoz, poornima.srinivasan, rajeshps, govi
Differential Revision: https://phab.enlightenment.org/D2537
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-01-04 15:22:46 -08:00
|
|
|
|
|
|
|
snprintf(buf, sizeof(buf), "combobox_vertical/%s", style);
|
|
|
|
|
|
|
|
/* combobox's style has no extra bit for orientation but could have... */
|
|
|
|
eina_stringshare_replace(&(wd->style), buf);
|
|
|
|
|
2016-08-15 06:44:41 -07:00
|
|
|
int_ret = elm_obj_widget_theme_apply(efl_super(obj, MY_CLASS));
|
theme: return enum from elm_widget_style_set instead of bool
Summary:
if trying to apply incorrect theme, widget apply default theme and return TRUE.
so there is no way to check it really apply correct theme.
To resolve this problem, _elm_theme_set return three type enum
* related history : 4ca3ef45146e05908a13d1010909abeba9693ad6
* elm_object_style_set is public api, so I didn't change it.
* typedef name [ Theme_Apply ] is temporarily, please suggest better one.
@fix
Reviewers: singh.amitesh, herb, Hermet, cedric, jpeg, raster
Subscribers: cedric, jpeg
Differential Revision: https://phab.enlightenment.org/D4073
2016-06-30 23:09:42 -07:00
|
|
|
if (!int_ret) return ELM_THEME_APPLY_FAILED;
|
combobox: add new widget.
Summary:
Combobox is a combinational widget of a drop-down list and single line entry.
Based on the text entered in the entry, the list items are filtered accordingly.
Signed-Off By: Cedric Bail <cedric.bail@free.fr>
Signed-Off By: Divyesh Purohit <div.purohit@samsung.com>
Test Plan: test_combobox.c is added to elementary test
Reviewers: raster, shilpasingh, cedric, jpeg, stefan_schmidt
Reviewed By: raster, shilpasingh, cedric
Subscribers: SanghyeonLee, shashank0990, singh.amitesh, tasn, raster, seoz, poornima.srinivasan, rajeshps, govi
Differential Revision: https://phab.enlightenment.org/D2537
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-01-04 15:22:46 -08:00
|
|
|
|
2016-01-22 11:07:01 -08:00
|
|
|
eina_stringshare_replace(&(wd->style), style);
|
|
|
|
|
2017-06-13 03:41:15 -07:00
|
|
|
mirrored = efl_ui_mirrored_get(obj);
|
combobox: add new widget.
Summary:
Combobox is a combinational widget of a drop-down list and single line entry.
Based on the text entered in the entry, the list items are filtered accordingly.
Signed-Off By: Cedric Bail <cedric.bail@free.fr>
Signed-Off By: Divyesh Purohit <div.purohit@samsung.com>
Test Plan: test_combobox.c is added to elementary test
Reviewers: raster, shilpasingh, cedric, jpeg, stefan_schmidt
Reviewed By: raster, shilpasingh, cedric
Subscribers: SanghyeonLee, shashank0990, singh.amitesh, tasn, raster, seoz, poornima.srinivasan, rajeshps, govi
Differential Revision: https://phab.enlightenment.org/D2537
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-01-04 15:22:46 -08:00
|
|
|
|
|
|
|
if (sd->hover)
|
2016-07-04 07:53:33 -07:00
|
|
|
{
|
2017-06-13 03:41:15 -07:00
|
|
|
efl_ui_mirrored_set(sd->hover, mirrored);
|
2016-07-04 07:53:33 -07:00
|
|
|
elm_widget_style_set(sd->hover, buf);
|
|
|
|
}
|
combobox: add new widget.
Summary:
Combobox is a combinational widget of a drop-down list and single line entry.
Based on the text entered in the entry, the list items are filtered accordingly.
Signed-Off By: Cedric Bail <cedric.bail@free.fr>
Signed-Off By: Divyesh Purohit <div.purohit@samsung.com>
Test Plan: test_combobox.c is added to elementary test
Reviewers: raster, shilpasingh, cedric, jpeg, stefan_schmidt
Reviewed By: raster, shilpasingh, cedric
Subscribers: SanghyeonLee, shashank0990, singh.amitesh, tasn, raster, seoz, poornima.srinivasan, rajeshps, govi
Differential Revision: https://phab.enlightenment.org/D2537
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-01-04 15:22:46 -08:00
|
|
|
|
2017-06-13 03:41:15 -07:00
|
|
|
efl_ui_mirrored_set(sd->genlist, mirrored);
|
|
|
|
efl_ui_mirrored_set(sd->entry, mirrored);
|
combobox: add new widget.
Summary:
Combobox is a combinational widget of a drop-down list and single line entry.
Based on the text entered in the entry, the list items are filtered accordingly.
Signed-Off By: Cedric Bail <cedric.bail@free.fr>
Signed-Off By: Divyesh Purohit <div.purohit@samsung.com>
Test Plan: test_combobox.c is added to elementary test
Reviewers: raster, shilpasingh, cedric, jpeg, stefan_schmidt
Reviewed By: raster, shilpasingh, cedric
Subscribers: SanghyeonLee, shashank0990, singh.amitesh, tasn, raster, seoz, poornima.srinivasan, rajeshps, govi
Differential Revision: https://phab.enlightenment.org/D2537
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-01-04 15:22:46 -08:00
|
|
|
|
2016-07-04 07:53:33 -07:00
|
|
|
elm_widget_style_set(sd->genlist, buf);
|
|
|
|
elm_widget_style_set(sd->entry, buf);
|
|
|
|
|
|
|
|
eina_stringshare_del(style);
|
combobox: add new widget.
Summary:
Combobox is a combinational widget of a drop-down list and single line entry.
Based on the text entered in the entry, the list items are filtered accordingly.
Signed-Off By: Cedric Bail <cedric.bail@free.fr>
Signed-Off By: Divyesh Purohit <div.purohit@samsung.com>
Test Plan: test_combobox.c is added to elementary test
Reviewers: raster, shilpasingh, cedric, jpeg, stefan_schmidt
Reviewed By: raster, shilpasingh, cedric
Subscribers: SanghyeonLee, shashank0990, singh.amitesh, tasn, raster, seoz, poornima.srinivasan, rajeshps, govi
Differential Revision: https://phab.enlightenment.org/D2537
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-01-04 15:22:46 -08:00
|
|
|
|
theme: return enum from elm_widget_style_set instead of bool
Summary:
if trying to apply incorrect theme, widget apply default theme and return TRUE.
so there is no way to check it really apply correct theme.
To resolve this problem, _elm_theme_set return three type enum
* related history : 4ca3ef45146e05908a13d1010909abeba9693ad6
* elm_object_style_set is public api, so I didn't change it.
* typedef name [ Theme_Apply ] is temporarily, please suggest better one.
@fix
Reviewers: singh.amitesh, herb, Hermet, cedric, jpeg, raster
Subscribers: cedric, jpeg
Differential Revision: https://phab.enlightenment.org/D4073
2016-06-30 23:09:42 -07:00
|
|
|
return int_ret;
|
combobox: add new widget.
Summary:
Combobox is a combinational widget of a drop-down list and single line entry.
Based on the text entered in the entry, the list items are filtered accordingly.
Signed-Off By: Cedric Bail <cedric.bail@free.fr>
Signed-Off By: Divyesh Purohit <div.purohit@samsung.com>
Test Plan: test_combobox.c is added to elementary test
Reviewers: raster, shilpasingh, cedric, jpeg, stefan_schmidt
Reviewed By: raster, shilpasingh, cedric
Subscribers: SanghyeonLee, shashank0990, singh.amitesh, tasn, raster, seoz, poornima.srinivasan, rajeshps, govi
Differential Revision: https://phab.enlightenment.org/D2537
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-01-04 15:22:46 -08:00
|
|
|
}
|
|
|
|
|
2016-06-20 07:31:31 -07:00
|
|
|
static void
|
2016-08-30 05:34:10 -07:00
|
|
|
_on_hover_clicked(void *data, const Efl_Event *event)
|
combobox: add new widget.
Summary:
Combobox is a combinational widget of a drop-down list and single line entry.
Based on the text entered in the entry, the list items are filtered accordingly.
Signed-Off By: Cedric Bail <cedric.bail@free.fr>
Signed-Off By: Divyesh Purohit <div.purohit@samsung.com>
Test Plan: test_combobox.c is added to elementary test
Reviewers: raster, shilpasingh, cedric, jpeg, stefan_schmidt
Reviewed By: raster, shilpasingh, cedric
Subscribers: SanghyeonLee, shashank0990, singh.amitesh, tasn, raster, seoz, poornima.srinivasan, rajeshps, govi
Differential Revision: https://phab.enlightenment.org/D2537
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-01-04 15:22:46 -08:00
|
|
|
{
|
2016-01-22 11:07:01 -08:00
|
|
|
const char *dismissstr;
|
|
|
|
|
2016-05-18 08:17:36 -07:00
|
|
|
dismissstr = elm_layout_data_get(event->object, "dismiss");
|
2016-01-22 11:07:01 -08:00
|
|
|
|
|
|
|
if (!dismissstr || strcmp(dismissstr, "on"))
|
|
|
|
elm_combobox_hover_end(data); // for backward compatibility
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
_hover_end_finished(void *data,
|
|
|
|
Evas_Object *obj EINA_UNUSED,
|
|
|
|
const char *emission EINA_UNUSED,
|
|
|
|
const char *source EINA_UNUSED)
|
|
|
|
{
|
|
|
|
const char *dismissstr;
|
|
|
|
ELM_COMBOBOX_DATA_GET(data, sd);
|
|
|
|
dismissstr = elm_layout_data_get(sd->hover, "dismiss");
|
|
|
|
if (dismissstr && !strcmp(dismissstr, "on"))
|
|
|
|
{
|
|
|
|
sd->expanded = EINA_FALSE;
|
|
|
|
evas_object_hide(sd->hover);
|
2016-08-22 15:40:39 -07:00
|
|
|
efl_event_callback_legacy_call(data, ELM_COMBOBOX_EVENT_DISMISSED, NULL);
|
2016-01-22 11:07:01 -08:00
|
|
|
}
|
combobox: add new widget.
Summary:
Combobox is a combinational widget of a drop-down list and single line entry.
Based on the text entered in the entry, the list items are filtered accordingly.
Signed-Off By: Cedric Bail <cedric.bail@free.fr>
Signed-Off By: Divyesh Purohit <div.purohit@samsung.com>
Test Plan: test_combobox.c is added to elementary test
Reviewers: raster, shilpasingh, cedric, jpeg, stefan_schmidt
Reviewed By: raster, shilpasingh, cedric
Subscribers: SanghyeonLee, shashank0990, singh.amitesh, tasn, raster, seoz, poornima.srinivasan, rajeshps, govi
Differential Revision: https://phab.enlightenment.org/D2537
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-01-04 15:22:46 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
count_items_genlist(void *data)
|
|
|
|
{
|
|
|
|
ELM_COMBOBOX_DATA_GET(data, sd);
|
|
|
|
Eina_Iterator *filter_iter;
|
|
|
|
int count = 0;
|
|
|
|
Elm_Object_Item *item;
|
|
|
|
|
|
|
|
filter_iter = elm_genlist_filter_iterator_new(sd->genlist);
|
|
|
|
if (!filter_iter) return;
|
|
|
|
EINA_ITERATOR_FOREACH(filter_iter, item)
|
|
|
|
if (item) count++;
|
|
|
|
sd->count = count;
|
|
|
|
eina_iterator_free(filter_iter);
|
|
|
|
}
|
|
|
|
|
2017-03-31 12:23:48 -07:00
|
|
|
static void
|
|
|
|
_item_realized(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
|
|
|
|
{
|
|
|
|
_table_resize(data);
|
|
|
|
}
|
|
|
|
|
combobox: add new widget.
Summary:
Combobox is a combinational widget of a drop-down list and single line entry.
Based on the text entered in the entry, the list items are filtered accordingly.
Signed-Off By: Cedric Bail <cedric.bail@free.fr>
Signed-Off By: Divyesh Purohit <div.purohit@samsung.com>
Test Plan: test_combobox.c is added to elementary test
Reviewers: raster, shilpasingh, cedric, jpeg, stefan_schmidt
Reviewed By: raster, shilpasingh, cedric
Subscribers: SanghyeonLee, shashank0990, singh.amitesh, tasn, raster, seoz, poornima.srinivasan, rajeshps, govi
Differential Revision: https://phab.enlightenment.org/D2537
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-01-04 15:22:46 -08:00
|
|
|
static void
|
|
|
|
_table_resize(void *data)
|
|
|
|
{
|
|
|
|
ELM_COMBOBOX_DATA_GET(data, sd);
|
|
|
|
if (sd->count > 0)
|
|
|
|
{
|
|
|
|
int hover_parent_w, hover_parent_h, obj_h, obj_w, obj_y, win_y_offset;
|
|
|
|
int current_height, h;
|
2017-03-31 12:23:48 -07:00
|
|
|
Eina_List *realized;
|
|
|
|
|
combobox: add new widget.
Summary:
Combobox is a combinational widget of a drop-down list and single line entry.
Based on the text entered in the entry, the list items are filtered accordingly.
Signed-Off By: Cedric Bail <cedric.bail@free.fr>
Signed-Off By: Divyesh Purohit <div.purohit@samsung.com>
Test Plan: test_combobox.c is added to elementary test
Reviewers: raster, shilpasingh, cedric, jpeg, stefan_schmidt
Reviewed By: raster, shilpasingh, cedric
Subscribers: SanghyeonLee, shashank0990, singh.amitesh, tasn, raster, seoz, poornima.srinivasan, rajeshps, govi
Differential Revision: https://phab.enlightenment.org/D2537
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-01-04 15:22:46 -08:00
|
|
|
sd->item = elm_genlist_first_item_get(sd->genlist);
|
2017-03-31 12:23:48 -07:00
|
|
|
|
|
|
|
if (!(realized = elm_genlist_realized_items_get(sd->genlist)))
|
|
|
|
{
|
|
|
|
//nothing realized and wait until at least one item is realized
|
|
|
|
h = 1;
|
|
|
|
evas_object_smart_callback_add(sd->genlist, "realized", _item_realized, data);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
// take the first, and update according to that
|
|
|
|
evas_object_geometry_get(elm_object_item_track(eina_list_data_get(realized)), NULL, NULL,
|
|
|
|
NULL, &h);
|
|
|
|
}
|
|
|
|
|
|
|
|
sd->item_height = h;
|
2016-08-11 02:27:25 -07:00
|
|
|
evas_object_geometry_get(sd->entry, NULL, NULL, &obj_w, NULL);
|
combobox: add new widget.
Summary:
Combobox is a combinational widget of a drop-down list and single line entry.
Based on the text entered in the entry, the list items are filtered accordingly.
Signed-Off By: Cedric Bail <cedric.bail@free.fr>
Signed-Off By: Divyesh Purohit <div.purohit@samsung.com>
Test Plan: test_combobox.c is added to elementary test
Reviewers: raster, shilpasingh, cedric, jpeg, stefan_schmidt
Reviewed By: raster, shilpasingh, cedric
Subscribers: SanghyeonLee, shashank0990, singh.amitesh, tasn, raster, seoz, poornima.srinivasan, rajeshps, govi
Differential Revision: https://phab.enlightenment.org/D2537
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-01-04 15:22:46 -08:00
|
|
|
evas_object_geometry_get(data, NULL, &obj_y, NULL, &obj_h);
|
|
|
|
evas_object_geometry_get(sd->hover_parent, NULL, NULL, &hover_parent_w,
|
|
|
|
&hover_parent_h);
|
|
|
|
current_height = sd->item_height * sd->count;
|
2016-02-04 22:18:04 -08:00
|
|
|
sd->best_location = elm_hover_best_content_location_get(sd->hover,
|
2016-01-08 15:27:09 -08:00
|
|
|
ELM_HOVER_AXIS_VERTICAL);
|
2016-02-04 22:18:04 -08:00
|
|
|
if (sd->best_location && !strcmp(sd->best_location , "bottom"))
|
combobox: add new widget.
Summary:
Combobox is a combinational widget of a drop-down list and single line entry.
Based on the text entered in the entry, the list items are filtered accordingly.
Signed-Off By: Cedric Bail <cedric.bail@free.fr>
Signed-Off By: Divyesh Purohit <div.purohit@samsung.com>
Test Plan: test_combobox.c is added to elementary test
Reviewers: raster, shilpasingh, cedric, jpeg, stefan_schmidt
Reviewed By: raster, shilpasingh, cedric
Subscribers: SanghyeonLee, shashank0990, singh.amitesh, tasn, raster, seoz, poornima.srinivasan, rajeshps, govi
Differential Revision: https://phab.enlightenment.org/D2537
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-01-04 15:22:46 -08:00
|
|
|
win_y_offset = hover_parent_h - obj_y - obj_h;
|
|
|
|
else win_y_offset = obj_y;
|
2016-01-08 15:27:09 -08:00
|
|
|
|
combobox: add new widget.
Summary:
Combobox is a combinational widget of a drop-down list and single line entry.
Based on the text entered in the entry, the list items are filtered accordingly.
Signed-Off By: Cedric Bail <cedric.bail@free.fr>
Signed-Off By: Divyesh Purohit <div.purohit@samsung.com>
Test Plan: test_combobox.c is added to elementary test
Reviewers: raster, shilpasingh, cedric, jpeg, stefan_schmidt
Reviewed By: raster, shilpasingh, cedric
Subscribers: SanghyeonLee, shashank0990, singh.amitesh, tasn, raster, seoz, poornima.srinivasan, rajeshps, govi
Differential Revision: https://phab.enlightenment.org/D2537
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-01-04 15:22:46 -08:00
|
|
|
if (current_height < win_y_offset)
|
|
|
|
evas_object_size_hint_min_set(sd->spacer, obj_w * elm_config_scale_get(),
|
|
|
|
current_height + (2 * elm_config_scale_get()));
|
|
|
|
else evas_object_size_hint_min_set(sd->spacer, obj_w * elm_config_scale_get(),
|
|
|
|
win_y_offset * elm_config_scale_get());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
_activate(Evas_Object *obj)
|
|
|
|
{
|
|
|
|
ELM_COMBOBOX_DATA_GET(obj, sd);
|
|
|
|
if (elm_widget_disabled_get(obj)) return;
|
2016-02-04 22:18:04 -08:00
|
|
|
|
2016-01-22 11:07:01 -08:00
|
|
|
if (sd->expanded)
|
|
|
|
{
|
|
|
|
elm_combobox_hover_end(obj);
|
|
|
|
return;
|
|
|
|
}
|
2016-02-04 22:18:04 -08:00
|
|
|
|
combobox: add new widget.
Summary:
Combobox is a combinational widget of a drop-down list and single line entry.
Based on the text entered in the entry, the list items are filtered accordingly.
Signed-Off By: Cedric Bail <cedric.bail@free.fr>
Signed-Off By: Divyesh Purohit <div.purohit@samsung.com>
Test Plan: test_combobox.c is added to elementary test
Reviewers: raster, shilpasingh, cedric, jpeg, stefan_schmidt
Reviewed By: raster, shilpasingh, cedric
Subscribers: SanghyeonLee, shashank0990, singh.amitesh, tasn, raster, seoz, poornima.srinivasan, rajeshps, govi
Differential Revision: https://phab.enlightenment.org/D2537
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-01-04 15:22:46 -08:00
|
|
|
sd->expanded = EINA_TRUE;
|
2016-02-04 22:18:04 -08:00
|
|
|
|
2016-07-05 05:04:02 -07:00
|
|
|
count_items_genlist(obj);
|
|
|
|
|
2016-02-04 22:18:04 -08:00
|
|
|
if (sd->count <= 0) return;
|
|
|
|
|
combobox: add new widget.
Summary:
Combobox is a combinational widget of a drop-down list and single line entry.
Based on the text entered in the entry, the list items are filtered accordingly.
Signed-Off By: Cedric Bail <cedric.bail@free.fr>
Signed-Off By: Divyesh Purohit <div.purohit@samsung.com>
Test Plan: test_combobox.c is added to elementary test
Reviewers: raster, shilpasingh, cedric, jpeg, stefan_schmidt
Reviewed By: raster, shilpasingh, cedric
Subscribers: SanghyeonLee, shashank0990, singh.amitesh, tasn, raster, seoz, poornima.srinivasan, rajeshps, govi
Differential Revision: https://phab.enlightenment.org/D2537
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-01-04 15:22:46 -08:00
|
|
|
_table_resize(obj);
|
2016-02-04 22:18:04 -08:00
|
|
|
elm_object_part_content_set(sd->hover, sd->best_location, sd->tbl);
|
2016-01-08 15:27:09 -08:00
|
|
|
evas_object_show(sd->genlist);
|
2016-01-26 13:01:55 -08:00
|
|
|
elm_genlist_item_selected_set(sd->item, EINA_TRUE);
|
combobox: add new widget.
Summary:
Combobox is a combinational widget of a drop-down list and single line entry.
Based on the text entered in the entry, the list items are filtered accordingly.
Signed-Off By: Cedric Bail <cedric.bail@free.fr>
Signed-Off By: Divyesh Purohit <div.purohit@samsung.com>
Test Plan: test_combobox.c is added to elementary test
Reviewers: raster, shilpasingh, cedric, jpeg, stefan_schmidt
Reviewed By: raster, shilpasingh, cedric
Subscribers: SanghyeonLee, shashank0990, singh.amitesh, tasn, raster, seoz, poornima.srinivasan, rajeshps, govi
Differential Revision: https://phab.enlightenment.org/D2537
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-01-04 15:22:46 -08:00
|
|
|
evas_object_show(sd->hover);
|
2016-08-22 15:40:39 -07:00
|
|
|
efl_event_callback_legacy_call(obj, ELM_COMBOBOX_EVENT_EXPANDED, NULL);
|
combobox: add new widget.
Summary:
Combobox is a combinational widget of a drop-down list and single line entry.
Based on the text entered in the entry, the list items are filtered accordingly.
Signed-Off By: Cedric Bail <cedric.bail@free.fr>
Signed-Off By: Divyesh Purohit <div.purohit@samsung.com>
Test Plan: test_combobox.c is added to elementary test
Reviewers: raster, shilpasingh, cedric, jpeg, stefan_schmidt
Reviewed By: raster, shilpasingh, cedric
Subscribers: SanghyeonLee, shashank0990, singh.amitesh, tasn, raster, seoz, poornima.srinivasan, rajeshps, govi
Differential Revision: https://phab.enlightenment.org/D2537
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-01-04 15:22:46 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
_on_item_selected(void *data , Evas_Object *obj EINA_UNUSED, void *event)
|
|
|
|
{
|
|
|
|
ELM_COMBOBOX_DATA_GET(data, sd);
|
2016-08-11 02:27:25 -07:00
|
|
|
elm_object_focus_set(sd->entry, EINA_TRUE);
|
2016-03-10 14:24:50 -08:00
|
|
|
|
2016-08-22 15:40:39 -07:00
|
|
|
efl_event_callback_legacy_call(data, ELM_COMBOBOX_EVENT_ITEM_SELECTED, event);
|
combobox: add new widget.
Summary:
Combobox is a combinational widget of a drop-down list and single line entry.
Based on the text entered in the entry, the list items are filtered accordingly.
Signed-Off By: Cedric Bail <cedric.bail@free.fr>
Signed-Off By: Divyesh Purohit <div.purohit@samsung.com>
Test Plan: test_combobox.c is added to elementary test
Reviewers: raster, shilpasingh, cedric, jpeg, stefan_schmidt
Reviewed By: raster, shilpasingh, cedric
Subscribers: SanghyeonLee, shashank0990, singh.amitesh, tasn, raster, seoz, poornima.srinivasan, rajeshps, govi
Differential Revision: https://phab.enlightenment.org/D2537
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-01-04 15:22:46 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
_on_item_pressed(void *data , Evas_Object *obj EINA_UNUSED, void *event)
|
|
|
|
{
|
2016-08-22 15:40:39 -07:00
|
|
|
efl_event_callback_legacy_call(data, ELM_COMBOBOX_EVENT_ITEM_PRESSED, event);
|
combobox: add new widget.
Summary:
Combobox is a combinational widget of a drop-down list and single line entry.
Based on the text entered in the entry, the list items are filtered accordingly.
Signed-Off By: Cedric Bail <cedric.bail@free.fr>
Signed-Off By: Divyesh Purohit <div.purohit@samsung.com>
Test Plan: test_combobox.c is added to elementary test
Reviewers: raster, shilpasingh, cedric, jpeg, stefan_schmidt
Reviewed By: raster, shilpasingh, cedric
Subscribers: SanghyeonLee, shashank0990, singh.amitesh, tasn, raster, seoz, poornima.srinivasan, rajeshps, govi
Differential Revision: https://phab.enlightenment.org/D2537
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-01-04 15:22:46 -08:00
|
|
|
}
|
|
|
|
|
2016-06-20 07:31:31 -07:00
|
|
|
static void
|
2016-08-30 05:34:10 -07:00
|
|
|
_gl_filter_finished_cb(void *data, const Efl_Event *event)
|
combobox: add new widget.
Summary:
Combobox is a combinational widget of a drop-down list and single line entry.
Based on the text entered in the entry, the list items are filtered accordingly.
Signed-Off By: Cedric Bail <cedric.bail@free.fr>
Signed-Off By: Divyesh Purohit <div.purohit@samsung.com>
Test Plan: test_combobox.c is added to elementary test
Reviewers: raster, shilpasingh, cedric, jpeg, stefan_schmidt
Reviewed By: raster, shilpasingh, cedric
Subscribers: SanghyeonLee, shashank0990, singh.amitesh, tasn, raster, seoz, poornima.srinivasan, rajeshps, govi
Differential Revision: https://phab.enlightenment.org/D2537
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-01-04 15:22:46 -08:00
|
|
|
{
|
2016-02-04 22:18:04 -08:00
|
|
|
char buf[1024];
|
combobox: add new widget.
Summary:
Combobox is a combinational widget of a drop-down list and single line entry.
Based on the text entered in the entry, the list items are filtered accordingly.
Signed-Off By: Cedric Bail <cedric.bail@free.fr>
Signed-Off By: Divyesh Purohit <div.purohit@samsung.com>
Test Plan: test_combobox.c is added to elementary test
Reviewers: raster, shilpasingh, cedric, jpeg, stefan_schmidt
Reviewed By: raster, shilpasingh, cedric
Subscribers: SanghyeonLee, shashank0990, singh.amitesh, tasn, raster, seoz, poornima.srinivasan, rajeshps, govi
Differential Revision: https://phab.enlightenment.org/D2537
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-01-04 15:22:46 -08:00
|
|
|
ELM_COMBOBOX_DATA_GET(data, sd);
|
2016-01-22 10:44:03 -08:00
|
|
|
|
combobox: add new widget.
Summary:
Combobox is a combinational widget of a drop-down list and single line entry.
Based on the text entered in the entry, the list items are filtered accordingly.
Signed-Off By: Cedric Bail <cedric.bail@free.fr>
Signed-Off By: Divyesh Purohit <div.purohit@samsung.com>
Test Plan: test_combobox.c is added to elementary test
Reviewers: raster, shilpasingh, cedric, jpeg, stefan_schmidt
Reviewed By: raster, shilpasingh, cedric
Subscribers: SanghyeonLee, shashank0990, singh.amitesh, tasn, raster, seoz, poornima.srinivasan, rajeshps, govi
Differential Revision: https://phab.enlightenment.org/D2537
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-01-04 15:22:46 -08:00
|
|
|
count_items_genlist(data);
|
2016-01-22 10:44:03 -08:00
|
|
|
|
|
|
|
if (sd->first_filter)
|
|
|
|
{
|
|
|
|
sd->first_filter = EINA_FALSE;
|
2016-06-20 07:31:31 -07:00
|
|
|
return;
|
2016-01-22 10:44:03 -08:00
|
|
|
}
|
|
|
|
|
2016-08-22 15:40:39 -07:00
|
|
|
efl_event_callback_legacy_call(data, ELM_COMBOBOX_EVENT_FILTER_DONE, event->info);
|
2016-01-22 10:44:03 -08:00
|
|
|
|
combobox: add new widget.
Summary:
Combobox is a combinational widget of a drop-down list and single line entry.
Based on the text entered in the entry, the list items are filtered accordingly.
Signed-Off By: Cedric Bail <cedric.bail@free.fr>
Signed-Off By: Divyesh Purohit <div.purohit@samsung.com>
Test Plan: test_combobox.c is added to elementary test
Reviewers: raster, shilpasingh, cedric, jpeg, stefan_schmidt
Reviewed By: raster, shilpasingh, cedric
Subscribers: SanghyeonLee, shashank0990, singh.amitesh, tasn, raster, seoz, poornima.srinivasan, rajeshps, govi
Differential Revision: https://phab.enlightenment.org/D2537
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-01-04 15:22:46 -08:00
|
|
|
if (sd->count > 0)
|
|
|
|
{
|
2016-01-26 13:01:03 -08:00
|
|
|
if (!sd->expanded) _activate(data);
|
2016-01-22 11:07:01 -08:00
|
|
|
else _table_resize(data);
|
2016-02-04 22:18:04 -08:00
|
|
|
elm_genlist_item_selected_set(sd->item, EINA_TRUE);
|
combobox: add new widget.
Summary:
Combobox is a combinational widget of a drop-down list and single line entry.
Based on the text entered in the entry, the list items are filtered accordingly.
Signed-Off By: Cedric Bail <cedric.bail@free.fr>
Signed-Off By: Divyesh Purohit <div.purohit@samsung.com>
Test Plan: test_combobox.c is added to elementary test
Reviewers: raster, shilpasingh, cedric, jpeg, stefan_schmidt
Reviewed By: raster, shilpasingh, cedric
Subscribers: SanghyeonLee, shashank0990, singh.amitesh, tasn, raster, seoz, poornima.srinivasan, rajeshps, govi
Differential Revision: https://phab.enlightenment.org/D2537
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-01-04 15:22:46 -08:00
|
|
|
}
|
2016-02-04 22:18:04 -08:00
|
|
|
else
|
|
|
|
{
|
|
|
|
sd->expanded = EINA_FALSE;
|
|
|
|
elm_layout_signal_emit(sd->hover, "elm,action,hide,no_animate", "elm");
|
|
|
|
snprintf(buf, sizeof(buf), "elm,action,slot,%s,hide", sd->best_location);
|
|
|
|
elm_layout_signal_emit(sd->hover, buf, "elm");
|
|
|
|
edje_object_message_signal_process(elm_layout_edje_get(sd->hover));
|
|
|
|
}
|
combobox: add new widget.
Summary:
Combobox is a combinational widget of a drop-down list and single line entry.
Based on the text entered in the entry, the list items are filtered accordingly.
Signed-Off By: Cedric Bail <cedric.bail@free.fr>
Signed-Off By: Divyesh Purohit <div.purohit@samsung.com>
Test Plan: test_combobox.c is added to elementary test
Reviewers: raster, shilpasingh, cedric, jpeg, stefan_schmidt
Reviewed By: raster, shilpasingh, cedric
Subscribers: SanghyeonLee, shashank0990, singh.amitesh, tasn, raster, seoz, poornima.srinivasan, rajeshps, govi
Differential Revision: https://phab.enlightenment.org/D2537
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-01-04 15:22:46 -08:00
|
|
|
}
|
|
|
|
|
2016-06-20 07:31:31 -07:00
|
|
|
static void
|
2016-08-30 05:34:10 -07:00
|
|
|
_on_aborted(void *data, const Efl_Event *event EINA_UNUSED)
|
combobox: add new widget.
Summary:
Combobox is a combinational widget of a drop-down list and single line entry.
Based on the text entered in the entry, the list items are filtered accordingly.
Signed-Off By: Cedric Bail <cedric.bail@free.fr>
Signed-Off By: Divyesh Purohit <div.purohit@samsung.com>
Test Plan: test_combobox.c is added to elementary test
Reviewers: raster, shilpasingh, cedric, jpeg, stefan_schmidt
Reviewed By: raster, shilpasingh, cedric
Subscribers: SanghyeonLee, shashank0990, singh.amitesh, tasn, raster, seoz, poornima.srinivasan, rajeshps, govi
Differential Revision: https://phab.enlightenment.org/D2537
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-01-04 15:22:46 -08:00
|
|
|
{
|
|
|
|
ELM_COMBOBOX_DATA_GET(data, sd);
|
2016-01-26 13:01:03 -08:00
|
|
|
if (sd->expanded) elm_combobox_hover_end(data);
|
combobox: add new widget.
Summary:
Combobox is a combinational widget of a drop-down list and single line entry.
Based on the text entered in the entry, the list items are filtered accordingly.
Signed-Off By: Cedric Bail <cedric.bail@free.fr>
Signed-Off By: Divyesh Purohit <div.purohit@samsung.com>
Test Plan: test_combobox.c is added to elementary test
Reviewers: raster, shilpasingh, cedric, jpeg, stefan_schmidt
Reviewed By: raster, shilpasingh, cedric
Subscribers: SanghyeonLee, shashank0990, singh.amitesh, tasn, raster, seoz, poornima.srinivasan, rajeshps, govi
Differential Revision: https://phab.enlightenment.org/D2537
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-01-04 15:22:46 -08:00
|
|
|
}
|
|
|
|
|
2016-06-20 07:31:31 -07:00
|
|
|
static void
|
2016-08-30 05:34:10 -07:00
|
|
|
_on_changed(void *data, const Efl_Event *event EINA_UNUSED)
|
combobox: add new widget.
Summary:
Combobox is a combinational widget of a drop-down list and single line entry.
Based on the text entered in the entry, the list items are filtered accordingly.
Signed-Off By: Cedric Bail <cedric.bail@free.fr>
Signed-Off By: Divyesh Purohit <div.purohit@samsung.com>
Test Plan: test_combobox.c is added to elementary test
Reviewers: raster, shilpasingh, cedric, jpeg, stefan_schmidt
Reviewed By: raster, shilpasingh, cedric
Subscribers: SanghyeonLee, shashank0990, singh.amitesh, tasn, raster, seoz, poornima.srinivasan, rajeshps, govi
Differential Revision: https://phab.enlightenment.org/D2537
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-01-04 15:22:46 -08:00
|
|
|
{
|
2016-08-22 15:40:39 -07:00
|
|
|
efl_event_callback_legacy_call(data, ELM_ENTRY_EVENT_CHANGED, NULL);
|
combobox: add new widget.
Summary:
Combobox is a combinational widget of a drop-down list and single line entry.
Based on the text entered in the entry, the list items are filtered accordingly.
Signed-Off By: Cedric Bail <cedric.bail@free.fr>
Signed-Off By: Divyesh Purohit <div.purohit@samsung.com>
Test Plan: test_combobox.c is added to elementary test
Reviewers: raster, shilpasingh, cedric, jpeg, stefan_schmidt
Reviewed By: raster, shilpasingh, cedric
Subscribers: SanghyeonLee, shashank0990, singh.amitesh, tasn, raster, seoz, poornima.srinivasan, rajeshps, govi
Differential Revision: https://phab.enlightenment.org/D2537
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-01-04 15:22:46 -08:00
|
|
|
}
|
|
|
|
|
2016-06-20 07:31:31 -07:00
|
|
|
static void
|
2016-08-30 05:34:10 -07:00
|
|
|
_on_clicked(void *data, const Efl_Event *event EINA_UNUSED)
|
combobox: add new widget.
Summary:
Combobox is a combinational widget of a drop-down list and single line entry.
Based on the text entered in the entry, the list items are filtered accordingly.
Signed-Off By: Cedric Bail <cedric.bail@free.fr>
Signed-Off By: Divyesh Purohit <div.purohit@samsung.com>
Test Plan: test_combobox.c is added to elementary test
Reviewers: raster, shilpasingh, cedric, jpeg, stefan_schmidt
Reviewed By: raster, shilpasingh, cedric
Subscribers: SanghyeonLee, shashank0990, singh.amitesh, tasn, raster, seoz, poornima.srinivasan, rajeshps, govi
Differential Revision: https://phab.enlightenment.org/D2537
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-01-04 15:22:46 -08:00
|
|
|
{
|
2016-01-22 11:07:01 -08:00
|
|
|
elm_combobox_hover_begin(data);
|
combobox: add new widget.
Summary:
Combobox is a combinational widget of a drop-down list and single line entry.
Based on the text entered in the entry, the list items are filtered accordingly.
Signed-Off By: Cedric Bail <cedric.bail@free.fr>
Signed-Off By: Divyesh Purohit <div.purohit@samsung.com>
Test Plan: test_combobox.c is added to elementary test
Reviewers: raster, shilpasingh, cedric, jpeg, stefan_schmidt
Reviewed By: raster, shilpasingh, cedric
Subscribers: SanghyeonLee, shashank0990, singh.amitesh, tasn, raster, seoz, poornima.srinivasan, rajeshps, govi
Differential Revision: https://phab.enlightenment.org/D2537
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-01-04 15:22:46 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
EOLIAN static void
|
2016-06-17 01:26:08 -07:00
|
|
|
_elm_combobox_efl_canvas_group_group_add(Eo *obj, Elm_Combobox_Data *sd EINA_UNUSED)
|
combobox: add new widget.
Summary:
Combobox is a combinational widget of a drop-down list and single line entry.
Based on the text entered in the entry, the list items are filtered accordingly.
Signed-Off By: Cedric Bail <cedric.bail@free.fr>
Signed-Off By: Divyesh Purohit <div.purohit@samsung.com>
Test Plan: test_combobox.c is added to elementary test
Reviewers: raster, shilpasingh, cedric, jpeg, stefan_schmidt
Reviewed By: raster, shilpasingh, cedric
Subscribers: SanghyeonLee, shashank0990, singh.amitesh, tasn, raster, seoz, poornima.srinivasan, rajeshps, govi
Differential Revision: https://phab.enlightenment.org/D2537
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-01-04 15:22:46 -08:00
|
|
|
{
|
2016-08-15 06:44:41 -07:00
|
|
|
efl_canvas_group_add(efl_super(obj, MY_CLASS));
|
combobox: add new widget.
Summary:
Combobox is a combinational widget of a drop-down list and single line entry.
Based on the text entered in the entry, the list items are filtered accordingly.
Signed-Off By: Cedric Bail <cedric.bail@free.fr>
Signed-Off By: Divyesh Purohit <div.purohit@samsung.com>
Test Plan: test_combobox.c is added to elementary test
Reviewers: raster, shilpasingh, cedric, jpeg, stefan_schmidt
Reviewed By: raster, shilpasingh, cedric
Subscribers: SanghyeonLee, shashank0990, singh.amitesh, tasn, raster, seoz, poornima.srinivasan, rajeshps, govi
Differential Revision: https://phab.enlightenment.org/D2537
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-01-04 15:22:46 -08:00
|
|
|
elm_widget_sub_object_parent_add(obj);
|
|
|
|
|
|
|
|
elm_widget_mirrored_automatic_set(obj, EINA_FALSE);
|
|
|
|
|
2016-08-10 07:23:04 -07:00
|
|
|
efl_event_callback_add(obj, EFL_UI_EVENT_CLICKED, _on_clicked, obj);
|
combobox: add new widget.
Summary:
Combobox is a combinational widget of a drop-down list and single line entry.
Based on the text entered in the entry, the list items are filtered accordingly.
Signed-Off By: Cedric Bail <cedric.bail@free.fr>
Signed-Off By: Divyesh Purohit <div.purohit@samsung.com>
Test Plan: test_combobox.c is added to elementary test
Reviewers: raster, shilpasingh, cedric, jpeg, stefan_schmidt
Reviewed By: raster, shilpasingh, cedric
Subscribers: SanghyeonLee, shashank0990, singh.amitesh, tasn, raster, seoz, poornima.srinivasan, rajeshps, govi
Differential Revision: https://phab.enlightenment.org/D2537
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-01-04 15:22:46 -08:00
|
|
|
|
|
|
|
//What are you doing here?
|
2016-03-02 04:10:48 -08:00
|
|
|
elm_obj_widget_theme_apply(obj);
|
combobox: add new widget.
Summary:
Combobox is a combinational widget of a drop-down list and single line entry.
Based on the text entered in the entry, the list items are filtered accordingly.
Signed-Off By: Cedric Bail <cedric.bail@free.fr>
Signed-Off By: Divyesh Purohit <div.purohit@samsung.com>
Test Plan: test_combobox.c is added to elementary test
Reviewers: raster, shilpasingh, cedric, jpeg, stefan_schmidt
Reviewed By: raster, shilpasingh, cedric
Subscribers: SanghyeonLee, shashank0990, singh.amitesh, tasn, raster, seoz, poornima.srinivasan, rajeshps, govi
Differential Revision: https://phab.enlightenment.org/D2537
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-01-04 15:22:46 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
EOLIAN static void
|
2016-06-17 01:26:08 -07:00
|
|
|
_elm_combobox_efl_canvas_group_group_del(Eo *obj, Elm_Combobox_Data *sd)
|
combobox: add new widget.
Summary:
Combobox is a combinational widget of a drop-down list and single line entry.
Based on the text entered in the entry, the list items are filtered accordingly.
Signed-Off By: Cedric Bail <cedric.bail@free.fr>
Signed-Off By: Divyesh Purohit <div.purohit@samsung.com>
Test Plan: test_combobox.c is added to elementary test
Reviewers: raster, shilpasingh, cedric, jpeg, stefan_schmidt
Reviewed By: raster, shilpasingh, cedric
Subscribers: SanghyeonLee, shashank0990, singh.amitesh, tasn, raster, seoz, poornima.srinivasan, rajeshps, govi
Differential Revision: https://phab.enlightenment.org/D2537
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-01-04 15:22:46 -08:00
|
|
|
{
|
|
|
|
sd->hover_parent = NULL;
|
2016-08-15 06:44:41 -07:00
|
|
|
efl_canvas_group_del(efl_super(obj, MY_CLASS));
|
combobox: add new widget.
Summary:
Combobox is a combinational widget of a drop-down list and single line entry.
Based on the text entered in the entry, the list items are filtered accordingly.
Signed-Off By: Cedric Bail <cedric.bail@free.fr>
Signed-Off By: Divyesh Purohit <div.purohit@samsung.com>
Test Plan: test_combobox.c is added to elementary test
Reviewers: raster, shilpasingh, cedric, jpeg, stefan_schmidt
Reviewed By: raster, shilpasingh, cedric
Subscribers: SanghyeonLee, shashank0990, singh.amitesh, tasn, raster, seoz, poornima.srinivasan, rajeshps, govi
Differential Revision: https://phab.enlightenment.org/D2537
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-01-04 15:22:46 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
EOLIAN static void
|
2016-10-10 02:59:42 -07:00
|
|
|
_elm_combobox_efl_gfx_visible_set(Eo *obj, Elm_Combobox_Data *sd, Eina_Bool vis)
|
combobox: add new widget.
Summary:
Combobox is a combinational widget of a drop-down list and single line entry.
Based on the text entered in the entry, the list items are filtered accordingly.
Signed-Off By: Cedric Bail <cedric.bail@free.fr>
Signed-Off By: Divyesh Purohit <div.purohit@samsung.com>
Test Plan: test_combobox.c is added to elementary test
Reviewers: raster, shilpasingh, cedric, jpeg, stefan_schmidt
Reviewed By: raster, shilpasingh, cedric
Subscribers: SanghyeonLee, shashank0990, singh.amitesh, tasn, raster, seoz, poornima.srinivasan, rajeshps, govi
Differential Revision: https://phab.enlightenment.org/D2537
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-01-04 15:22:46 -08:00
|
|
|
{
|
2016-10-10 02:59:42 -07:00
|
|
|
if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_VISIBLE, 0, vis))
|
|
|
|
return;
|
combobox: add new widget.
Summary:
Combobox is a combinational widget of a drop-down list and single line entry.
Based on the text entered in the entry, the list items are filtered accordingly.
Signed-Off By: Cedric Bail <cedric.bail@free.fr>
Signed-Off By: Divyesh Purohit <div.purohit@samsung.com>
Test Plan: test_combobox.c is added to elementary test
Reviewers: raster, shilpasingh, cedric, jpeg, stefan_schmidt
Reviewed By: raster, shilpasingh, cedric
Subscribers: SanghyeonLee, shashank0990, singh.amitesh, tasn, raster, seoz, poornima.srinivasan, rajeshps, govi
Differential Revision: https://phab.enlightenment.org/D2537
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-01-04 15:22:46 -08:00
|
|
|
|
2016-10-10 02:59:42 -07:00
|
|
|
efl_gfx_visible_set(efl_super(obj, MY_CLASS), vis);
|
|
|
|
if (vis)
|
|
|
|
{
|
|
|
|
if (sd->expanded) evas_object_show(sd->hover);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
if (sd->hover) evas_object_hide(sd->hover);
|
|
|
|
}
|
combobox: add new widget.
Summary:
Combobox is a combinational widget of a drop-down list and single line entry.
Based on the text entered in the entry, the list items are filtered accordingly.
Signed-Off By: Cedric Bail <cedric.bail@free.fr>
Signed-Off By: Divyesh Purohit <div.purohit@samsung.com>
Test Plan: test_combobox.c is added to elementary test
Reviewers: raster, shilpasingh, cedric, jpeg, stefan_schmidt
Reviewed By: raster, shilpasingh, cedric
Subscribers: SanghyeonLee, shashank0990, singh.amitesh, tasn, raster, seoz, poornima.srinivasan, rajeshps, govi
Differential Revision: https://phab.enlightenment.org/D2537
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-01-04 15:22:46 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
EOLIAN static Eina_Bool
|
2017-05-16 18:28:49 -07:00
|
|
|
_elm_combobox_efl_ui_autorepeat_autorepeat_supported_get(Eo *obj EINA_UNUSED,
|
|
|
|
Elm_Combobox_Data *sd EINA_UNUSED)
|
combobox: add new widget.
Summary:
Combobox is a combinational widget of a drop-down list and single line entry.
Based on the text entered in the entry, the list items are filtered accordingly.
Signed-Off By: Cedric Bail <cedric.bail@free.fr>
Signed-Off By: Divyesh Purohit <div.purohit@samsung.com>
Test Plan: test_combobox.c is added to elementary test
Reviewers: raster, shilpasingh, cedric, jpeg, stefan_schmidt
Reviewed By: raster, shilpasingh, cedric
Subscribers: SanghyeonLee, shashank0990, singh.amitesh, tasn, raster, seoz, poornima.srinivasan, rajeshps, govi
Differential Revision: https://phab.enlightenment.org/D2537
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-01-04 15:22:46 -08:00
|
|
|
{
|
|
|
|
return EINA_FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
EAPI Evas_Object *
|
|
|
|
elm_combobox_add(Evas_Object *parent)
|
|
|
|
{
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
|
2016-08-15 06:44:41 -07:00
|
|
|
Evas_Object *obj = efl_add(MY_CLASS, parent);
|
combobox: add new widget.
Summary:
Combobox is a combinational widget of a drop-down list and single line entry.
Based on the text entered in the entry, the list items are filtered accordingly.
Signed-Off By: Cedric Bail <cedric.bail@free.fr>
Signed-Off By: Divyesh Purohit <div.purohit@samsung.com>
Test Plan: test_combobox.c is added to elementary test
Reviewers: raster, shilpasingh, cedric, jpeg, stefan_schmidt
Reviewed By: raster, shilpasingh, cedric
Subscribers: SanghyeonLee, shashank0990, singh.amitesh, tasn, raster, seoz, poornima.srinivasan, rajeshps, govi
Differential Revision: https://phab.enlightenment.org/D2537
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-01-04 15:22:46 -08:00
|
|
|
return obj;
|
|
|
|
}
|
|
|
|
|
|
|
|
EOLIAN static Eo *
|
2016-08-10 07:23:04 -07:00
|
|
|
_elm_combobox_efl_object_constructor(Eo *obj, Elm_Combobox_Data *sd)
|
combobox: add new widget.
Summary:
Combobox is a combinational widget of a drop-down list and single line entry.
Based on the text entered in the entry, the list items are filtered accordingly.
Signed-Off By: Cedric Bail <cedric.bail@free.fr>
Signed-Off By: Divyesh Purohit <div.purohit@samsung.com>
Test Plan: test_combobox.c is added to elementary test
Reviewers: raster, shilpasingh, cedric, jpeg, stefan_schmidt
Reviewed By: raster, shilpasingh, cedric
Subscribers: SanghyeonLee, shashank0990, singh.amitesh, tasn, raster, seoz, poornima.srinivasan, rajeshps, govi
Differential Revision: https://phab.enlightenment.org/D2537
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-01-04 15:22:46 -08:00
|
|
|
{
|
|
|
|
Evas_Object *gl;
|
|
|
|
Evas_Object *entry;
|
|
|
|
char buf[128];
|
|
|
|
|
2016-08-15 06:44:41 -07:00
|
|
|
obj = efl_constructor(efl_super(obj, MY_CLASS));
|
combobox: add new widget.
Summary:
Combobox is a combinational widget of a drop-down list and single line entry.
Based on the text entered in the entry, the list items are filtered accordingly.
Signed-Off By: Cedric Bail <cedric.bail@free.fr>
Signed-Off By: Divyesh Purohit <div.purohit@samsung.com>
Test Plan: test_combobox.c is added to elementary test
Reviewers: raster, shilpasingh, cedric, jpeg, stefan_schmidt
Reviewed By: raster, shilpasingh, cedric
Subscribers: SanghyeonLee, shashank0990, singh.amitesh, tasn, raster, seoz, poornima.srinivasan, rajeshps, govi
Differential Revision: https://phab.enlightenment.org/D2537
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-01-04 15:22:46 -08:00
|
|
|
|
2016-01-22 10:44:03 -08:00
|
|
|
sd->first_filter = EINA_TRUE;
|
|
|
|
|
2016-06-20 21:26:15 -07:00
|
|
|
efl_canvas_object_type_set(obj, MY_CLASS_NAME_LEGACY);
|
2016-06-16 22:12:02 -07:00
|
|
|
evas_object_smart_callbacks_descriptions_set(obj, _smart_callbacks);
|
2016-03-02 04:10:48 -08:00
|
|
|
elm_interface_atspi_accessible_role_set(obj, ELM_ATSPI_ROLE_GLASS_PANE);
|
combobox: add new widget.
Summary:
Combobox is a combinational widget of a drop-down list and single line entry.
Based on the text entered in the entry, the list items are filtered accordingly.
Signed-Off By: Cedric Bail <cedric.bail@free.fr>
Signed-Off By: Divyesh Purohit <div.purohit@samsung.com>
Test Plan: test_combobox.c is added to elementary test
Reviewers: raster, shilpasingh, cedric, jpeg, stefan_schmidt
Reviewed By: raster, shilpasingh, cedric
Subscribers: SanghyeonLee, shashank0990, singh.amitesh, tasn, raster, seoz, poornima.srinivasan, rajeshps, govi
Differential Revision: https://phab.enlightenment.org/D2537
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-01-04 15:22:46 -08:00
|
|
|
|
|
|
|
//hover-parent
|
2017-03-31 10:50:46 -07:00
|
|
|
sd->hover_parent = elm_object_top_widget_get(obj);
|
combobox: add new widget.
Summary:
Combobox is a combinational widget of a drop-down list and single line entry.
Based on the text entered in the entry, the list items are filtered accordingly.
Signed-Off By: Cedric Bail <cedric.bail@free.fr>
Signed-Off By: Divyesh Purohit <div.purohit@samsung.com>
Test Plan: test_combobox.c is added to elementary test
Reviewers: raster, shilpasingh, cedric, jpeg, stefan_schmidt
Reviewed By: raster, shilpasingh, cedric
Subscribers: SanghyeonLee, shashank0990, singh.amitesh, tasn, raster, seoz, poornima.srinivasan, rajeshps, govi
Differential Revision: https://phab.enlightenment.org/D2537
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-01-04 15:22:46 -08:00
|
|
|
|
|
|
|
//hover
|
2016-08-15 06:44:41 -07:00
|
|
|
sd->hover = efl_add(ELM_HOVER_CLASS, sd->hover_parent);
|
2017-03-31 10:56:36 -07:00
|
|
|
evas_object_layer_set(sd->hover, EVAS_LAYER_MAX);
|
combobox: add new widget.
Summary:
Combobox is a combinational widget of a drop-down list and single line entry.
Based on the text entered in the entry, the list items are filtered accordingly.
Signed-Off By: Cedric Bail <cedric.bail@free.fr>
Signed-Off By: Divyesh Purohit <div.purohit@samsung.com>
Test Plan: test_combobox.c is added to elementary test
Reviewers: raster, shilpasingh, cedric, jpeg, stefan_schmidt
Reviewed By: raster, shilpasingh, cedric
Subscribers: SanghyeonLee, shashank0990, singh.amitesh, tasn, raster, seoz, poornima.srinivasan, rajeshps, govi
Differential Revision: https://phab.enlightenment.org/D2537
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-01-04 15:22:46 -08:00
|
|
|
elm_widget_mirrored_automatic_set(sd->hover, EINA_FALSE);
|
|
|
|
elm_hover_target_set(sd->hover, obj);
|
2016-08-11 02:27:25 -07:00
|
|
|
elm_widget_sub_object_add(obj, sd->hover);
|
2016-01-22 11:07:01 -08:00
|
|
|
snprintf(buf, sizeof(buf), "combobox_vertical/%s",
|
|
|
|
elm_widget_style_get(obj));
|
|
|
|
elm_object_style_set(sd->hover, buf);
|
|
|
|
|
2016-08-10 07:23:04 -07:00
|
|
|
efl_event_callback_add
|
2016-06-10 01:29:40 -07:00
|
|
|
(sd->hover, EFL_UI_EVENT_CLICKED, _on_hover_clicked, obj);
|
2016-01-22 11:07:01 -08:00
|
|
|
elm_layout_signal_callback_add
|
|
|
|
(sd->hover, "elm,action,hide,finished", "elm", _hover_end_finished, obj);
|
combobox: add new widget.
Summary:
Combobox is a combinational widget of a drop-down list and single line entry.
Based on the text entered in the entry, the list items are filtered accordingly.
Signed-Off By: Cedric Bail <cedric.bail@free.fr>
Signed-Off By: Divyesh Purohit <div.purohit@samsung.com>
Test Plan: test_combobox.c is added to elementary test
Reviewers: raster, shilpasingh, cedric, jpeg, stefan_schmidt
Reviewed By: raster, shilpasingh, cedric
Subscribers: SanghyeonLee, shashank0990, singh.amitesh, tasn, raster, seoz, poornima.srinivasan, rajeshps, govi
Differential Revision: https://phab.enlightenment.org/D2537
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-01-04 15:22:46 -08:00
|
|
|
|
|
|
|
//table
|
|
|
|
sd->tbl = elm_table_add(obj);
|
|
|
|
evas_object_size_hint_weight_set(sd->tbl, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
|
|
|
evas_object_size_hint_align_set(sd->tbl, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
|
|
|
|
|
|
|
//spacer
|
|
|
|
sd->spacer = evas_object_rectangle_add(evas_object_evas_get(sd->hover_parent));
|
|
|
|
evas_object_size_hint_weight_set(sd->spacer, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
|
|
|
evas_object_size_hint_align_set(sd->spacer, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
|
|
|
evas_object_color_set(sd->spacer, 0, 0, 0, 0);
|
|
|
|
elm_table_pack(sd->tbl, sd->spacer, 0, 0, 1, 1);
|
|
|
|
|
|
|
|
// This is the genlist object that will take over the genlist call
|
2016-08-15 06:44:41 -07:00
|
|
|
sd->genlist = gl = efl_add(ELM_GENLIST_CLASS, obj);
|
2016-01-22 10:44:03 -08:00
|
|
|
elm_genlist_filter_set(gl, NULL);
|
combobox: add new widget.
Summary:
Combobox is a combinational widget of a drop-down list and single line entry.
Based on the text entered in the entry, the list items are filtered accordingly.
Signed-Off By: Cedric Bail <cedric.bail@free.fr>
Signed-Off By: Divyesh Purohit <div.purohit@samsung.com>
Test Plan: test_combobox.c is added to elementary test
Reviewers: raster, shilpasingh, cedric, jpeg, stefan_schmidt
Reviewed By: raster, shilpasingh, cedric
Subscribers: SanghyeonLee, shashank0990, singh.amitesh, tasn, raster, seoz, poornima.srinivasan, rajeshps, govi
Differential Revision: https://phab.enlightenment.org/D2537
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-01-04 15:22:46 -08:00
|
|
|
elm_widget_mirrored_automatic_set(gl, EINA_FALSE);
|
2017-06-13 03:41:15 -07:00
|
|
|
efl_ui_mirrored_set(gl, efl_ui_mirrored_get(obj));
|
combobox: add new widget.
Summary:
Combobox is a combinational widget of a drop-down list and single line entry.
Based on the text entered in the entry, the list items are filtered accordingly.
Signed-Off By: Cedric Bail <cedric.bail@free.fr>
Signed-Off By: Divyesh Purohit <div.purohit@samsung.com>
Test Plan: test_combobox.c is added to elementary test
Reviewers: raster, shilpasingh, cedric, jpeg, stefan_schmidt
Reviewed By: raster, shilpasingh, cedric
Subscribers: SanghyeonLee, shashank0990, singh.amitesh, tasn, raster, seoz, poornima.srinivasan, rajeshps, govi
Differential Revision: https://phab.enlightenment.org/D2537
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-01-04 15:22:46 -08:00
|
|
|
evas_object_size_hint_weight_set(gl, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
|
|
|
evas_object_size_hint_align_set(gl, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
|
|
|
evas_object_smart_callback_add(gl, "selected", _on_item_selected, obj);
|
|
|
|
evas_object_smart_callback_add(gl, "pressed", _on_item_pressed, obj);
|
2016-08-10 07:23:04 -07:00
|
|
|
efl_event_callback_add(gl, ELM_GENLIST_EVENT_FILTER_DONE, _gl_filter_finished_cb, obj);
|
combobox: add new widget.
Summary:
Combobox is a combinational widget of a drop-down list and single line entry.
Based on the text entered in the entry, the list items are filtered accordingly.
Signed-Off By: Cedric Bail <cedric.bail@free.fr>
Signed-Off By: Divyesh Purohit <div.purohit@samsung.com>
Test Plan: test_combobox.c is added to elementary test
Reviewers: raster, shilpasingh, cedric, jpeg, stefan_schmidt
Reviewed By: raster, shilpasingh, cedric
Subscribers: SanghyeonLee, shashank0990, singh.amitesh, tasn, raster, seoz, poornima.srinivasan, rajeshps, govi
Differential Revision: https://phab.enlightenment.org/D2537
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-01-04 15:22:46 -08:00
|
|
|
elm_genlist_homogeneous_set(gl, EINA_TRUE);
|
2016-01-08 15:27:09 -08:00
|
|
|
elm_genlist_mode_set(gl, ELM_LIST_COMPRESS);
|
combobox: add new widget.
Summary:
Combobox is a combinational widget of a drop-down list and single line entry.
Based on the text entered in the entry, the list items are filtered accordingly.
Signed-Off By: Cedric Bail <cedric.bail@free.fr>
Signed-Off By: Divyesh Purohit <div.purohit@samsung.com>
Test Plan: test_combobox.c is added to elementary test
Reviewers: raster, shilpasingh, cedric, jpeg, stefan_schmidt
Reviewed By: raster, shilpasingh, cedric
Subscribers: SanghyeonLee, shashank0990, singh.amitesh, tasn, raster, seoz, poornima.srinivasan, rajeshps, govi
Differential Revision: https://phab.enlightenment.org/D2537
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-01-04 15:22:46 -08:00
|
|
|
elm_table_pack(sd->tbl, gl, 0, 0, 1, 1);
|
2016-06-22 04:37:28 -07:00
|
|
|
elm_object_style_set(gl, buf);
|
combobox: add new widget.
Summary:
Combobox is a combinational widget of a drop-down list and single line entry.
Based on the text entered in the entry, the list items are filtered accordingly.
Signed-Off By: Cedric Bail <cedric.bail@free.fr>
Signed-Off By: Divyesh Purohit <div.purohit@samsung.com>
Test Plan: test_combobox.c is added to elementary test
Reviewers: raster, shilpasingh, cedric, jpeg, stefan_schmidt
Reviewed By: raster, shilpasingh, cedric
Subscribers: SanghyeonLee, shashank0990, singh.amitesh, tasn, raster, seoz, poornima.srinivasan, rajeshps, govi
Differential Revision: https://phab.enlightenment.org/D2537
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-01-04 15:22:46 -08:00
|
|
|
|
|
|
|
// This is the entry object that will take over the entry call
|
2016-08-15 06:44:41 -07:00
|
|
|
sd->entry = entry = efl_add(ELM_ENTRY_CLASS, obj);
|
combobox: add new widget.
Summary:
Combobox is a combinational widget of a drop-down list and single line entry.
Based on the text entered in the entry, the list items are filtered accordingly.
Signed-Off By: Cedric Bail <cedric.bail@free.fr>
Signed-Off By: Divyesh Purohit <div.purohit@samsung.com>
Test Plan: test_combobox.c is added to elementary test
Reviewers: raster, shilpasingh, cedric, jpeg, stefan_schmidt
Reviewed By: raster, shilpasingh, cedric
Subscribers: SanghyeonLee, shashank0990, singh.amitesh, tasn, raster, seoz, poornima.srinivasan, rajeshps, govi
Differential Revision: https://phab.enlightenment.org/D2537
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-01-04 15:22:46 -08:00
|
|
|
elm_widget_mirrored_automatic_set(entry, EINA_FALSE);
|
2017-06-13 03:41:15 -07:00
|
|
|
efl_ui_mirrored_set(entry, efl_ui_mirrored_get(obj));
|
combobox: add new widget.
Summary:
Combobox is a combinational widget of a drop-down list and single line entry.
Based on the text entered in the entry, the list items are filtered accordingly.
Signed-Off By: Cedric Bail <cedric.bail@free.fr>
Signed-Off By: Divyesh Purohit <div.purohit@samsung.com>
Test Plan: test_combobox.c is added to elementary test
Reviewers: raster, shilpasingh, cedric, jpeg, stefan_schmidt
Reviewed By: raster, shilpasingh, cedric
Subscribers: SanghyeonLee, shashank0990, singh.amitesh, tasn, raster, seoz, poornima.srinivasan, rajeshps, govi
Differential Revision: https://phab.enlightenment.org/D2537
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-01-04 15:22:46 -08:00
|
|
|
elm_scroller_policy_set(entry, ELM_SCROLLER_POLICY_OFF,
|
|
|
|
ELM_SCROLLER_POLICY_OFF);
|
|
|
|
elm_entry_scrollable_set(entry, EINA_TRUE);
|
|
|
|
elm_entry_single_line_set(entry, EINA_TRUE);
|
2016-08-10 07:23:04 -07:00
|
|
|
efl_event_callback_add(entry, ELM_ENTRY_EVENT_CHANGED_USER, _on_changed, obj);
|
|
|
|
efl_event_callback_add(entry, ELM_ENTRY_EVENT_ABORTED, _on_aborted, obj);
|
combobox: add new widget.
Summary:
Combobox is a combinational widget of a drop-down list and single line entry.
Based on the text entered in the entry, the list items are filtered accordingly.
Signed-Off By: Cedric Bail <cedric.bail@free.fr>
Signed-Off By: Divyesh Purohit <div.purohit@samsung.com>
Test Plan: test_combobox.c is added to elementary test
Reviewers: raster, shilpasingh, cedric, jpeg, stefan_schmidt
Reviewed By: raster, shilpasingh, cedric
Subscribers: SanghyeonLee, shashank0990, singh.amitesh, tasn, raster, seoz, poornima.srinivasan, rajeshps, govi
Differential Revision: https://phab.enlightenment.org/D2537
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-01-04 15:22:46 -08:00
|
|
|
evas_object_show(entry);
|
|
|
|
|
2016-04-28 07:54:34 -07:00
|
|
|
elm_object_part_content_set(obj, "elm.swallow.content", entry);
|
2016-06-22 04:37:28 -07:00
|
|
|
elm_object_style_set(entry, buf);
|
2016-04-28 07:54:34 -07:00
|
|
|
|
2016-08-10 07:23:04 -07:00
|
|
|
efl_composite_attach(obj, gl);
|
|
|
|
efl_composite_attach(obj, entry);
|
combobox: add new widget.
Summary:
Combobox is a combinational widget of a drop-down list and single line entry.
Based on the text entered in the entry, the list items are filtered accordingly.
Signed-Off By: Cedric Bail <cedric.bail@free.fr>
Signed-Off By: Divyesh Purohit <div.purohit@samsung.com>
Test Plan: test_combobox.c is added to elementary test
Reviewers: raster, shilpasingh, cedric, jpeg, stefan_schmidt
Reviewed By: raster, shilpasingh, cedric
Subscribers: SanghyeonLee, shashank0990, singh.amitesh, tasn, raster, seoz, poornima.srinivasan, rajeshps, govi
Differential Revision: https://phab.enlightenment.org/D2537
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-01-04 15:22:46 -08:00
|
|
|
|
|
|
|
return obj;
|
|
|
|
}
|
|
|
|
|
|
|
|
EOLIAN static void
|
2016-01-22 10:44:03 -08:00
|
|
|
_elm_combobox_hover_begin(Eo *obj, Elm_Combobox_Data *sd)
|
combobox: add new widget.
Summary:
Combobox is a combinational widget of a drop-down list and single line entry.
Based on the text entered in the entry, the list items are filtered accordingly.
Signed-Off By: Cedric Bail <cedric.bail@free.fr>
Signed-Off By: Divyesh Purohit <div.purohit@samsung.com>
Test Plan: test_combobox.c is added to elementary test
Reviewers: raster, shilpasingh, cedric, jpeg, stefan_schmidt
Reviewed By: raster, shilpasingh, cedric
Subscribers: SanghyeonLee, shashank0990, singh.amitesh, tasn, raster, seoz, poornima.srinivasan, rajeshps, govi
Differential Revision: https://phab.enlightenment.org/D2537
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-01-04 15:22:46 -08:00
|
|
|
{
|
|
|
|
if (!sd->hover) return;
|
2016-08-11 02:27:25 -07:00
|
|
|
elm_object_focus_set(sd->entry, EINA_TRUE);
|
2016-03-10 14:24:50 -08:00
|
|
|
|
2016-01-22 10:44:03 -08:00
|
|
|
_activate(obj);
|
combobox: add new widget.
Summary:
Combobox is a combinational widget of a drop-down list and single line entry.
Based on the text entered in the entry, the list items are filtered accordingly.
Signed-Off By: Cedric Bail <cedric.bail@free.fr>
Signed-Off By: Divyesh Purohit <div.purohit@samsung.com>
Test Plan: test_combobox.c is added to elementary test
Reviewers: raster, shilpasingh, cedric, jpeg, stefan_schmidt
Reviewed By: raster, shilpasingh, cedric
Subscribers: SanghyeonLee, shashank0990, singh.amitesh, tasn, raster, seoz, poornima.srinivasan, rajeshps, govi
Differential Revision: https://phab.enlightenment.org/D2537
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-01-04 15:22:46 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
EOLIAN static void
|
|
|
|
_elm_combobox_hover_end(Eo *obj, Elm_Combobox_Data *sd)
|
|
|
|
{
|
2016-01-22 11:07:01 -08:00
|
|
|
const char *dismissstr;
|
combobox: add new widget.
Summary:
Combobox is a combinational widget of a drop-down list and single line entry.
Based on the text entered in the entry, the list items are filtered accordingly.
Signed-Off By: Cedric Bail <cedric.bail@free.fr>
Signed-Off By: Divyesh Purohit <div.purohit@samsung.com>
Test Plan: test_combobox.c is added to elementary test
Reviewers: raster, shilpasingh, cedric, jpeg, stefan_schmidt
Reviewed By: raster, shilpasingh, cedric
Subscribers: SanghyeonLee, shashank0990, singh.amitesh, tasn, raster, seoz, poornima.srinivasan, rajeshps, govi
Differential Revision: https://phab.enlightenment.org/D2537
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-01-04 15:22:46 -08:00
|
|
|
if (!sd->hover) return;
|
2016-01-22 11:07:01 -08:00
|
|
|
dismissstr = elm_layout_data_get(sd->hover, "dismiss");
|
combobox: add new widget.
Summary:
Combobox is a combinational widget of a drop-down list and single line entry.
Based on the text entered in the entry, the list items are filtered accordingly.
Signed-Off By: Cedric Bail <cedric.bail@free.fr>
Signed-Off By: Divyesh Purohit <div.purohit@samsung.com>
Test Plan: test_combobox.c is added to elementary test
Reviewers: raster, shilpasingh, cedric, jpeg, stefan_schmidt
Reviewed By: raster, shilpasingh, cedric
Subscribers: SanghyeonLee, shashank0990, singh.amitesh, tasn, raster, seoz, poornima.srinivasan, rajeshps, govi
Differential Revision: https://phab.enlightenment.org/D2537
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-01-04 15:22:46 -08:00
|
|
|
|
2016-01-22 11:07:01 -08:00
|
|
|
if (dismissstr && !strcmp(dismissstr, "on"))
|
|
|
|
elm_hover_dismiss(sd->hover);
|
|
|
|
else
|
|
|
|
{
|
|
|
|
sd->expanded = EINA_FALSE;
|
|
|
|
evas_object_hide(sd->hover);
|
2016-08-22 15:40:39 -07:00
|
|
|
efl_event_callback_legacy_call(obj, ELM_COMBOBOX_EVENT_DISMISSED, NULL);
|
2016-01-22 11:07:01 -08:00
|
|
|
} // for backward compatibility
|
combobox: add new widget.
Summary:
Combobox is a combinational widget of a drop-down list and single line entry.
Based on the text entered in the entry, the list items are filtered accordingly.
Signed-Off By: Cedric Bail <cedric.bail@free.fr>
Signed-Off By: Divyesh Purohit <div.purohit@samsung.com>
Test Plan: test_combobox.c is added to elementary test
Reviewers: raster, shilpasingh, cedric, jpeg, stefan_schmidt
Reviewed By: raster, shilpasingh, cedric
Subscribers: SanghyeonLee, shashank0990, singh.amitesh, tasn, raster, seoz, poornima.srinivasan, rajeshps, govi
Differential Revision: https://phab.enlightenment.org/D2537
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-01-04 15:22:46 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
EOLIAN static Eina_Bool
|
|
|
|
_elm_combobox_expanded_get(Eo *obj EINA_UNUSED, Elm_Combobox_Data *sd)
|
|
|
|
{
|
|
|
|
return sd->expanded;
|
|
|
|
}
|
|
|
|
|
|
|
|
static Eina_Bool
|
|
|
|
_key_action_move(Evas_Object *obj, const char *params)
|
|
|
|
{
|
|
|
|
ELM_COMBOBOX_DATA_GET(obj, sd);
|
|
|
|
Elm_Object_Item *it = NULL;
|
|
|
|
const char *dir = params;
|
|
|
|
if (!sd->hover) return EINA_FALSE;
|
|
|
|
|
2016-01-22 11:00:20 -08:00
|
|
|
if (!strcmp(dir, "up"))
|
combobox: add new widget.
Summary:
Combobox is a combinational widget of a drop-down list and single line entry.
Based on the text entered in the entry, the list items are filtered accordingly.
Signed-Off By: Cedric Bail <cedric.bail@free.fr>
Signed-Off By: Divyesh Purohit <div.purohit@samsung.com>
Test Plan: test_combobox.c is added to elementary test
Reviewers: raster, shilpasingh, cedric, jpeg, stefan_schmidt
Reviewed By: raster, shilpasingh, cedric
Subscribers: SanghyeonLee, shashank0990, singh.amitesh, tasn, raster, seoz, poornima.srinivasan, rajeshps, govi
Differential Revision: https://phab.enlightenment.org/D2537
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-01-04 15:22:46 -08:00
|
|
|
{
|
|
|
|
it = sd->item;
|
|
|
|
it = elm_genlist_item_prev_get(it);
|
|
|
|
if (!it) sd->item = elm_genlist_last_item_get(sd->genlist);
|
|
|
|
else sd->item = it;
|
|
|
|
elm_genlist_item_selected_set(sd->item, EINA_TRUE);
|
|
|
|
}
|
|
|
|
else if (!strcmp(dir, "down"))
|
|
|
|
{
|
|
|
|
it = sd->item;
|
|
|
|
it = elm_genlist_item_next_get(it);
|
|
|
|
if (!it) sd->item = elm_genlist_first_item_get(sd->genlist);
|
|
|
|
else sd->item = it;
|
|
|
|
elm_genlist_item_selected_set(sd->item, EINA_TRUE);
|
|
|
|
}
|
|
|
|
else return EINA_FALSE;
|
|
|
|
return EINA_TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
static Eina_Bool
|
|
|
|
_key_action_activate(Evas_Object *obj, const char *params EINA_UNUSED)
|
|
|
|
{
|
2016-01-22 11:00:20 -08:00
|
|
|
ELM_COMBOBOX_DATA_GET(obj, sd);
|
|
|
|
if (!sd->expanded)
|
|
|
|
elm_combobox_hover_begin(obj);
|
|
|
|
else
|
|
|
|
{
|
2016-08-22 15:40:39 -07:00
|
|
|
efl_event_callback_legacy_call(sd->genlist, EFL_UI_EVENT_PRESSED, sd->item);
|
2016-01-22 11:00:20 -08:00
|
|
|
elm_entry_cursor_end_set(sd->entry);
|
|
|
|
}
|
combobox: add new widget.
Summary:
Combobox is a combinational widget of a drop-down list and single line entry.
Based on the text entered in the entry, the list items are filtered accordingly.
Signed-Off By: Cedric Bail <cedric.bail@free.fr>
Signed-Off By: Divyesh Purohit <div.purohit@samsung.com>
Test Plan: test_combobox.c is added to elementary test
Reviewers: raster, shilpasingh, cedric, jpeg, stefan_schmidt
Reviewed By: raster, shilpasingh, cedric
Subscribers: SanghyeonLee, shashank0990, singh.amitesh, tasn, raster, seoz, poornima.srinivasan, rajeshps, govi
Differential Revision: https://phab.enlightenment.org/D2537
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-01-04 15:22:46 -08:00
|
|
|
return EINA_TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
EOLIAN static Eina_Bool
|
2017-01-01 23:48:17 -08:00
|
|
|
_elm_combobox_elm_widget_widget_event(Eo *obj, Elm_Combobox_Data *sd,
|
combobox: add new widget.
Summary:
Combobox is a combinational widget of a drop-down list and single line entry.
Based on the text entered in the entry, the list items are filtered accordingly.
Signed-Off By: Cedric Bail <cedric.bail@free.fr>
Signed-Off By: Divyesh Purohit <div.purohit@samsung.com>
Test Plan: test_combobox.c is added to elementary test
Reviewers: raster, shilpasingh, cedric, jpeg, stefan_schmidt
Reviewed By: raster, shilpasingh, cedric
Subscribers: SanghyeonLee, shashank0990, singh.amitesh, tasn, raster, seoz, poornima.srinivasan, rajeshps, govi
Differential Revision: https://phab.enlightenment.org/D2537
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-01-04 15:22:46 -08:00
|
|
|
Evas_Object *src EINA_UNUSED,
|
|
|
|
Evas_Callback_Type type, void *event_info)
|
|
|
|
{
|
|
|
|
Evas_Event_Key_Down *ev = event_info;
|
|
|
|
if (!sd || !sd->hover) return EINA_FALSE;
|
|
|
|
if (type != EVAS_CALLBACK_KEY_DOWN) return EINA_FALSE;
|
|
|
|
if (ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD) return EINA_FALSE;
|
|
|
|
if (!_elm_config_key_binding_call(obj, MY_CLASS_NAME, ev, key_actions))
|
|
|
|
return EINA_FALSE;
|
|
|
|
|
|
|
|
ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
|
|
|
|
return EINA_TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2016-08-10 07:23:04 -07:00
|
|
|
_elm_combobox_class_constructor(Efl_Class *klass)
|
combobox: add new widget.
Summary:
Combobox is a combinational widget of a drop-down list and single line entry.
Based on the text entered in the entry, the list items are filtered accordingly.
Signed-Off By: Cedric Bail <cedric.bail@free.fr>
Signed-Off By: Divyesh Purohit <div.purohit@samsung.com>
Test Plan: test_combobox.c is added to elementary test
Reviewers: raster, shilpasingh, cedric, jpeg, stefan_schmidt
Reviewed By: raster, shilpasingh, cedric
Subscribers: SanghyeonLee, shashank0990, singh.amitesh, tasn, raster, seoz, poornima.srinivasan, rajeshps, govi
Differential Revision: https://phab.enlightenment.org/D2537
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-01-04 15:22:46 -08:00
|
|
|
{
|
|
|
|
evas_smart_legacy_type_register(MY_CLASS_NAME_LEGACY, klass);
|
|
|
|
}
|
|
|
|
|
|
|
|
EOLIAN const Elm_Atspi_Action *
|
|
|
|
_elm_combobox_elm_interface_atspi_widget_action_elm_actions_get(Eo *obj EINA_UNUSED,
|
|
|
|
Elm_Combobox_Data *pd
|
|
|
|
EINA_UNUSED)
|
|
|
|
{
|
|
|
|
static Elm_Atspi_Action atspi_actions[] = {
|
|
|
|
{"activate", "activate", "return", _key_action_activate},
|
|
|
|
{"move,up", "move", "up", _key_action_move},
|
|
|
|
{"move,down", "move", "down", _key_action_move},
|
|
|
|
{NULL, NULL, NULL, NULL}
|
|
|
|
};
|
|
|
|
return &atspi_actions[0];
|
|
|
|
}
|
|
|
|
|
2016-01-22 10:44:03 -08:00
|
|
|
EOLIAN void
|
2016-01-25 04:43:03 -08:00
|
|
|
_elm_combobox_elm_genlist_filter_set(Eo *obj EINA_UNUSED, Elm_Combobox_Data *pd, void *key)
|
2016-01-22 10:44:03 -08:00
|
|
|
{
|
|
|
|
pd->first_filter = EINA_FALSE;
|
|
|
|
|
2016-03-02 04:10:48 -08:00
|
|
|
elm_obj_genlist_filter_set(pd->genlist, key);
|
2016-01-22 10:44:03 -08:00
|
|
|
}
|
|
|
|
|
combobox: add new widget.
Summary:
Combobox is a combinational widget of a drop-down list and single line entry.
Based on the text entered in the entry, the list items are filtered accordingly.
Signed-Off By: Cedric Bail <cedric.bail@free.fr>
Signed-Off By: Divyesh Purohit <div.purohit@samsung.com>
Test Plan: test_combobox.c is added to elementary test
Reviewers: raster, shilpasingh, cedric, jpeg, stefan_schmidt
Reviewed By: raster, shilpasingh, cedric
Subscribers: SanghyeonLee, shashank0990, singh.amitesh, tasn, raster, seoz, poornima.srinivasan, rajeshps, govi
Differential Revision: https://phab.enlightenment.org/D2537
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-01-04 15:22:46 -08:00
|
|
|
EOLIAN void
|
|
|
|
_elm_combobox_elm_widget_part_text_set(Eo *obj EINA_UNUSED, Elm_Combobox_Data *pd,
|
|
|
|
const char * part, const char *label)
|
|
|
|
{
|
2016-08-11 02:27:25 -07:00
|
|
|
elm_object_part_text_set(pd->entry, part, label);
|
combobox: add new widget.
Summary:
Combobox is a combinational widget of a drop-down list and single line entry.
Based on the text entered in the entry, the list items are filtered accordingly.
Signed-Off By: Cedric Bail <cedric.bail@free.fr>
Signed-Off By: Divyesh Purohit <div.purohit@samsung.com>
Test Plan: test_combobox.c is added to elementary test
Reviewers: raster, shilpasingh, cedric, jpeg, stefan_schmidt
Reviewed By: raster, shilpasingh, cedric
Subscribers: SanghyeonLee, shashank0990, singh.amitesh, tasn, raster, seoz, poornima.srinivasan, rajeshps, govi
Differential Revision: https://phab.enlightenment.org/D2537
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-01-04 15:22:46 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
EOLIAN const char *
|
|
|
|
_elm_combobox_elm_widget_part_text_get(Eo *obj EINA_UNUSED, Elm_Combobox_Data *pd,
|
|
|
|
const char * part)
|
|
|
|
{
|
|
|
|
return elm_object_part_text_get(pd->entry, part);
|
|
|
|
}
|
|
|
|
|
|
|
|
EOLIAN static void
|
evas/elm: Remove function group_resize
This is an override of efl_gfx_size_set. Same as before, the
order of operations matter so it is possible that a corner
case will break. In particular, legacy code was:
- intercept
- smart resize (do stuff), super, super, super
- evas object resize
The new code is more like:
- intercept
- super, super, super, evas object resize
- do stuff
But unfortunately this broke elm_widget (read: all widgets) as
the internal resize was done before the object resize. So,
inside the resize event cb, the resize_obj size would not match
the smart object size. >_<
2016-10-11 00:54:31 -07:00
|
|
|
_elm_combobox_efl_gfx_size_set(Eo *obj, Elm_Combobox_Data *pd, Evas_Coord w, Evas_Coord h)
|
combobox: add new widget.
Summary:
Combobox is a combinational widget of a drop-down list and single line entry.
Based on the text entered in the entry, the list items are filtered accordingly.
Signed-Off By: Cedric Bail <cedric.bail@free.fr>
Signed-Off By: Divyesh Purohit <div.purohit@samsung.com>
Test Plan: test_combobox.c is added to elementary test
Reviewers: raster, shilpasingh, cedric, jpeg, stefan_schmidt
Reviewed By: raster, shilpasingh, cedric
Subscribers: SanghyeonLee, shashank0990, singh.amitesh, tasn, raster, seoz, poornima.srinivasan, rajeshps, govi
Differential Revision: https://phab.enlightenment.org/D2537
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-01-04 15:22:46 -08:00
|
|
|
{
|
evas/elm: Remove function group_resize
This is an override of efl_gfx_size_set. Same as before, the
order of operations matter so it is possible that a corner
case will break. In particular, legacy code was:
- intercept
- smart resize (do stuff), super, super, super
- evas object resize
The new code is more like:
- intercept
- super, super, super, evas object resize
- do stuff
But unfortunately this broke elm_widget (read: all widgets) as
the internal resize was done before the object resize. So,
inside the resize event cb, the resize_obj size would not match
the smart object size. >_<
2016-10-11 00:54:31 -07:00
|
|
|
if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_RESIZE, 0, w, h))
|
|
|
|
return;
|
|
|
|
|
combobox: add new widget.
Summary:
Combobox is a combinational widget of a drop-down list and single line entry.
Based on the text entered in the entry, the list items are filtered accordingly.
Signed-Off By: Cedric Bail <cedric.bail@free.fr>
Signed-Off By: Divyesh Purohit <div.purohit@samsung.com>
Test Plan: test_combobox.c is added to elementary test
Reviewers: raster, shilpasingh, cedric, jpeg, stefan_schmidt
Reviewed By: raster, shilpasingh, cedric
Subscribers: SanghyeonLee, shashank0990, singh.amitesh, tasn, raster, seoz, poornima.srinivasan, rajeshps, govi
Differential Revision: https://phab.enlightenment.org/D2537
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-01-04 15:22:46 -08:00
|
|
|
if (pd->count > 0) _table_resize(obj);
|
evas/elm: Remove function group_resize
This is an override of efl_gfx_size_set. Same as before, the
order of operations matter so it is possible that a corner
case will break. In particular, legacy code was:
- intercept
- smart resize (do stuff), super, super, super
- evas object resize
The new code is more like:
- intercept
- super, super, super, evas object resize
- do stuff
But unfortunately this broke elm_widget (read: all widgets) as
the internal resize was done before the object resize. So,
inside the resize event cb, the resize_obj size would not match
the smart object size. >_<
2016-10-11 00:54:31 -07:00
|
|
|
efl_gfx_size_set(efl_super(obj, MY_CLASS), w, h);
|
combobox: add new widget.
Summary:
Combobox is a combinational widget of a drop-down list and single line entry.
Based on the text entered in the entry, the list items are filtered accordingly.
Signed-Off By: Cedric Bail <cedric.bail@free.fr>
Signed-Off By: Divyesh Purohit <div.purohit@samsung.com>
Test Plan: test_combobox.c is added to elementary test
Reviewers: raster, shilpasingh, cedric, jpeg, stefan_schmidt
Reviewed By: raster, shilpasingh, cedric
Subscribers: SanghyeonLee, shashank0990, singh.amitesh, tasn, raster, seoz, poornima.srinivasan, rajeshps, govi
Differential Revision: https://phab.enlightenment.org/D2537
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-01-04 15:22:46 -08:00
|
|
|
}
|
2017-05-18 01:52:17 -07:00
|
|
|
|
|
|
|
/* Internal EO APIs and hidden overrides */
|
|
|
|
|
|
|
|
#define ELM_COMBOBOX_EXTRA_OPS \
|
|
|
|
EFL_CANVAS_GROUP_ADD_DEL_OPS(elm_combobox)
|
|
|
|
|
combobox: add new widget.
Summary:
Combobox is a combinational widget of a drop-down list and single line entry.
Based on the text entered in the entry, the list items are filtered accordingly.
Signed-Off By: Cedric Bail <cedric.bail@free.fr>
Signed-Off By: Divyesh Purohit <div.purohit@samsung.com>
Test Plan: test_combobox.c is added to elementary test
Reviewers: raster, shilpasingh, cedric, jpeg, stefan_schmidt
Reviewed By: raster, shilpasingh, cedric
Subscribers: SanghyeonLee, shashank0990, singh.amitesh, tasn, raster, seoz, poornima.srinivasan, rajeshps, govi
Differential Revision: https://phab.enlightenment.org/D2537
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-01-04 15:22:46 -08:00
|
|
|
#include "elm_combobox.eo.c"
|