* by letter.
*/
+#define MIN_GRP_SIZE 2 //for symmetry it is 2, otherwise it can be 1 and zero have no meaning.
+#define MIN_PIXEL_VALUE 1 //Min pixel value is highly dependent on touch sensitivity support.
+#define MIN_OBJ_HEIGHT 24 //should be taken from .edc file.
typedef struct _Widget_Data Widget_Data;
- typedef struct _Item Item;
+typedef struct _PlacementPart PlacementPart;
struct _Widget_Data
{
Eina_Bool horizontal : 1;
Eina_Bool active : 1;
Eina_Bool down : 1;
+ int max_supp_items_count;
+ int tot_items_count[2];
+ Evas_Coord pwidth, pheight;
+ int min_obj_height, max_grp_size;
+ int items_count;
+ double scale_factor;
+ const char *special_char;
+ int min_1st_level_obj_height;
};
- struct _Item
+ struct _Elm_Index_Item
{
Evas_Object *obj;
const char *letter;
static void _sizing_eval(Evas_Object *obj);
static void _index_box_auto_fill(Evas_Object *obj, Evas_Object *box, int level);
static void _index_box_clear(Evas_Object *obj, Evas_Object *box, int level);
- static void _item_free(Item *it);
+ static void _item_free(Elm_Index_Item *it);
+static void _index_process(Evas_Object *obj);
static void
_del_hook(Evas_Object *obj)
_item_new(Evas_Object *obj, const char *letter, const void *item)
{
Widget_Data *wd = elm_widget_data_get(obj);
- Item *it;
+ Elm_Index_Item *it;
if (!wd) return NULL;
- it = calloc(1, sizeof(Item));
+ it = calloc(1, sizeof(Elm_Index_Item));
if (!it) return NULL;
it->obj = obj;
- it->letter = eina_stringshare_add(letter);
it->data = item;
it->level = wd->level;
+ if(wd->level == 0)
+ it->size = wd->min_obj_height;
+ else
+ it->size = wd->min_1st_level_obj_height;
+ if(letter)
+ {
+ it->letter = eina_stringshare_add(letter);
+ it->vis_letter = eina_stringshare_add(letter);
+ }
+ else
+ {
+ return NULL;
+ }
return it;
}
Eina_List *l;
Evas_Coord x, y, w, h, bx, by, bw, bh, xx, yy;
double cdv = 0.5;
+ double cdvv = 0.0;
+ double dmax = 0.0;
+ double dmin = 0.0;
Evas_Coord dist;
- Eina_Bool change = 0;
+ Eina_Bool change = EINA_FALSE;
char *label = NULL, *last = NULL;
int i;
if (!wd) return;