Edje_Edit: ability to set size class into certain part's state
authorVitalii Vorobiov <vi.vorobiov@samsung.com>
Tue, 23 Feb 2016 18:07:12 +0000 (18:07 +0000)
committerVitalii Vorobiov <vi.vorobiov@samsung.com>
Tue, 23 Feb 2016 18:54:04 +0000 (18:54 +0000)
API looks like this edje_edit_state_size_class_set

src/lib/edje/Edje_Edit.h
src/lib/edje/edje_edit.c

index 12af3d7..e775f56 100644 (file)
@@ -3759,6 +3759,21 @@ EAPI Eina_Bool edje_edit_state_align_x_set(Evas_Object *obj, const char *part, c
  */
 EAPI Eina_Bool edje_edit_state_align_y_set(Evas_Object *obj, const char *part, const char *state, double value,  double align);
 
+/** Set the size class of the given part state.
+ *
+ * @param obj Object being edited.
+ * @param part Part that contain state.
+ * @param state The name of the state to set size class (not including the state value).
+ * @param value The state value.
+ * @param text_class The size class to assign.
+ *
+ * @return @c EINA_TRUE in case of success, @c EINA_FALSE otherwise.
+ *
+ * @since 1.18
+ */
+EAPI Eina_Bool
+edje_edit_state_text_class_set(Evas_Object *obj, const char *part, const char *state, double value, const char *size_class);
+
 /** Get the minimum width value of a part state.
  *
  * @param obj Object being edited.
index 913af78..582fff9 100644 (file)
@@ -6329,6 +6329,16 @@ FUNC_STATE_DOUBLE(minmul, w);
 FUNC_STATE_DOUBLE(minmul, h);
 
 EAPI Eina_Bool
+edje_edit_state_size_class_set(Evas_Object *obj, const char *part, const char *state, double value, const char *size_class)
+{
+   GET_PD_OR_RETURN(EINA_FALSE);
+
+   _edje_if_string_replace(ed, &pd->size_class, size_class);
+
+   return EINA_TRUE;
+}
+
+EAPI Eina_Bool
 edje_edit_state_fill_smooth_get(Evas_Object *obj, const char *part, const char *state, double value)
 {
    GET_PD_OR_RETURN(EINA_FALSE)