add elm_frame_collapse_go() to trigger frame animations, elm_frame_collapse_set() now bypasses them
SVN revision: 67207
This commit is contained in:
parent
bce3f15937
commit
0601070403
|
@ -145,6 +145,19 @@ group { name: "elm/frame/base/default";
|
||||||
run_program(PROGRAM:"expand");
|
run_program(PROGRAM:"expand");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
program { name: "switch";
|
||||||
|
signal: "elm,action,switch";
|
||||||
|
source: "elm";
|
||||||
|
script {
|
||||||
|
new st[31];
|
||||||
|
new Float:vl;
|
||||||
|
get_state(PART:"elm.swallow.content", st, 30, vl);
|
||||||
|
if (!strcmp(st, "default"))
|
||||||
|
set_state(PART:"elm.swallow.content", "collapsed", 0.0);
|
||||||
|
else
|
||||||
|
set_state(PART:"elm.swallow.content", "default", 0.0);
|
||||||
|
}
|
||||||
|
}
|
||||||
program { name: "signal";
|
program { name: "signal";
|
||||||
action: SIGNAL_EMIT "elm,anim,done" "elm";
|
action: SIGNAL_EMIT "elm,anim,done" "elm";
|
||||||
}
|
}
|
||||||
|
|
|
@ -286,6 +286,22 @@ elm_frame_autocollapse_get(Evas_Object *obj)
|
||||||
|
|
||||||
EAPI void
|
EAPI void
|
||||||
elm_frame_collapse_set(Evas_Object *obj, Eina_Bool enable)
|
elm_frame_collapse_set(Evas_Object *obj, Eina_Bool enable)
|
||||||
|
{
|
||||||
|
Widget_Data *wd;
|
||||||
|
ELM_CHECK_WIDTYPE(obj, widtype);
|
||||||
|
wd = elm_widget_data_get(obj);
|
||||||
|
if (!wd) return;
|
||||||
|
enable = !!enable;
|
||||||
|
if (wd->collapsed == enable) return;
|
||||||
|
edje_object_signal_emit(wd->frm, "elm,action,switch", "elm");
|
||||||
|
edje_object_message_signal_process(wd->frm);
|
||||||
|
wd->collapsed = enable;
|
||||||
|
wd->anim = EINA_FALSE;
|
||||||
|
_sizing_eval(obj);
|
||||||
|
}
|
||||||
|
|
||||||
|
EAPI void
|
||||||
|
elm_frame_collapse_go(Evas_Object *obj, Eina_Bool enable)
|
||||||
{
|
{
|
||||||
Widget_Data *wd;
|
Widget_Data *wd;
|
||||||
ELM_CHECK_WIDTYPE(obj, widtype);
|
ELM_CHECK_WIDTYPE(obj, widtype);
|
||||||
|
|
|
@ -70,14 +70,23 @@ EAPI void elm_frame_autocollapse_set(Evas_Object *obj, Eina_Bool enable);
|
||||||
EAPI Eina_Bool elm_frame_autocollapse_get(Evas_Object *obj);
|
EAPI Eina_Bool elm_frame_autocollapse_get(Evas_Object *obj);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Manually collapse a frame
|
* @brief Manually collapse a frame without animations
|
||||||
* @param obj The frame
|
* @param obj The frame
|
||||||
* @param enable true to collapse, false to expand
|
* @param enable true to collapse, false to expand
|
||||||
*
|
*
|
||||||
* Use this to toggle the collapsed state of a frame.
|
* Use this to toggle the collapsed state of a frame, bypassing animations.
|
||||||
*/
|
*/
|
||||||
EAPI void elm_frame_collapse_set(Evas_Object *obj, Eina_Bool enable);
|
EAPI void elm_frame_collapse_set(Evas_Object *obj, Eina_Bool enable);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Manually collapse a frame with animations
|
||||||
|
* @param obj The frame
|
||||||
|
* @param enable true to collapse, false to expand
|
||||||
|
*
|
||||||
|
* Use this to toggle the collapsed state of a frame, triggering animations.
|
||||||
|
*/
|
||||||
|
EAPI void elm_frame_collapse_go(Evas_Object *obj, Eina_Bool enable);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Determine the collapse state of a frame
|
* @brief Determine the collapse state of a frame
|
||||||
* @param obj The frame
|
* @param obj The frame
|
||||||
|
|
Loading…
Reference in New Issue