&arrow_size.x, &arrow_size.y);
evas_object_resize(wd->arrow, arrow_size.x, arrow_size.y);
- //Initialize Area Rectangle.
+ //Initialize Area Rectangle.
if (wd->hover_parent)
evas_object_geometry_get(wd->hover_parent, &hover_area.x, &hover_area.y,
&hover_area.w, &hover_area.h);
evas_object_geometry_get(obj, &pos.x, &pos.y, NULL, NULL);
- //recalc the edje
+ //recalc the edje
edje_object_size_min_calc(wd->base, &base_size.x, &base_size.y);
evas_object_smart_calculate(wd->base);
if ((max_size.x > 0) && (base_size.x > max_size.x))
base_size.x = max_size.x;
- //Limit to Min Size
+ //Limit to Min Size
evas_object_size_hint_min_get(obj, &min_size.x, &min_size.y);
if ((min_size.y > 0) && (base_size.y < min_size.y))
base_size.x = min_size.x;
//Check the Which direction is available.
- //If find a avaialble direction, it adjusts position and size.
+ //If find a avaialble direction, it adjusts position and size.
for (idx = 0; idx < 4; idx++)
{
switch (wd->dir_priority[idx])
}
}
- //Final position and size.
+ //Final position and size.
rect->x = pos.x;
rect->y = pos.y;
rect->w = base_size.x;
wd = elm_widget_data_get(obj);
if ((!wd) || (!wd->parent)) return;
- //Box, Scroller
+ //Box, Scroller
EINA_LIST_FOREACH(wd->items, elist, item)
{
_item_sizing_eval(item);
_update_arrow(obj, wd->dir);
_shift_base_by_arrow(wd->arrow, wd->dir, &rect);
- //resize scroller according to final size.
+ //resize scroller according to final size.
if (!wd->content)
evas_object_smart_calculate(wd->scr);
if (wd->scr)
{
- if (!strncmp(elm_object_style_get(obj), "default",
+ if (!strncmp(elm_object_style_get(obj), "default",
strlen("default")))
elm_object_style_set(wd->scr, "ctxpopup");
- else
+ else
elm_object_style_set(wd->scr, elm_object_style_get(obj));
}
elm_object_style_set(wd->scr, "ctxpopup");
evas_object_size_hint_align_set(wd->scr, EVAS_HINT_FILL, EVAS_HINT_FILL);
evas_object_event_callback_add(wd->scr, EVAS_CALLBACK_RESIZE,
- _scroller_resize, obj);
- edje_object_part_swallow(wd->base, "elm.swallow.content", wd->scr);
+ _scroller_resize, obj);
+ edje_object_part_swallow(wd->base, "elm.swallow.content", wd->scr);
//box
wd->box = elm_box_add(obj);
EVAS_HINT_EXPAND);
elm_scroller_content_set(wd->scr, wd->box);
- elm_ctxpopup_horizontal_set(obj, wd->horizontal);
+ elm_ctxpopup_horizontal_set(obj, wd->horizontal);
}
static void
}
/**
- * Sets the side icon associated with the ctxpopup item
+ * Sets the side icon associated with the ctxpopup item
*
* Once the icon object is set, a previously set one will be deleted.
* You probably don't want, then, to have the <b>same</b> icon object
* set for more than one item of the list (when replacing one of its
* instances).
- *
+ *
* @param item Ctxpopup item
* @param icon Icon object to be set
*
*
* @param item Ctxpopup item
* @param label String to set as label
- *
+ *
* @ingroup Ctxpopup
*/
EAPI void
}
/**
- * Set the Ctxpopup's parent
- * Set the parent object (it would much probably be the
+ * Set the Ctxpopup's parent
+ * Set the parent object (it would much probably be the
* window that the ctxpopup is in).
*
* @param obj The ctxpopup object
}
/**
- * Get the Ctxpopup's parent
+ * Get the Ctxpopup's parent
*
* @param obj The ctxpopup object
*
* Add a new item to a ctxpopup object.
*
* Both a item list and a content could not be set at the same time!
- * once you set add a item, the previous content will be removed.
+ * once you set add a item, the previous content will be removed.
*
* @param obj Ctxpopup object
- * @param icon Icon to be set on new item
- * @param label The Label of the new item
+ * @param icon Icon to be set on new item
+ * @param label The Label of the new item
* @param func Convenience function called when item selected
* @param data Data passed to @p func above
* @return A handle to the item added or @c NULL, on errors
- *
+ *
* @ingroup Ctxpopup
*/
EAPI Elm_Ctxpopup_Item *
_item_new(item, "icon_text_style_item");
else if (label)
_item_new(item, "text_style_item");
- else
+ else
_item_new(item, "icon_style_item");
_item_icon_set(item, icon);
/**
* Once the content object is set, a previously set one will be deleted.
- * If you want to keep that old content object, use the
+ * If you want to keep that old content object, use the
* elm_ctxpopup_content_unset() function
- *
+ *
* Both a item list and a content could not be set at the same time!
- * once you set a content, the previous list items will be removed.
+ * once you set a content, the previous list items will be removed.
*
* @param obj Ctxpopup object
* @param content Content to be swallowed
* Unset the ctxpopup content
*
* Unparent and return the content object which was set for this widget
- *
+ *
* @param obj Ctxpopup object
* @return The content that was being used
*
*
* @param obj Ctxpopup object
* @param first 1st priority of direction to be returned
- * @param second 2nd priority of direction to be returned
- * @param third 3th priority of direction to be returned
- * @param fourth 4th priority of direction to be returned
+ * @param second 2nd priority of direction to be returned
+ * @param third 3th priority of direction to be returned
+ * @param fourth 4th priority of direction to be returned
*
* @see elm_ctxpopup_direction_priority_set for more information.
- *
+ *
* @ingroup Ctxpopup
*/
EAPI void