lvgl/src/lv_objx/lv_cont.c
/**
 * Signal function of the container
 * @param cont pointer to a container object
 * @param sign a signal type from lv_signal_t enum
 * @param param pointer to a signal specific variable
 * @return LV_RES_OK: the object is not deleted in the function; LV_RES_INV: the object is deleted
 */
Signal function of the container
@param cont pointer to a container object
@param sign a signal type from lv_signal_t enum
@param param pointer to a signal specific variable
@return LV_RES_OK: the object is not deleted in the function; LV_RES_INV: the object is deleted
Signal function of the container @param cont pointer to a container object @param sign a signal type from lv_signal_t enum @param param pointer to a signal specific variable @return LV_RES_OK : the object is not deleted in the function ; LV_RES_INV : the object is deleted
static lv_res_t lv_cont_signal(lv_obj_t * cont, lv_signal_t sign, void * param)
{
    lv_res_t res;
    res = ancestor_signal(cont, sign, param);
    if(res != LV_RES_OK) return res;
    if(sign == LV_SIGNAL_GET_TYPE) return lv_obj_handle_get_type_signal(param, LV_OBJX_NAME);
    if(sign == LV_SIGNAL_STYLE_CHG) { 
        lv_cont_refr_layout(cont);
        lv_cont_refr_autofit(cont);
    } else if(sign == LV_SIGNAL_CHILD_CHG) {
        lv_cont_refr_layout(cont);
        lv_cont_refr_autofit(cont);
    } else if(sign == LV_SIGNAL_CORD_CHG) {
        if(lv_obj_get_width(cont) != lv_area_get_width(param) || lv_obj_get_height(cont) != lv_area_get_height(param)) {
            lv_cont_refr_layout(cont);
            lv_cont_refr_autofit(cont);
        }
    } else if(sign == LV_SIGNAL_PARENT_SIZE_CHG) {
        lv_cont_refr_autofit(cont);
    }
    return res;
}
static lv_res_t lv_cont_signal ( lv_obj_t * cont , lv_signal_t sign , void * param ) { lv_res_t res ; res = ancestor_signal ( cont , sign , param ) ; if ( res != LV_RES_OK ) return res ; if ( sign == LV_SIGNAL_GET_TYPE ) return lv_obj_handle_get_type_signal ( param , LV_OBJX_NAME ) ; if ( sign == LV_SIGNAL_STYLE_CHG ) { lv_cont_refr_layout ( cont ) ; lv_cont_refr_autofit ( cont ) ; } else if ( sign == LV_SIGNAL_CHILD_CHG ) { lv_cont_refr_layout ( cont ) ; lv_cont_refr_autofit ( cont ) ; } else if ( sign == LV_SIGNAL_CORD_CHG ) { if ( lv_obj_get_width ( cont ) != lv_area_get_width ( param ) || lv_obj_get_height ( cont ) != lv_area_get_height ( param ) ) { lv_cont_refr_layout ( cont ) ; lv_cont_refr_autofit ( cont ) ; } } else if ( sign == LV_SIGNAL_PARENT_SIZE_CHG ) { lv_cont_refr_autofit ( cont ) ; } return res ; }
Signal function of the container
 @param cont pointer to a container object
 @param sign a signal type from lv_signal_t enum
 @param param pointer to a signal specific variable
 @return LV_RES_OK: the object is not deleted in the function; LV_RES_INV: the object is deleted
Signal function of the container @param cont pointer to a container object @param sign a signal type from lv_signal_t enum @param param pointer to a signal specific variable @return LV_RES_OK : the object is not deleted in the function ; LV_RES_INV : the object is deleted
/* Include the ancient signal function */ /*Recalculate the padding if the style changed*/ /*FLOOD and FILL fit needs to be refreshed if the parent size has changed*/