elm_image + elm_icon.
SVN revision: 68719
if (item->icon_file)
{
ic = elm_icon_add(obj);
- elm_icon_scale_set(ic, 0, 1);
+ elm_icon_resizable_set(ic, EINA_FALSE, EINA_TRUE);
if (item->icon_type == ELM_ICON_FILE)
elm_icon_file_set(ic, item->icon_file, item->icon_group);
else if (item->icon_type == ELM_ICON_STANDARD)
EINA_DEPRECATED EAPI Evas_Object *elm_conformant_content_area_get(const Evas_Object *obj);
/**
+ * Set if the object is (up/down) resizeable.
+ *
+ * @param obj The image object
+ * @param scale_up A bool to set if the object is resizeable up. Default is
+ * @c EINA_TRUE.
+ * @param scale_down A bool to set if the object is resizeable down. Default
+ * is @c EINA_TRUE.
+ *
+ * This function limits the image resize ability. If @p scale_up is set to
+ * @c EINA_FALSE, the object can't have its height or width resized to a value
+ * higher than the original image size. Same is valid for @p scale_down.
+ *
+ * @see elm_image_scale_get()
+ * @deprecated Please use elm_image_resizable_set()
+ *
+ * @ingroup Image
+ */
+EINA_DEPRECATED EAPI void elm_image_scale_set(Evas_Object *obj, Eina_Bool scale_up, Eina_Bool scale_down);
+
+/**
+ * Get if the object is (up/down) resizeable.
+ *
+ * @param obj The image object
+ * @param scale_up A bool to set if the object is resizeable up
+ * @param scale_down A bool to set if the object is resizeable down
+ *
+ * @see elm_image_scale_set()
+ * @deprecated Please use elm_image_resizable_get()
+ *
+ * @ingroup Image
+ */
+EINA_DEPRECATED EAPI void elm_image_scale_get(const Evas_Object *obj, Eina_Bool *scale_up, Eina_Bool *scale_down);
+
+/**
+ * Set if the object is (up/down) resizeable.
+ *
+ * @param obj The icon object
+ * @param scale_up A bool to set if the object is resizeable up. Default is
+ * @c EINA_TRUE.
+ * @param scale_down A bool to set if the object is resizeable down. Default
+ * is @c EINA_TRUE.
+ *
+ * This function limits the icon object resize ability. If @p scale_up is set to
+ * @c EINA_FALSE, the object can't have its height or width resized to a value
+ * higher than the original icon size. Same is valid for @p scale_down.
+ *
+ * @see elm_icon_scale_get()
+ * @deprecated Please use elm_icon_resizable_set()
+ *
+ * @ingroup Icon
+ */
+EINA_DEPRECATED EAPI void elm_icon_scale_set(Evas_Object *obj, Eina_Bool scale_up, Eina_Bool scale_down);
+
+/**
+ * Get if the object is (up/down) resizeable.
+ *
+ * @param obj The icon object
+ * @param scale_up A bool to set if the object is resizeable up
+ * @param scale_down A bool to set if the object is resizeable down
+ *
+ * @see elm_icon_scale_set()
+ * @deprecated Please use elm_icon_resizable_get()
+ *
+ * @ingroup Icon
+ */
+EINA_DEPRECATED EAPI void elm_icon_scale_get(const Evas_Object *obj, Eina_Bool *scale_up, Eina_Bool *scale_down);
+/**
* @}
*/
* disk = elm_diskselector_add(win);
* ic = elm_icon_add(win);
* elm_icon_file_set(ic, "path/to/image", NULL);
- * elm_icon_scale_set(ic, EINA_TRUE, EINA_TRUE);
+ * elm_icon_resizable_set(ic, EINA_TRUE, EINA_TRUE);
* elm_diskselector_item_append(disk, "label", ic, NULL, NULL);
* @endcode
*
return wd->no_scale;
}
-EAPI void
+EINA_DEPRECATED EAPI void
elm_icon_scale_set(Evas_Object *obj, Eina_Bool scale_up, Eina_Bool scale_down)
{
+ elm_icon_resizable_set(obj, scale_up, scale_down);
+}
+
+EINA_DEPRECATED EAPI void
+elm_icon_scale_get(const Evas_Object *obj, Eina_Bool *scale_up, Eina_Bool *scale_down)
+{
+ elm_icon_resizable_get(obj, scale_up, scale_down);
+}
+
+EAPI void
+elm_icon_resizable_set(Evas_Object *obj, Eina_Bool size_up, Eina_Bool size_down)
+{
ELM_CHECK_WIDTYPE(obj, widtype);
Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return;
- wd->scale_up = scale_up;
- wd->scale_down = scale_down;
+ wd->scale_up = size_up;
+ wd->scale_down = size_down;
if (!wd->in_eval) _sizing_eval(obj);
}
EAPI void
-elm_icon_scale_get(const Evas_Object *obj, Eina_Bool *scale_up, Eina_Bool *scale_down)
+elm_icon_resizable_get(const Evas_Object *obj, Eina_Bool *size_up, Eina_Bool *size_down)
{
ELM_CHECK_WIDTYPE(obj, widtype);
Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return;
- if (scale_up) *scale_up = wd->scale_up;
- if (scale_down) *scale_down = wd->scale_down;
+ if (size_up) *size_up = wd->scale_up;
+ if (size_down) *size_down = wd->scale_down;
}
EAPI void
* This function disables scaling of the icon object through the function
* elm_object_scale_set(). However, this does not affect the object
* size/resize in any way. For that effect, take a look at
- * elm_icon_scale_set().
+ * elm_icon_resizable_set().
*
* @see elm_icon_no_scale_get()
- * @see elm_icon_scale_set()
+ * @see elm_icon_resizable_set()
* @see elm_object_scale_set()
*
* @ingroup Icon
* Set if the object is (up/down) resizeable.
*
* @param obj The icon object
- * @param scale_up A bool to set if the object is resizeable up. Default is
+ * @param size_up A bool to set if the object is resizeable up. Default is
* @c EINA_TRUE.
- * @param scale_down A bool to set if the object is resizeable down. Default
+ * @param size_down A bool to set if the object is resizeable down. Default
* is @c EINA_TRUE.
*
- * This function limits the icon object resize ability. If @p scale_up is set to
+ * This function limits the icon object resize ability. If @p size_up is set to
* @c EINA_FALSE, the object can't have its height or width resized to a value
- * higher than the original icon size. Same is valid for @p scale_down.
+ * higher than the original icon size. Same is valid for @p size_down.
*
- * @see elm_icon_scale_get()
+ * @see elm_icon_resizable_get()
*
* @ingroup Icon
*/
-EAPI void elm_icon_scale_set(Evas_Object *obj, Eina_Bool scale_up, Eina_Bool scale_down);
+EAPI void elm_icon_resizable_set(Evas_Object *obj, Eina_Bool size_up, Eina_Bool size_down);
/**
* Get if the object is (up/down) resizeable.
*
* @param obj The icon object
- * @param scale_up A bool to set if the object is resizeable up
- * @param scale_down A bool to set if the object is resizeable down
+ * @param size_up A bool to set if the object is resizeable up
+ * @param size_down A bool to set if the object is resizeable down
*
- * @see elm_icon_scale_set()
+ * @see elm_icon_resizable_set()
*
* @ingroup Icon
*/
-EAPI void elm_icon_scale_get(const Evas_Object *obj, Eina_Bool *scale_up, Eina_Bool *scale_down);
+EAPI void elm_icon_resizable_get(const Evas_Object *obj, Eina_Bool *size_up, Eina_Bool *size_down);
/**
* Get the object's image size
return wd->no_scale;
}
-EAPI void
+EINA_DEPRECATED EAPI void
elm_image_scale_set(Evas_Object *obj, Eina_Bool scale_up, Eina_Bool scale_down)
{
+ elm_image_resizable_set(obj, scale_up, scale_down);
+}
+
+EINA_DEPRECATED EAPI void
+elm_image_scale_get(const Evas_Object *obj, Eina_Bool *scale_up, Eina_Bool *scale_down)
+{
+ elm_image_resizable_get(obj, scale_up, scale_down);
+}
+
+EAPI void
+elm_image_resizable_set(Evas_Object *obj, Eina_Bool size_up, Eina_Bool size_down)
+{
ELM_CHECK_WIDTYPE(obj, widtype);
Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return;
- wd->scale_up = scale_up;
- wd->scale_down = scale_down;
+ wd->scale_up = size_up;
+ wd->scale_down = size_down;
_sizing_eval(obj);
}
EAPI void
-elm_image_scale_get(const Evas_Object *obj, Eina_Bool *scale_up, Eina_Bool *scale_down)
+elm_image_resizable_get(const Evas_Object *obj, Eina_Bool *size_up, Eina_Bool *size_down)
{
ELM_CHECK_WIDTYPE(obj, widtype);
Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return;
- if (scale_up) *scale_up = wd->scale_up;
- if (scale_down) *scale_down = wd->scale_down;
+ if (size_up) *size_up = wd->scale_up;
+ if (size_down) *size_down = wd->scale_down;
}
EAPI void
* This function disables scaling of the elm_image widget through the
* function elm_object_scale_set(). However, this does not affect the widget
* size/resize in any way. For that effect, take a look at
- * elm_image_scale_set().
+ * elm_image_resizable_set().
*
* @see elm_image_no_scale_get()
- * @see elm_image_scale_set()
+ * @see elm_image_resizable_set()
* @see elm_object_scale_set()
*
* @ingroup Image
* Set if the object is (up/down) resizeable.
*
* @param obj The image object
- * @param scale_up A bool to set if the object is resizeable up. Default is
+ * @param size_up A bool to set if the object is resizeable up. Default is
* @c EINA_TRUE.
- * @param scale_down A bool to set if the object is resizeable down. Default
+ * @param size_down A bool to set if the object is resizeable down. Default
* is @c EINA_TRUE.
*
- * This function limits the image resize ability. If @p scale_up is set to
+ * This function limits the image resize ability. If @p size_up is set to
* @c EINA_FALSE, the object can't have its height or width resized to a value
- * higher than the original image size. Same is valid for @p scale_down.
+ * higher than the original image size. Same is valid for @p size_down.
*
- * @see elm_image_scale_get()
+ * @see elm_image_resizable_get()
*
* @ingroup Image
*/
-//XXX: elm_image_resizable_set
-EAPI void elm_image_scale_set(Evas_Object *obj, Eina_Bool scale_up, Eina_Bool scale_down);
+EAPI void elm_image_resizable_set(Evas_Object *obj, Eina_Bool size_up, Eina_Bool size_down);
/**
* Get if the object is (up/down) resizeable.
*
* @param obj The image object
- * @param scale_up A bool to set if the object is resizeable up
- * @param scale_down A bool to set if the object is resizeable down
+ * @param size_up A bool to set if the object is resizeable up
+ * @param size_down A bool to set if the object is resizeable down
*
- * @see elm_image_scale_set()
+ * @see elm_image_resizable_set()
*
* @ingroup Image
*/
-//XXX: elm_image_resizable_get
-EAPI void elm_image_scale_get(const Evas_Object *obj, Eina_Bool *scale_up, Eina_Bool *scale_down);
+EAPI void elm_image_resizable_get(const Evas_Object *obj, Eina_Bool *size_up, Eina_Bool *size_down);
/**
* Set if the image fills the entire object area, when keeping the aspect ratio.
* li = elm_list_add(win);
* ic = elm_icon_add(win);
* elm_icon_file_set(ic, "path/to/image", NULL);
- * elm_icon_scale_set(ic, EINA_TRUE, EINA_TRUE);
+ * elm_icon_resizable_set(ic, EINA_TRUE, EINA_TRUE);
* elm_list_item_append(li, "label", ic, NULL, NULL, NULL);
* elm_list_go(li);
* evas_object_show(li);
if (!icon || !parent) return NULL;
// Evas_Object do not support object duplication??
const char *file = NULL, *group = NULL;
- Eina_Bool scale_up, scale_down;
+ Eina_Bool size_up, size_down;
Evas_Object *dup = elm_icon_add(parent);
elm_icon_file_get(icon, &file, &group);
elm_icon_standard_set(dup, elm_icon_standard_get(icon));
elm_icon_order_lookup_set(dup, elm_icon_order_lookup_get(icon));
elm_icon_no_scale_set(dup, elm_icon_no_scale_get(icon));
- elm_icon_scale_get(icon, &scale_up, &scale_down);
- elm_icon_scale_set(dup, scale_up, scale_down);
+ elm_icon_resizable_get(icon, &size_up, &size_down);
+ elm_icon_resizable_set(dup, size_up, size_down);
elm_icon_fill_outside_set(dup, elm_icon_fill_outside_get(icon));
elm_icon_prescale_set(dup, elm_icon_prescale_get(icon));
elm_icon_aspect_fixed_set(dup, elm_icon_aspect_fixed_get(icon));
* sc = elm_segment_control_add(win);
* ic = elm_icon_add(win);
* elm_icon_file_set(ic, "path/to/image", NULL);
- * elm_icon_scale_set(ic, EINA_TRUE, EINA_TRUE);
+ * elm_icon_resizable_set(ic, EINA_TRUE, EINA_TRUE);
* elm_segment_control_item_add(sc, ic, "label");
* evas_object_show(sc);
* @endcode
m->details.icon.h);
elm_icon_smooth_set(ic, m->details.icon.smooth);
elm_icon_no_scale_set(ic, m->details.icon.no_scale);
- elm_icon_scale_set(ic,
+ elm_icon_resizable_set(ic,
m->details.icon.scale_up,
m->details.icon.scale_down);
if (s)