summaryrefslogtreecommitdiff
path: root/lib-contact/ct-setting/src/CtSettingRadioPopup.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib-contact/ct-setting/src/CtSettingRadioPopup.h')
-rw-r--r--lib-contact/ct-setting/src/CtSettingRadioPopup.h57
1 files changed, 57 insertions, 0 deletions
diff --git a/lib-contact/ct-setting/src/CtSettingRadioPopup.h b/lib-contact/ct-setting/src/CtSettingRadioPopup.h
new file mode 100644
index 0000000..0d00d4c
--- /dev/null
+++ b/lib-contact/ct-setting/src/CtSettingRadioPopup.h
@@ -0,0 +1,57 @@
+/*
+ * Copyright (c) 2009-2015 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+#ifndef _CT_SETTING_RADIO_POPUP_H_
+#define _CT_SETTING_RADIO_POPUP_H_
+
+#include "WPopup.h"
+#include <string>
+#include <vector>
+#include <functional>
+
+class CtSettingRadioPopup : public WPopup
+{
+public:
+ CtSettingRadioPopup(const std::vector<std::string>& label, int selectedIndex);
+ void setOnResultCb(std::function<void (int)> resultCb);
+
+private:
+ virtual Evas_Object* onCreate( Evas_Object* parent, void* viewParam);
+ virtual void onDestroy();
+ Evas_Object* __createContent(Evas_Object *parent);
+ static void __itemSelectedCb(void* data, Evas_Object* obj, void* event_info);
+
+private:
+ virtual ~CtSettingRadioPopup();
+
+private:
+ struct __ItemData
+ {
+ __ItemData();
+ CtSettingRadioPopup* popup;
+ std::string label;
+ int index;
+ };
+
+private:
+ std::vector<std::string> __label;
+ int __selectedIndex;
+ std::function<void (int)> __resultCb;
+};
+
+
+#endif //_CT_SETTING_RADIO_POPUP_H_