int ret;
int state = 0;
GenGroupItemData *item = NULL;
- Evas_Object *genlist = elm_genlist_add(ad->md.getNaviframe());
+ Evas_Object *genlist = elm_genlist_add(ad->md.getNaviframe()->getObject());
if (genlist == NULL) {
SETTING_TRACE_ERROR("Cannot set genlist object as content of layout");
delete[] items;
}
- ad->md.naviframe_it = elm_naviframe_item_push(ad->md.getNaviframe(), _("IDS_ACCS_ACCESSIBILITY_LAUNCHER"), NULL, NULL, genlist, NULL);
+ ad->md.naviframe_it = elm_naviframe_item_push(ad->md.getNaviframe()->getObject(), _("IDS_ACCS_ACCESSIBILITY_LAUNCHER"), NULL, NULL, genlist, NULL);
elm_naviframe_item_pop_cb_set(ad->md.naviframe_it, onNaviframePopCb, items);
elm_object_item_domain_text_translatable_set(ad->md.naviframe_it, PACKAGE, EINA_TRUE);
- Evas_Object *back_btn = WidgetFactory::createButton(ad->md.getNaviframe(), {}, WidgetFactory::BACK_BUTTON_ARROW_STYLE, onBackButtonCb, ad);
- elm_layout_content_set(ad->md.getNaviframe(), "prev_btn", back_btn);
+ Evas_Object *back_btn = WidgetFactory::createButton(ad->md.getNaviframe()->getObject(), {}, WidgetFactory::BACK_BUTTON_ARROW_STYLE, onBackButtonCb, ad);
+ elm_layout_content_set(ad->md.getNaviframe()->getObject(), "prev_btn", back_btn);
}
Eina_Bool AccessibilityLauncherPage::onNaviframePopCb(void *data, Elm_Object_Item *it)
{
retm_if(data == NULL, "Data argument is NULL");
auto ad = static_cast<SettingAccessibility *>(data);
- elm_naviframe_item_pop(ad->md.getNaviframe());
+ elm_naviframe_item_pop(ad->md.getNaviframe()->getObject());
}
void AccessibilityLauncherPage::updateVconf(ItemWrapper *items)
AccessoriesSwitchesPage::AccessoriesSwitchesPage(SettingAccessibility *ad)
{
retm_if(ad == NULL, "Input parameter is NULL");
- Evas_Object *layout = createLayout(ad->md.getNaviframe(), EDJ_ACCESSORY, GRP_ACCESSORY);
+ Evas_Object *layout = createLayout(ad->md.getNaviframe()->getObject(), EDJ_ACCESSORY, GRP_ACCESSORY);
ad->us_configuration.switch_id = {};
elm_layout_text_set(layout, PRT_ACCESSORY_LABEL, _("IDS_ACCS_UNIVERSAL_SWITCH_ADD_SWITCH_ACCESSORIES_DESC"));
- Elm_Object_Item *navi_it = elm_naviframe_item_push(ad->md.getNaviframe(), _("IDS_ACCS_UNIVERSAL_SWITCH_ADD_SWITCH_ACCESSORIES_TITLE"), NULL, NULL, layout, NULL);
+ Elm_Object_Item *navi_it = elm_naviframe_item_push(ad->md.getNaviframe()->getObject(), _("IDS_ACCS_UNIVERSAL_SWITCH_ADD_SWITCH_ACCESSORIES_TITLE"), NULL, NULL, layout, NULL);
elm_naviframe_item_pop_cb_set(navi_it, naviframPopCb, ad);
elm_object_item_domain_text_translatable_set(navi_it, PACKAGE, EINA_TRUE);
- Evas_Object *back_btn = WidgetFactory::createButton(ad->md.getNaviframe(), {}, WidgetFactory::BACK_BUTTON_ARROW_STYLE, backCb, ad);
- elm_layout_content_set(ad->md.getNaviframe(), "prev_btn", back_btn);
+ Evas_Object *back_btn = WidgetFactory::createButton(ad->md.getNaviframe()->getObject(), {}, WidgetFactory::BACK_BUTTON_ARROW_STYLE, backCb, ad);
+ elm_layout_content_set(ad->md.getNaviframe()->getObject(), "prev_btn", back_btn);
setting_accessibility_universal_switch_dbus_config_captureSwitch(&ad->config, ACCESSIBILITY_UNIVERSAL_SWITCH_ACCESSORIES_SWITCH_PROVIDER, -1, captureSwitchCb, ad);
}
}
ad->us_configuration.switch_id = switch_id;
- ad->settingPopup_ = std::make_unique<SettingPopup>(ad, ad->md.getNaviframe(),
+ ad->settingPopup_ = std::make_unique<SettingPopup>(ad, ad->md.getNaviframe()->getObject(),
"IDS_ACCS_UNIVERSAL_SWITCH_ADD_SWITCH", std::string{},
popupResponseCb, 0,
true,
void AccessoriesSwitchesPage::alreadyMappedSwitchPopup(SettingAccessibility *ad)
{
- ad->settingPopup_ = std::make_unique<SettingPopup>(ad, ad->md.getNaviframe(),
+ ad->settingPopup_ = std::make_unique<SettingPopup>(ad, ad->md.getNaviframe()->getObject(),
"IDS_ACCS_UNIVERSAL_SWITCH_UNABLE_TO_ADD", std::string{},
okResponseCb, 0,
true,
}
ad->actionPage_ = std::make_unique<ActionPage>(ad);
- elm_naviframe_item_pop_cb_set(elm_naviframe_top_item_get(ad->md.getNaviframe()), renewCaptureSwitchCb, ad);
+ elm_naviframe_item_pop_cb_set(elm_naviframe_top_item_get(ad->md.getNaviframe()->getObject()), renewCaptureSwitchCb, ad);
ActionPage::attachCallback(ad, accessorySwitchActionCb, (void *)strdup(switch_name));
} else {
renewCaptureSwitchCb(ad, NULL);
{
retm_if(data == NULL, "Data argument is NULL");
auto ad = static_cast<SettingAccessibility *>(data);
- elm_naviframe_item_pop(ad->md.getNaviframe());
+ elm_naviframe_item_pop(ad->md.getNaviframe()->getObject());
}
AddSwitchPage::AddSwitchPage(SettingAccessibility *ad)
{
retm_if(ad == NULL, "Input parameter is NULL");
- Evas_Object *genlist = elm_genlist_add(ad->md.getNaviframe());
+ Evas_Object *genlist = elm_genlist_add(ad->md.getNaviframe()->getObject());
retm_if(genlist == NULL, "Cannot set genlist object as content of layout");
elm_genlist_mode_set(genlist, ELM_LIST_COMPRESS);
}
}
- Elm_Object_Item *navi_it = elm_naviframe_item_push(ad->md.getNaviframe(), _("IDS_ACCS_UNIVERSAL_SWITCH_ADD_SWITCH"), NULL, NULL, genlist, NULL);
+ Elm_Object_Item *navi_it = elm_naviframe_item_push(ad->md.getNaviframe()->getObject(), _("IDS_ACCS_UNIVERSAL_SWITCH_ADD_SWITCH"), NULL, NULL, genlist, NULL);
elm_naviframe_item_pop_cb_set(navi_it, onNaviframePopCb, ad);
elm_object_item_domain_text_translatable_set(navi_it, PACKAGE, EINA_TRUE);
- Evas_Object *back_btn = WidgetFactory::createButton(ad->md.getNaviframe(), {}, WidgetFactory::BACK_BUTTON_ARROW_STYLE, backCb, ad);
- elm_layout_content_set(ad->md.getNaviframe(), "prev_btn", back_btn);
+ Evas_Object *back_btn = WidgetFactory::createButton(ad->md.getNaviframe()->getObject(), {}, WidgetFactory::BACK_BUTTON_ARROW_STYLE, backCb, ad);
+ elm_layout_content_set(ad->md.getNaviframe()->getObject(), "prev_btn", back_btn);
}
void AddSwitchPage::attachCallbackOnSwitchAttach(SettingAccessibility *ad, UniversalSwitchUpdateCb cb)
retm_if(data == NULL, "Data argument is NULL");
auto ad = static_cast<SettingAccessibility *>(data);
- elm_naviframe_item_pop(ad->md.getNaviframe());
+ elm_naviframe_item_pop(ad->md.getNaviframe()->getObject());
}
Eina_Bool AddSwitchPage::onNaviframePopCb(void *data, Elm_Object_Item *it)
CameraSwitchesPage::CameraSwitchesPage(SettingAccessibility *ad)
{
retm_if(ad == NULL, "Input parameter is NULL");
- Evas_Object *genlist = elm_genlist_add(ad->md.getNaviframe());
+ Evas_Object *genlist = elm_genlist_add(ad->md.getNaviframe()->getObject());
retm_if(genlist == NULL, "Cannot set genlist object as content of layout");
elm_genlist_mode_set(genlist, ELM_LIST_COMPRESS);
}
}
- Elm_Object_Item *navi_it = elm_naviframe_item_push(ad->md.getNaviframe(), _("IDS_ACCS_UNIVERSAL_SWITCH_ADD_SWITCH_CAMERA_TITLE"), NULL, NULL, genlist, NULL);
+ Elm_Object_Item *navi_it = elm_naviframe_item_push(ad->md.getNaviframe()->getObject(), _("IDS_ACCS_UNIVERSAL_SWITCH_ADD_SWITCH_CAMERA_TITLE"), NULL, NULL, genlist, NULL);
elm_object_item_domain_text_translatable_set(navi_it, PACKAGE, EINA_TRUE);
- Evas_Object *back_btn = WidgetFactory::createButton(ad->md.getNaviframe(), {}, WidgetFactory::BACK_BUTTON_ARROW_STYLE, backCb, ad);
- elm_layout_content_set(ad->md.getNaviframe(), "prev_btn", back_btn);
+ Evas_Object *back_btn = WidgetFactory::createButton(ad->md.getNaviframe()->getObject(), {}, WidgetFactory::BACK_BUTTON_ARROW_STYLE, backCb, ad);
+ elm_layout_content_set(ad->md.getNaviframe()->getObject(), "prev_btn", back_btn);
}
void CameraSwitchesPage::attachActionCallback(SettingAccessibility *ad, UniversalSwitchUpdateCb cb)
retm_if(data == NULL, "Data argument is NULL");
auto ad = static_cast<SettingAccessibility *>(data);
- elm_naviframe_item_pop(ad->md.getNaviframe());
+ elm_naviframe_item_pop(ad->md.getNaviframe()->getObject());
}
#include "setting-debug.h"
#include "WidgetFactory.hpp"
-#include <efl_extension.h>
#include <app.h>
int MainData::initApp(const std::string &name)
return window->getObject();
}
-Evas_Object *MainData::getNaviframe() const
+Naviframe *MainData::getNaviframe() const
{
- return naviframe;
+ return naviframe_;
}
Evas_Object *MainData::getGenlist() const
conformant->show();
window->addResizeObject(conformant);
- /* create a naviframe */
- naviframe = elm_naviframe_add(conformant->getObject());
- setting_retvm_if(naviframe == NULL, SETTING_RETURN_FAIL, "naviframe == NULL");
+ naviframe_ = Widget::make<Naviframe>(conformant);
+ naviframe_->createPrevBtnAutomatically(false);
+ conformant->setContent(naviframe_);
- elm_naviframe_prev_btn_auto_pushed_set(naviframe, EINA_FALSE);
- eext_object_event_callback_add(naviframe, EEXT_CALLBACK_BACK, eext_naviframe_back_cb, NULL);
- eext_object_event_callback_add(naviframe, EEXT_CALLBACK_MORE, eext_naviframe_more_cb, NULL);
-
- elm_object_content_set(conformant->getObject(), naviframe);
conformant->emitSignal("elm,state,virtualkeypad,enable");
conformant->emitSignal("elm,state,clipboard,enable");
/* LAYOUT */
- layout = elm_layout_add(naviframe);
+ layout = elm_layout_add(naviframe_->getObject());
setting_retvm_if(layout == NULL, FALSE, "layout == NULL");
elm_layout_theme_set(layout, "layout", "application", "default");
- /* push a view to the naviframe */
- naviframe_it = elm_naviframe_item_push(naviframe, NULL, NULL, NULL, layout, NULL);
- elm_object_item_disabled_set(naviframe_it, EINA_FALSE);
- elm_naviframe_item_title_enabled_set(naviframe_it, EINA_TRUE, EINA_TRUE);
- elm_object_item_domain_text_translatable_set(naviframe_it, PACKAGE, EINA_TRUE);
- elm_object_item_part_text_set(naviframe_it, "elm.text.title", name.c_str());
+ naviframe_it = elm_naviframe_item_push(naviframe_->getObject(), name.c_str(), NULL, NULL, layout, NULL);
- evas_object_show(naviframe);
+ naviframe_->show();
evas_object_show(layout);
return SETTING_RETURN_SUCCESS;
void MainData::addBackButton(Elm_Naviframe_Item_Pop_Cb view_pop_cb, void *ad) const
{
- auto back_button = WidgetFactory::createButton(naviframe, "IDS_ST_BUTTON_BACK", WidgetFactory::BACK_BUTTON_ARROW_STYLE, softkeyBackClickCb, naviframe);
- elm_layout_content_set(naviframe, "prev_btn", back_button);
+ auto back_button = WidgetFactory::createButton(naviframe_->getObject(), "IDS_ST_BUTTON_BACK", WidgetFactory::BACK_BUTTON_ARROW_STYLE, softkeyBackClickCb, naviframe_->getObject());
+ elm_layout_content_set(naviframe_->getObject(), "prev_btn", back_button);
elm_naviframe_item_pop_cb_set(naviframe_it, view_pop_cb, ad);
}
#include "Window.hpp"
#include "Conformant.hpp"
+#include "Naviframe.hpp"
#include <Elementary.h>
int initApp(const std::string &name);
void initView(const std::string &name);
Evas_Object *getWindow() const;
- Evas_Object *getNaviframe() const;
+ Naviframe *getNaviframe() const;
Evas_Object *getGenlist() const;
void addBackButton(Elm_Naviframe_Item_Pop_Cb view_pop_cb, void *ad) const;
Elm_Object_Item *naviframe_it;
Evas *evas;
std::unique_ptr<Window> window;
- Evas_Object *naviframe;
+ Naviframe *naviframe_;
Evas_Object *layout;
Evas_Object *genlist;
};
#include "setting-debug.h"
+#include <efl_extension.h>
+
Naviframe::Naviframe(Widget *parent)
: Widget(parent)
{
obj_ = elm_naviframe_add(parent->getObject());
+ eext_object_event_callback_add(obj_, EEXT_CALLBACK_BACK, eext_naviframe_back_cb, NULL);
+ eext_object_event_callback_add(obj_, EEXT_CALLBACK_MORE, eext_naviframe_more_cb, NULL);
}
void Naviframe::createPrevBtnAutomatically(bool automatically)
void Naviframe::pushBack(const TranslatedString &title, Widget *content, const std::string &style, std::function<void()> onPopCb)
{
- auto it = elm_naviframe_item_push(obj_, title.c_str(), nullptr, nullptr, content->getObject(), style.c_str());
- callbacks.insert_or_assign(it, std::move(onPopCb));
- elm_naviframe_item_pop_cb_set(it, callbackMethod, this);
+ top_ = elm_naviframe_item_push(obj_, title.c_str(), nullptr, nullptr, content->getObject(), style.c_str());
+ if (onPopCb) {
+ naviframeCallbacks_.insert_or_assign(top_, std::move(onPopCb));
+ elm_naviframe_item_pop_cb_set(top_, callbackMethod, this);
+ }
}
void Naviframe::popBack()
{
elm_naviframe_item_pop(obj_);
+ top_ = elm_naviframe_top_item_get(obj_);
}
void Naviframe::onPop(Elm_Object_Item *item)
{
- auto cb = callbacks.find(item);
- if (cb == callbacks.end()) {
+ auto cb = naviframeCallbacks_.find(item);
+ if (cb == naviframeCallbacks_.end()) {
SETTING_TRACE_ERROR("No callback registered for this frame");
return;
}
cb->second();
}
+Elm_Naviframe_Item *Naviframe::top()
+{
+ return top_;
+}
+
Eina_Bool Naviframe::callbackMethod(void *data, Elm_Object_Item *it)
{
auto self = static_cast<Naviframe *>(data);
#include "Widget.hpp"
-class Naviframe : public Widget, std::enable_shared_from_this<Naviframe>
+class Naviframe : public Widget
{
public:
Naviframe(Widget *parent);
void pushBack(const TranslatedString &title, Widget *content, const std::string &style, std::function<void()> onPopCb);
void popBack();
void onPop(Elm_Object_Item *item);
+ Elm_Naviframe_Item *top();
private:
static Eina_Bool callbackMethod(void *data, Elm_Object_Item *it);
- Elm_Naviframe_Item *top = nullptr;
- std::unordered_map<Elm_Object_Item *, std::function<void()>> callbacks;
+ Elm_Naviframe_Item *top_ = nullptr;
+ std::unordered_map<Elm_Object_Item *, std::function<void()>> naviframeCallbacks_;
};
#endif
ad->setValuePage_ = std::make_unique<SetValuePage>(ad, ValueEditorType::SWITCHES, _("IDS_ACCS_SELECT_ITEMS"));
- ad->all_checkbox = WidgetFactory::createCheck(ad->md.getNaviframe(), EINA_FALSE, nullptr, {}, onAllButtonsClicked, ad);
- elm_layout_content_set(ad->md.getNaviframe(), "prev_btn", ad->all_checkbox);
+ ad->all_checkbox = WidgetFactory::createCheck(ad->md.getNaviframe()->getObject(), EINA_FALSE, nullptr, {}, onAllButtonsClicked, ad);
+ elm_layout_content_set(ad->md.getNaviframe()->getObject(), "prev_btn", ad->all_checkbox);
- ad->remove_switches_popup_button = WidgetFactory::createButton(ad->md.getNaviframe(), "IDS_ACCS_DELETE_CAPS", "naviframe/title_right", onDeleteButtonClicked, ad);
- elm_layout_content_set(ad->md.getNaviframe(), "title_right_btn", ad->remove_switches_popup_button);
+ ad->remove_switches_popup_button = WidgetFactory::createButton(ad->md.getNaviframe()->getObject(), "IDS_ACCS_DELETE_CAPS", "naviframe/title_right", onDeleteButtonClicked, ad);
+ elm_layout_content_set(ad->md.getNaviframe()->getObject(), "title_right_btn", ad->remove_switches_popup_button);
elm_object_disabled_set(ad->remove_switches_popup_button, EINA_TRUE);
for (auto i = 0u; i < ad->config.configuration_items.size(); ++i) {
title = TranslatedString{"IDS_ACCS_SELECT_ITEMS"} .str();
}
elm_object_disabled_set(ad->remove_switches_popup_button, ad->switches_to_remove_counter ? EINA_FALSE : EINA_TRUE);
- elm_layout_text_set(ad->md.getNaviframe(), "default", title.c_str());
+ elm_layout_text_set(ad->md.getNaviframe()->getObject(), "default", title.c_str());
}
void RemoveSwitchPage::createPopupForSwitchesRemoving(SettingAccessibility *ad)
{
- ad->popup = elm_popup_add(ad->md.getNaviframe());
+ ad->popup = elm_popup_add(ad->md.getNaviframe()->getObject());
retm_if(!ad->popup, "Popup creation failure");
elm_popup_orient_set(ad->popup, ELM_POPUP_ORIENT_CENTER);
evas_object_size_hint_weight_set(ad->popup, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_del(ad->popup);
ad->popup = NULL;
- elm_naviframe_item_pop(ad->md.getNaviframe());
+ elm_naviframe_item_pop(ad->md.getNaviframe()->getObject());
if (disable_universal_switch && vconf_set_bool(VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_INTERACTION_SERVICE, 0))
LOGE("Failed to set vconf key %s.", VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_INTERACTION_SERVICE);
ScreenReaderPage::ScreenReaderPage(SettingAccessibility *data)
{
auto ad = static_cast<SettingAccessibility *>(data);
- Evas_Object *genlist = elm_genlist_add(ad->md.getNaviframe());
+ Evas_Object *genlist = elm_genlist_add(ad->md.getNaviframe()->getObject());
retm_if(genlist == NULL, "Cannot set genlist object as content of layout");
elm_genlist_mode_set(genlist, ELM_LIST_COMPRESS);
elm_object_style_set(genlist, "dialogue");
__BACK_POINTER_SET(screen_reader_settings);
}
- Elm_Object_Item *navi_it = elm_naviframe_item_push(ad->md.getNaviframe(), _("IDS_ST_MBODY_SCREEN_READER_HTTS"), NULL, NULL, genlist, NULL);
+ Elm_Object_Item *navi_it = elm_naviframe_item_push(ad->md.getNaviframe()->getObject(), _("IDS_ST_MBODY_SCREEN_READER_HTTS"), NULL, NULL, genlist, NULL);
elm_object_item_domain_text_translatable_set(navi_it, PACKAGE,
EINA_TRUE);
retv_if(data == NULL, EINA_TRUE);
auto ad = static_cast<SettingAccessibility *>(data);
vconf_ignore_key_changed(VCONFKEY_SETAPPL_ACCESSIBILITY_TTS, onVconfChangedCb);
- elm_naviframe_item_pop(ad->md.getNaviframe());
+ elm_naviframe_item_pop(ad->md.getNaviframe()->getObject());
return EINA_TRUE;
}
int vconf_val = 0;
int vconf_ret;
- Evas_Object *genlist = elm_genlist_add(ad->md.getNaviframe());
+ Evas_Object *genlist = elm_genlist_add(ad->md.getNaviframe()->getObject());
retm_if(genlist == NULL, "Cannot set genlist object as content of layout");
elm_genlist_mode_set(genlist, ELM_LIST_COMPRESS);
elm_object_style_set(genlist, "dialogue");
ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
}
- Elm_Object_Item *navi_it = elm_naviframe_item_push(ad->md.getNaviframe(), _("IDS_ST_OPT_SETTINGS"), NULL, NULL, genlist, NULL);
+ Elm_Object_Item *navi_it = elm_naviframe_item_push(ad->md.getNaviframe()->getObject(), _("IDS_ST_OPT_SETTINGS"), NULL, NULL, genlist, NULL);
elm_object_item_domain_text_translatable_set(navi_it, PACKAGE, EINA_TRUE);
elm_naviframe_item_pop_cb_set(navi_it, hidePage, ad);
LOGE("Fail to setting finalize");
return -1;
}
- elm_naviframe_item_pop(ad->md.getNaviframe());
+ elm_naviframe_item_pop(ad->md.getNaviframe()->getObject());
return EINA_TRUE;
}
SETTING_TRACE_DEBUG("Unrecognized layout type!");
}
- ad->set_value_layout.setLayout(createLayout(ad->md.getNaviframe(), layout_grp));
+ ad->set_value_layout.setLayout(createLayout(ad->md.getNaviframe()->getObject(), layout_grp));
switch (type) {
case ValueEditorType::NUMERIC:
LOGE("Wrong value type");
}
- Elm_Object_Item *navi_it = elm_naviframe_item_push(ad->md.getNaviframe(), title, NULL, NULL, ad->set_value_layout.getLayout(), NULL);
+ Elm_Object_Item *navi_it = elm_naviframe_item_push(ad->md.getNaviframe()->getObject(), title, NULL, NULL, ad->set_value_layout.getLayout(), NULL);
elm_naviframe_item_pop_cb_set(navi_it, naviframePopCb, ad);
elm_object_item_domain_text_translatable_set(navi_it, PACKAGE, EINA_TRUE);
- Evas_Object *back_btn = WidgetFactory::createButton(ad->md.getNaviframe(), {}, WidgetFactory::BACK_BUTTON_ARROW_STYLE, backCb, ad);
- elm_layout_content_set(ad->md.getNaviframe(), "prev_btn", back_btn);
+ Evas_Object *back_btn = WidgetFactory::createButton(ad->md.getNaviframe()->getObject(), {}, WidgetFactory::BACK_BUTTON_ARROW_STYLE, backCb, ad);
+ elm_layout_content_set(ad->md.getNaviframe()->getObject(), "prev_btn", back_btn);
}
void SetValuePage::setDescription(SettingAccessibility *ad, const char *description)
{
Evas_Object *tb;
Elm_Object_Item *nf_it;
- tb = elm_toolbar_add(ad->md.getNaviframe());
+ tb = elm_toolbar_add(ad->md.getNaviframe()->getObject());
elm_toolbar_select_mode_set(tb, ELM_OBJECT_SELECT_MODE_NONE);
evas_object_smart_callback_add(tb, "clicked", closeUpdateAccessoriesSwitchPage, ad);
evas_object_show(tb);
elm_toolbar_item_append(tb, NULL, _("IDS_ACCS_UNIVERSAL_SWITCH_CANCEL"), NULL, NULL);
ad->save_object_item = elm_toolbar_item_append(tb, NULL, _("IDS_ACCS_UNIVERSAL_SWITCH_SAVE"), NULL, NULL);
- ad->set_value_layout.setLayout(createLayout(ad->md.getNaviframe(), GRP_SET_VALUE_UPDATE_ACCESSORIES_SWITCH));
+ ad->set_value_layout.setLayout(createLayout(ad->md.getNaviframe()->getObject(), GRP_SET_VALUE_UPDATE_ACCESSORIES_SWITCH));
ad->entry = elm_entry_add(ad->set_value_layout.getLayout());
elm_entry_entry_set(ad->entry, ad->config_item_to_update.user_name.c_str());
elm_entry_cursor_end_set(ad->entry);
ad->update_accessories_action_genlist = createGenlist(ad->set_value_layout.getLayout(), NULL);
addActionGendialField(ad);
- nf_it = elm_naviframe_item_push(ad->md.getNaviframe(), "", NULL, NULL, ad->set_value_layout.getLayout(), "tabbar/notitle");
+ nf_it = elm_naviframe_item_push(ad->md.getNaviframe()->getObject(), "", NULL, NULL, ad->set_value_layout.getLayout(), "tabbar/notitle");
elm_object_item_domain_text_translatable_set(nf_it, PACKAGE, EINA_TRUE);
elm_object_item_part_content_set(nf_it, "tabbar", tb);
}
{
ad->config_item_to_update.activity_type = action;
updateGendialActionField(ad);
- elm_naviframe_item_pop(ad->md.getNaviframe());
+ elm_naviframe_item_pop(ad->md.getNaviframe()->getObject());
}
void SetValuePage::updateGendialActionField(SettingAccessibility *ad)
if (event_info == ad->save_object_item)
saveAccessoriesSwitchUpdateChanges(ad);
- elm_naviframe_item_pop(ad->md.getNaviframe());
+ elm_naviframe_item_pop(ad->md.getNaviframe()->getObject());
}
void SetValuePage::saveAccessoriesSwitchUpdateChanges(SettingAccessibility *ad)
ad->set_value_layout.radio_item_change_cb(ad, list_item->chk_id);
if (ad->md.naviframe_it) {
- elm_naviframe_item_pop_cb_set(elm_naviframe_top_item_get(ad->md.getNaviframe()), NULL, NULL);
+ elm_naviframe_item_pop_cb_set(elm_naviframe_top_item_get(ad->md.getNaviframe()->getObject()), NULL, NULL);
elm_naviframe_item_pop_to(ad->md.naviframe_it);
} else {
- elm_naviframe_item_pop(ad->md.getNaviframe());
+ elm_naviframe_item_pop(ad->md.getNaviframe()->getObject());
}
}
retm_if(data == NULL, "Data argument is NULL");
auto ad = static_cast<SettingAccessibility *>(data);
- elm_naviframe_item_pop(ad->md.getNaviframe());
+ elm_naviframe_item_pop(ad->md.getNaviframe()->getObject());
}
SwitchesPage::SwitchesPage(SettingAccessibility *ad)
{
retm_if(ad == NULL, "Input parameter is NULL");
- Evas_Object *genlist = elm_genlist_add(ad->md.getNaviframe());
+ Evas_Object *genlist = elm_genlist_add(ad->md.getNaviframe()->getObject());
retm_if(genlist == NULL, "Cannot set genlist object as content of layout");
- ad->md.naviframe_it = elm_naviframe_item_push(ad->md.getNaviframe(), _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_SWITCHES"), NULL, NULL, genlist, NULL);
+ ad->md.naviframe_it = elm_naviframe_item_push(ad->md.getNaviframe()->getObject(), _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_SWITCHES"), NULL, NULL, genlist, NULL);
elm_naviframe_item_pop_cb_set(ad->md.naviframe_it, naviframePopCb, ad);
elm_object_item_domain_text_translatable_set(ad->md.naviframe_it, PACKAGE, EINA_TRUE);
- Evas_Object *back_btn = WidgetFactory::createButton(ad->md.getNaviframe(), {}, WidgetFactory::BACK_BUTTON_ARROW_STYLE, backCb, ad);
- elm_layout_content_set(ad->md.getNaviframe(), "prev_btn", back_btn);
+ Evas_Object *back_btn = WidgetFactory::createButton(ad->md.getNaviframe()->getObject(), {}, WidgetFactory::BACK_BUTTON_ARROW_STYLE, backCb, ad);
+ elm_layout_content_set(ad->md.getNaviframe()->getObject(), "prev_btn", back_btn);
- ad->remove_switches_page_button = WidgetFactory::createButton(ad->md.getNaviframe(), "IDS_ACCS_DELETE_CAPS", "naviframe/title_right", createRemovePageCb, ad);
- elm_layout_content_set(ad->md.getNaviframe(), "title_right_btn", ad->remove_switches_page_button);
+ ad->remove_switches_page_button = WidgetFactory::createButton(ad->md.getNaviframe()->getObject(), "IDS_ACCS_DELETE_CAPS", "naviframe/title_right", createRemovePageCb, ad);
+ elm_layout_content_set(ad->md.getNaviframe()->getObject(), "title_right_btn", ad->remove_switches_page_button);
elm_genlist_mode_set(genlist, ELM_LIST_COMPRESS);
elm_object_style_set(genlist, "dialogue");
retm_if(data == NULL, "Data argument is NULL");
auto ad = static_cast<SettingAccessibility *>(data);
- elm_naviframe_item_pop(ad->md.getNaviframe());
+ elm_naviframe_item_pop(ad->md.getNaviframe()->getObject());
}
int ret;
int state = false;
ad->md.naviframe_it = NULL;
- Evas_Object *genlist = (Evas_Object *)elm_genlist_add(ad->md.getNaviframe());
+ Evas_Object *genlist = (Evas_Object *)elm_genlist_add(ad->md.getNaviframe()->getObject());
retm_if(genlist == NULL, "Cannot set genlist object as content of layout");
elm_genlist_mode_set(genlist, ELM_LIST_COMPRESS);
elm_genlist_item_select_mode_set(ad->universal_switch_comment->item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
}
- ad->md.naviframe_it = elm_naviframe_item_push(ad->md.getNaviframe(), _("IDS_ACCS_UNIVERSAL_SWITCH"), NULL, NULL, genlist, NULL);
+ ad->md.naviframe_it = elm_naviframe_item_push(ad->md.getNaviframe()->getObject(), _("IDS_ACCS_UNIVERSAL_SWITCH"), NULL, NULL, genlist, NULL);
elm_object_item_domain_text_translatable_set(ad->md.naviframe_it, PACKAGE, EINA_TRUE);
elm_naviframe_item_pop_cb_set(ad->md.naviframe_it, naviframePopCb, ad);
ad->universal_switch_main_item = ad->md.naviframe_it;
std::string title_str = "<font_size=30>" + TranslatedString{"IDS_ACCS_SETTINGS_CAPS"} .str() + "</font_size>";
- ad->universal_switch_settings_btn = WidgetFactory::createButton(ad->md.getNaviframe(), title_str, "naviframe/title_right", createSettingsPage, ad);
+ ad->universal_switch_settings_btn = WidgetFactory::createButton(ad->md.getNaviframe()->getObject(), title_str, "naviframe/title_right", createSettingsPage, ad);
if (ad->universal_switch_settings_btn)
elm_object_disabled_set(ad->universal_switch_settings_btn, EINA_TRUE);
- elm_layout_content_set(ad->md.getNaviframe(), "title_right_btn", ad->universal_switch_settings_btn);
+ elm_layout_content_set(ad->md.getNaviframe()->getObject(), "title_right_btn", ad->universal_switch_settings_btn);
- Evas_Object *back_btn = WidgetFactory::createButton(ad->md.getNaviframe(), {}, WidgetFactory::BACK_BUTTON_ARROW_STYLE, backCb, ad);
- elm_layout_content_set(ad->md.getNaviframe(), "prev_btn", back_btn);
+ Evas_Object *back_btn = WidgetFactory::createButton(ad->md.getNaviframe()->getObject(), {}, WidgetFactory::BACK_BUTTON_ARROW_STYLE, backCb, ad);
+ elm_layout_content_set(ad->md.getNaviframe()->getObject(), "prev_btn", back_btn);
startUniversalSwitch(ad);
}
if (state && switch_count == 0) {
elm_check_state_set(ad->universal_switch_off_checkbox->eo_check, EINA_FALSE);
- ad->md.naviframe_it = elm_naviframe_top_item_get(ad->md.getNaviframe());
+ ad->md.naviframe_it = elm_naviframe_top_item_get(ad->md.getNaviframe()->getObject());
ad->settingPopup_ = std::make_unique<SettingPopup>(data, ad->md.getWindow(),
std::string{}, "To turn on Universal switch, tap ADD SWITCH and add at least one switch",
popupResponseCb, 0,
retm_if(data == NULL, "Data argument is NULL");
auto ad = static_cast<SettingAccessibility *>(data);
- elm_naviframe_item_pop(ad->md.getNaviframe());
+ elm_naviframe_item_pop(ad->md.getNaviframe()->getObject());
}
Eina_Bool UniversalSwitchPage::naviframePopCb(void *data, Elm_Object_Item *it)
retm_if(ad == NULL, "Input parameter is NULL");
ad->launched_by_app_control = false;
ad->md.naviframe_it = NULL;
- Evas_Object *genlist = elm_genlist_add(ad->md.getNaviframe());
+ Evas_Object *genlist = elm_genlist_add(ad->md.getNaviframe()->getObject());
retm_if(genlist == NULL, "Cannot set genlist object as content of layout");
elm_genlist_mode_set(genlist, ELM_LIST_COMPRESS);
createFeedbackGroup(ad, genlist);
createManageGroup(ad, genlist);
- Elm_Object_Item *navi_it = elm_naviframe_item_push(ad->md.getNaviframe(), _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS"), NULL, NULL, genlist, NULL);
+ Elm_Object_Item *navi_it = elm_naviframe_item_push(ad->md.getNaviframe()->getObject(), _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS"), NULL, NULL, genlist, NULL);
ad->universal_switch_settings_item = navi_it;
elm_naviframe_item_pop_cb_set(navi_it, naviframPopCb, ad);
elm_object_item_domain_text_translatable_set(navi_it, PACKAGE, EINA_TRUE);
- Evas_Object *back_btn = WidgetFactory::createButton(ad->md.getNaviframe(), {}, WidgetFactory::BACK_BUTTON_ARROW_STYLE, backCb, ad);
- elm_layout_content_set(ad->md.getNaviframe(), "prev_btn", back_btn);
+ Evas_Object *back_btn = WidgetFactory::createButton(ad->md.getNaviframe()->getObject(), {}, WidgetFactory::BACK_BUTTON_ARROW_STYLE, backCb, ad);
+ elm_layout_content_set(ad->md.getNaviframe()->getObject(), "prev_btn", back_btn);
}
void UniversalSwitchSettingsPage::createManageGroup(SettingAccessibility *ad, Evas_Object *genlist)
Evas_Object *ctxpopup = NULL;
retvm_if(ad == NULL, NULL, "Input parameter is NULL");
- ctxpopup = elm_ctxpopup_add(ad->md.getNaviframe());
+ ctxpopup = elm_ctxpopup_add(ad->md.getNaviframe()->getObject());
elm_ctxpopup_auto_hide_disabled_set(ctxpopup, EINA_TRUE);
evas_object_data_set(ctxpopup, CTXPOPUP_DATA_AD, (void *)ad);
eext_object_event_callback_add(ctxpopup, EEXT_CALLBACK_BACK, ctxPopupDelCb, NULL);
ad->setValuePage_ = std::make_unique<SetValuePage>(ad, ValueEditorType::RADIOS, page_title);
SetValuePage::addRadioItemChangedCb(ad, cb);
- elm_naviframe_item_pop_cb_set(elm_naviframe_top_item_get(ad->md.getNaviframe()), NULL, NULL);
+ elm_naviframe_item_pop_cb_set(elm_naviframe_top_item_get(ad->md.getNaviframe()->getObject()), NULL, NULL);
int i;
for (i = 0; i < MEDIA_LEVEL_COUNT; i++)
{
ad->setValuePage_ = std::make_unique<SetValuePage>(ad, ValueEditorType::RADIOS, _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_FEEDBACK_SOUND_VOLUME"));
SetValuePage::addRadioItemChangedCb(ad, feedbackSoundVolumeChangedCb);
- elm_naviframe_item_pop_cb_set(elm_naviframe_top_item_get(ad->md.getNaviframe()), NULL, NULL);
+ elm_naviframe_item_pop_cb_set(elm_naviframe_top_item_get(ad->md.getNaviframe()->getObject()), NULL, NULL);
int i;
for (i = 0; i < MEDIA_LEVEL_COUNT; i++)
ad->setValuePage_ = std::make_unique<SetValuePage>(ad, ValueEditorType::RADIOS, _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_FEEDBACK_CURSOR_CL"));
SetValuePage::addRadioItemChangedCb(ad, cursorColorListItemChangedCb);
- elm_naviframe_item_pop_cb_set(elm_naviframe_top_item_get(ad->md.getNaviframe()), NULL, NULL);
+ elm_naviframe_item_pop_cb_set(elm_naviframe_top_item_get(ad->md.getNaviframe()->getObject()), NULL, NULL);
for (i = 0; i < CURSOR_COLORS_COUNT; i++)
SetValuePage::addRadioItem(ad, _cursor_color[i].key, i, _cursor_color[i].id == ad->us_configuration.cursor_color);
retm_if(data == NULL, "Data argument is NULL");
auto ad = static_cast<SettingAccessibility *>(data);
- elm_naviframe_item_pop(ad->md.getNaviframe());
+ elm_naviframe_item_pop(ad->md.getNaviframe()->getObject());
}
void UniversalSwitchSettingsPage::syncVoiceFeedbackWithVconf(keynode_t *node, void *user_data)