#include "evas_object.h"
namespace Wrt {
-
namespace {
using namespace Popup;
const char* EDJ_NAME = "/usr/share/edje/ace/generic_popup.edj";
namespace Popup {
namespace Renderer {
-
class PopupRenderer::Impl
{
public:
m_popupsToRender(),
m_current(),
m_initialized(false)
- {
- }
+ {}
~Impl()
{
}
void ButtonCallback(EvasObject::IConnection* /*connection*/,
- void* /*event_info*/,
- void* data)
+ void* /*event_info*/,
+ void* data)
{
LogInfo("ButtonCallback");
Assert(m_initialized);
}
void CheckCallback(EvasObject::IConnection* connection,
- void* /*event_info*/,
- void* /* unused */)
+ void* /*event_info*/,
+ void* /* unused */)
{
m_checkState =
elm_check_state_get(connection->GetEvasObject());
}
void DoRender(const PopupObject::Label& object,
- EvasObject& parent,
- EvasObject& layout,
- int themeIndex)
+ EvasObject& parent,
+ EvasObject& layout,
+ int themeIndex)
{
EvasObject label(elm_label_add(parent));
}
void DoRender(const PopupObject::Check& object,
- EvasObject& parent,
- EvasObject& layout,
- int themeIndex)
+ EvasObject& parent,
+ EvasObject& layout,
+ int themeIndex)
{
EvasObject check(elm_check_add(parent));
}
void DoRender(const PopupObject::Button& object,
- EvasObject &parent)
+ EvasObject &parent)
{
EvasObject btn(elm_button_add(parent));
btn.ConnectMemberSmartCallback(BUTTON_CLICKED_CALLBACK_NAME,
&Impl::ButtonCallback,
this,
- reinterpret_cast<void*>(object.getLabelId()));
+ reinterpret_cast<void*>(object.
+ getLabelId()));
m_createdObjects.push_back(btn);
}
void DoRender(const PopupObject::Button& object1,
- const PopupObject::Button& object2,
- EvasObject &parent)
+ const PopupObject::Button& object2,
+ EvasObject &parent)
{
DoRender(object1, parent);
btn2.ConnectMemberSmartCallback(BUTTON_CLICKED_CALLBACK_NAME,
&Impl::ButtonCallback,
this,
- reinterpret_cast<void*>(object2.getLabelId()));
+ reinterpret_cast<void*>(object2.
+ getLabelId()));
m_createdObjects.push_back(btn2);
}
void DoRender(const PopupObject::Button& object1,
- const PopupObject::Button& object2,
- const PopupObject::Button& object3,
- EvasObject &parent)
+ const PopupObject::Button& object2,
+ const PopupObject::Button& object3,
+ EvasObject &parent)
{
DoRender(object1, object2, parent);
btn3.ConnectMemberSmartCallback(BUTTON_CLICKED_CALLBACK_NAME,
&Impl::ButtonCallback,
this,
- reinterpret_cast<void*>(object3.getLabelId()));
+ reinterpret_cast<void*>(object3.
+ getLabelId()));
m_createdObjects.push_back(btn3);
}
m_themeIndexV = 0;
// preprocessing
- std::vector<int> countPopupObjects = {0 /* PopupObject::BUTTON */,
- 0 /* PopupObject::LABEL */,
- 0 /* PopupObject::CHECK */};
+ std::vector<int> countPopupObjects = { 0 /* PopupObject::BUTTON */,
+ 0 /* PopupObject::LABEL */,
+ 0 /* PopupObject::CHECK */ };
FOREACH(it, m_current->GetPopupObjects()) {
Assert((*it)->getType() < countPopupObjects.size() &&
- "Wrong PopupObject assigned");
+ "Wrong PopupObject assigned");
countPopupObjects[(*it)->getType()]++;
}
int needsIndexV = countPopupObjects[PopupObject::LABEL] +
layout);
// show buution
- switch(buttonObjectList.size()) {
+ switch (buttonObjectList.size()) {
case 0:
LogInfo("no button");
break;
IPopupPtr PopupRenderer::CreatePopup()
{
return std::static_pointer_cast<IPopup>(IPopupPtr
- (new Popup(shared_from_this())));
+ (new Popup(shared_from_this())));
}
void PopupRenderer::Render(PopupPtr popup)
{
m_impl->setExternalCanvas(externalCanvas);
}
-
}
} // namespace Popup
} // namespace Wrt