Source code formating unification
[platform/framework/web/wrt-plugins-common.git] / src / wrt-popup / wrt / popup-bin / renderer / popup_renderer.cpp
index ed00236..68290ae 100644 (file)
@@ -34,7 +34,6 @@
 #include "evas_object.h"
 
 namespace Wrt {
-
 namespace {
 using namespace Popup;
 const char* EDJ_NAME = "/usr/share/edje/ace/generic_popup.edj";
@@ -68,7 +67,6 @@ Evas_Object* create_layout_main(Evas_Object* parent, int totalV)
 
 namespace Popup {
 namespace Renderer {
-
 class PopupRenderer::Impl
 {
   public:
@@ -76,8 +74,7 @@ class PopupRenderer::Impl
         m_popupsToRender(),
         m_current(),
         m_initialized(false)
-    {
-    }
+    {}
 
     ~Impl()
     {
@@ -103,8 +100,8 @@ class PopupRenderer::Impl
     }
 
     void ButtonCallback(EvasObject::IConnection* /*connection*/,
-            void* /*event_info*/,
-            void* data)
+                        void* /*event_info*/,
+                        void* data)
     {
         LogInfo("ButtonCallback");
         Assert(m_initialized);
@@ -128,8 +125,8 @@ class PopupRenderer::Impl
     }
 
     void CheckCallback(EvasObject::IConnection* connection,
-            void* /*event_info*/,
-            void* /* unused */)
+                       void* /*event_info*/,
+                       void* /* unused */)
     {
         m_checkState =
             elm_check_state_get(connection->GetEvasObject());
@@ -143,9 +140,9 @@ class PopupRenderer::Impl
     }
 
     void DoRender(const PopupObject::Label& object,
-            EvasObject& parent,
-            EvasObject& layout,
-            int themeIndex)
+                  EvasObject& parent,
+                  EvasObject& layout,
+                  int themeIndex)
     {
         EvasObject label(elm_label_add(parent));
 
@@ -164,9 +161,9 @@ class PopupRenderer::Impl
     }
 
     void DoRender(const PopupObject::Check& object,
-            EvasObject& parent,
-            EvasObject& layout,
-            int themeIndex)
+                  EvasObject& parent,
+                  EvasObject& layout,
+                  int themeIndex)
     {
         EvasObject check(elm_check_add(parent));
 
@@ -188,7 +185,7 @@ class PopupRenderer::Impl
     }
 
     void DoRender(const PopupObject::Button& object,
-            EvasObject &parent)
+                  EvasObject &parent)
     {
         EvasObject btn(elm_button_add(parent));
 
@@ -197,13 +194,14 @@ class PopupRenderer::Impl
         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);
 
@@ -214,14 +212,15 @@ class PopupRenderer::Impl
         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);
 
@@ -232,7 +231,8 @@ class PopupRenderer::Impl
         btn3.ConnectMemberSmartCallback(BUTTON_CLICKED_CALLBACK_NAME,
                                         &Impl::ButtonCallback,
                                         this,
-                                        reinterpret_cast<void*>(object3.getLabelId()));
+                                        reinterpret_cast<void*>(object3.
+                                                                    getLabelId()));
         m_createdObjects.push_back(btn3);
     }
 
@@ -274,12 +274,12 @@ class PopupRenderer::Impl
             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] +
@@ -326,7 +326,7 @@ class PopupRenderer::Impl
                                    layout);
 
             // show buution
-            switch(buttonObjectList.size()) {
+            switch (buttonObjectList.size()) {
             case 0:
                 LogInfo("no button");
                 break;
@@ -401,7 +401,7 @@ void PopupRenderer::Deinitialize()
 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)
@@ -413,7 +413,6 @@ void PopupRenderer::setExternalCanvas(void* externalCanvas)
 {
     m_impl->setExternalCanvas(externalCanvas);
 }
-
 }
 } // namespace Popup
 } // namespace Wrt