efl_ui_alert_popup: add title part in parts block
Summary: add title part in parts block Reviewers: Jaehyun_Cho, woohyun, zmike, segfaultxavi Reviewed By: Jaehyun_Cho Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D10596
This commit is contained in:
parent
03d9fa97cc
commit
e4e7ff3905
|
@ -8,7 +8,7 @@
|
||||||
|
|
||||||
#include "elm_priv.h"
|
#include "elm_priv.h"
|
||||||
#include "efl_ui_alert_popup_private.h"
|
#include "efl_ui_alert_popup_private.h"
|
||||||
#include "efl_ui_alert_popup_part.eo.h"
|
#include "efl_ui_alert_popup_part_title.eo.h"
|
||||||
#include "elm_part_helper.h"
|
#include "elm_part_helper.h"
|
||||||
|
|
||||||
#define MY_CLASS EFL_UI_ALERT_POPUP_CLASS
|
#define MY_CLASS EFL_UI_ALERT_POPUP_CLASS
|
||||||
|
@ -257,18 +257,42 @@ _efl_ui_alert_popup_efl_object_destructor(Eo *obj, Efl_Ui_Alert_Popup_Data *pd)
|
||||||
}
|
}
|
||||||
|
|
||||||
static Eina_Bool
|
static Eina_Bool
|
||||||
_part_is_efl_ui_alert_popup_part(const Eo *obj, const char *part)
|
_part_is_efl_ui_alert_popup_part_title(const Eo *obj, const char *part)
|
||||||
{
|
{
|
||||||
if (!_elm_layout_part_aliasing_eval(obj, &part, EINA_TRUE)) return EINA_FALSE;
|
if (!_elm_layout_part_aliasing_eval(obj, &part, EINA_TRUE)) return EINA_FALSE;
|
||||||
return eina_streq(part, "efl.text.title");
|
return eina_streq(part, "efl.text.title");
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Efl.Part begin */
|
/* Efl.Part begin */
|
||||||
ELM_PART_OVERRIDE_PARTIAL(efl_ui_alert_popup, EFL_UI_ALERT_POPUP,
|
EOLIAN static Efl_Object *
|
||||||
Efl_Ui_Alert_Popup_Data, _part_is_efl_ui_alert_popup_part)
|
_efl_ui_alert_popup_efl_part_part_get(const Eo *obj, Efl_Ui_Alert_Popup_Data *priv EINA_UNUSED, const char *part)
|
||||||
ELM_PART_OVERRIDE_TEXT_SET(efl_ui_alert_popup, EFL_UI_ALERT_POPUP, Efl_Ui_Alert_Popup_Data)
|
{
|
||||||
ELM_PART_OVERRIDE_TEXT_GET(efl_ui_alert_popup, EFL_UI_ALERT_POPUP, Efl_Ui_Alert_Popup_Data)
|
EINA_SAFETY_ON_NULL_RETURN_VAL(part, NULL);
|
||||||
#include "efl_ui_alert_popup_part.eo.c"
|
if (_part_is_efl_ui_alert_popup_part_title(obj, part))
|
||||||
|
return ELM_PART_IMPLEMENT(EFL_UI_ALERT_POPUP_PART_TITLE_CLASS, obj, part);
|
||||||
|
return efl_part_get(efl_super(obj, EFL_UI_ALERT_POPUP_CLASS), part);
|
||||||
|
}
|
||||||
|
|
||||||
|
EOLIAN static void
|
||||||
|
_efl_ui_alert_popup_part_title_efl_text_text_set(Eo *obj, void *_pd EINA_UNUSED, const char *text)
|
||||||
|
{
|
||||||
|
Elm_Part_Data *pd = efl_data_scope_get(obj, EFL_UI_WIDGET_PART_CLASS);
|
||||||
|
Efl_Ui_Alert_Popup_Data *sd = efl_data_scope_get(pd->obj, EFL_UI_ALERT_POPUP_CLASS);
|
||||||
|
|
||||||
|
_efl_ui_alert_popup_text_set(pd->obj, sd, pd->part, text);
|
||||||
|
}
|
||||||
|
|
||||||
|
EOLIAN static const char*
|
||||||
|
_efl_ui_alert_popup_part_title_efl_text_text_get(const Eo *obj, void *_pd EINA_UNUSED)
|
||||||
|
{
|
||||||
|
Elm_Part_Data *pd = efl_data_scope_get(obj, EFL_UI_WIDGET_PART_CLASS);
|
||||||
|
Efl_Ui_Alert_Popup_Data *sd = efl_data_scope_get(pd->obj, EFL_UI_ALERT_POPUP_CLASS);
|
||||||
|
|
||||||
|
return _efl_ui_alert_popup_text_get(pd->obj, sd, pd->part);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#include "efl_ui_alert_popup_part_title.eo.c"
|
||||||
|
|
||||||
/* Efl.Part end */
|
/* Efl.Part end */
|
||||||
EFL_UI_LAYOUT_TEXT_ALIASES_IMPLEMENT(efl_ui_alert_popup)
|
EFL_UI_LAYOUT_TEXT_ALIASES_IMPLEMENT(efl_ui_alert_popup)
|
||||||
|
|
|
@ -45,6 +45,9 @@ class Efl.Ui.Alert_Popup extends Efl.Ui.Popup
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
parts {
|
||||||
|
title @beta: Efl.Ui.Alert_Popup_Part_Title; [[The title text of Alert Popup.]]
|
||||||
|
}
|
||||||
implements {
|
implements {
|
||||||
Efl.Object.constructor;
|
Efl.Object.constructor;
|
||||||
Efl.Object.destructor;
|
Efl.Object.destructor;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
class @beta Efl.Ui.Alert_Popup_Part extends Efl.Ui.Layout_Part_Text
|
class @beta Efl.Ui.Alert_Popup_Part_Title extends Efl.Ui.Layout_Part_Text
|
||||||
{
|
{
|
||||||
[[Efl UI Alert Popup internal part class]]
|
[[Efl UI Alert Popup internal part class]]
|
||||||
data: null;
|
data: null;
|
|
@ -83,7 +83,7 @@ pub_eo_files = [
|
||||||
'efl_ui_popup.eo',
|
'efl_ui_popup.eo',
|
||||||
'efl_ui_popup_part_backwall.eo',
|
'efl_ui_popup_part_backwall.eo',
|
||||||
'efl_ui_alert_popup.eo',
|
'efl_ui_alert_popup.eo',
|
||||||
'efl_ui_alert_popup_part.eo',
|
'efl_ui_alert_popup_part_title.eo',
|
||||||
'efl_ui_text_editable.eo',
|
'efl_ui_text_editable.eo',
|
||||||
'efl_ui_text_async.eo',
|
'efl_ui_text_async.eo',
|
||||||
'efl_ui_text_factory_images.eo',
|
'efl_ui_text_factory_images.eo',
|
||||||
|
|
Loading…
Reference in New Issue