*/
typedef std::function<bool()> BackCallback;
- /**
- * @brief Create popup
- * @param[in] isVisible Popup visibility on start
- */
- Popup(bool isVisible = true);
+ Popup();
/**
* @brief Allows method overload instead of shadowing
void setBackCallback(BackCallback callback);
/**
+ * @brief Show popup with animation.
+ */
+ void show();
+
+ /**
* @brief Close popup with animation.
*/
void close();
ButtonCallback m_ButtonCbs[POPUP_BUTTON_MAX_COUNT];
size_t m_ButtonCount;
- bool m_IsVisible;
BackCallback m_OnBack;
};
}
/**
* @brief Create progress popup.
* @param[in] maxValue Max value of progressbar
- * @param[in] isVisible Popup visibility on start
*/
- ProgressPopup(size_t maxValue, bool isVisible = true);
+ ProgressPopup(size_t maxValue);
/**
* @brief Set progress of the progressbar
const char *buttonParts[POPUP_BUTTON_MAX_COUNT] = { "button1", "button2", "button3" };
}
-Popup::Popup(bool isVisible)
- : m_ButtonCount(0), m_IsVisible(isVisible)
+Popup::Popup()
+ : m_ButtonCount(0)
{
}
m_OnBack = std::move(callback);
}
+void Popup::show()
+{
+ evas_object_show(getEvasObject());
+}
+
void Popup::close()
{
evas_object_hide(getEvasObject());
elm_popup_align_set(popup, ELM_NOTIFY_ALIGN_FILL, 1.0);
eext_object_event_callback_add(popup, EEXT_CALLBACK_BACK,
makeCallback(&Popup::onBackPressed), this);
- if (m_IsVisible) {
- evas_object_show(popup);
- }
return popup;
}
using namespace Ui;
ProcessPopup::ProcessPopup(Size size, double showDelayTime, double showMinTime)
- : Popup(false),
- m_Size(size), m_Layout(nullptr),
+ : m_Size(size), m_Layout(nullptr),
m_ShowDelayTimer(nullptr), m_ShowMinTimer(nullptr),
m_IsDestroyPending(false)
{
void ProgressController::createProgressPopup(Evas_Object *parent, const char *title, int maxValue)
{
- m_ProgressPopup = new Ui::ProgressPopup(maxValue, false);
+ m_ProgressPopup = new Ui::ProgressPopup(maxValue);
RETM_IF(!m_ProgressPopup, "m_ProgressPopup is NULL");
m_ProgressPopup->create(parent);
const std::string layoutFilePath = App::getResourcePath(APPS_COMMON_PROGRESSBAR_LAYOUT_EDJ);
}
-ProgressPopup::ProgressPopup(size_t maxValue, bool isVisible)
- : Popup(isVisible), m_MaxValue(maxValue), m_Progressbar(nullptr)
+ProgressPopup::ProgressPopup(size_t maxValue)
+ : m_MaxValue(maxValue), m_Progressbar(nullptr)
{
}
result.type = (long) data;
onSelected({ result });
});
+ popup->show();
return false;
});
auto item = (Ux::SelectItem *) elm_object_item_data_get(button);
item->setChecked(false);
});
+ popup->show();
}
getPage()->close();
return true;
});
+ popup->show();
});
menu->addItem("IDS_PB_OPT_SHARE", [this] {
if (m_Contact.getSubType() == ObjectTypeContact) {
}
});
popup->create(getParent()->getEvasObject());
+ popup->show();
}
popup->addItem("IDS_PB_OPT_GROUPS_AND_MEMBERS_ABB", (void *)true);
popup->setSelectedCallback(std::bind(&GroupsView::onDeleteSelected,
this, std::move(results), _1));
+ popup->show();
return false;
});
popup->addItem(Common::getContactFieldName(fieldId), (void *) fieldId);
}
}
+ popup->show();
}
update();
});
popup->create(getEvasObject());
+ popup->show();
}
update();
});
}
+ popup->show();
}
});
popup->create(getEvasObject());
+ popup->show();
return false;
} else {
if (m_TypeField.hasCustomValue()) {
addFieldItem(field);
});
popup->create(getEvasObject());
+ popup->show();
}
void InputView::addRingtoneField()
m_Items[Model::FieldName]->focus();
return true;
});
+ popup->show();
return;
}
getPage()->close();
return true;
});
+ popup->show();
return false;
}
static_cast<ListSection *>(m_Sections[SectionFavorites].m_Item),
static_cast<ListSection *>(m_Sections[SectionMfc].m_Item));
popup->create(getEvasObject());
+ popup->show();
});
}
}
popup->setSelectedCallback([this](void *data) {
onSelectFinished();
});
+ popup->show();
return false;
}
popup->addItem("IDS_PB_OPT_SD_CARD", (void *) StorageSdCard);
popup->addItem("IDS_PB_OPT_DEVICE", (void *) StorageDevice);
popup->setSelectedCallback(std::bind(&ExportItem::runExporter, this, _1, std::move(ids)));
+ popup->show();
return;
}
finishPopup->setTitle("IDS_PB_HEADER_CONTACTS_EXPORTED_ABB");
finishPopup->setText(text);
finishPopup->addButton("IDS_PB_BUTTON_OK_ABB2");
+ finishPopup->show();
}
void ExportItem::runExporter(void *data, std::vector<int> ids)
void ImportController::createCancelPopup(Evas_Object *parent)
{
- m_CancelPopup = new Ui::Popup(false);
+ m_CancelPopup = new Ui::Popup();
m_CancelPopup->create(parent);
m_CancelPopup->setTitle("IDS_PB_HEADER_CANCEL_IMPORTING_ABB");
}
popup->setSelectedCallback(std::bind(&ImportItem::onStorageSelected, this, _1));
+ popup->show();
} else {
onStorageSelected((void *) ImportStorageDevice);
}
popup->setSelectedCallback([](void *data) {
contacts_setting_set_name_display_order((contacts_name_display_order_e) (long) data);
});
+ popup->show();
}
void NameFormatItem::onNameOrderChanged(contacts_name_display_order_e order)
popup->setSelectedCallback([](void *data) {
contacts_setting_set_name_sorting_order((contacts_name_sorting_order_e) (long) data);
});
+ popup->show();
}
void SortByItem::onSortOrderChanged(contacts_name_sorting_order_e order)
fillLayout();
}
});
+ popup->show();
}
void LogsView::onDeleteSelected()
m_AppControl = App::requestContactEdit(0, m_Entry->getNumber().c_str());
m_AppControl.launch();
});
+ popup->show();
}
}
} else {
Ui::Popup *popup = new SpeedDialPopup(digit);
popup->create(getEvasObject());
+ popup->show();
}
}
popup->setSelectedCallback([this](void *data) {
m_OnSelected(*(SearchResultPtr *) data);
});
+ popup->show();
}