summaryrefslogtreecommitdiff
path: root/lib-contact/ct-detail/src/CtDetailViewNoteItem.h
diff options
context:
space:
mode:
authorjk7744.park <jk7744.park@samsung.com>2015-10-24 15:42:16 +0900
committerjk7744.park <jk7744.park@samsung.com>2015-10-24 15:42:16 +0900
commit2aa01f1ea98ff42e4bfef6da401eb19383f2f4ce (patch)
tree7eb4f13beea5ba0aae81b66d48630f87848a6435 /lib-contact/ct-detail/src/CtDetailViewNoteItem.h
parent331d162934ac346a137b6a3a17074d948a3c6c41 (diff)
downloadphone-contacts-2aa01f1ea98ff42e4bfef6da401eb19383f2f4ce.tar.gz
phone-contacts-2aa01f1ea98ff42e4bfef6da401eb19383f2f4ce.tar.bz2
phone-contacts-2aa01f1ea98ff42e4bfef6da401eb19383f2f4ce.zip
Diffstat (limited to 'lib-contact/ct-detail/src/CtDetailViewNoteItem.h')
-rw-r--r--lib-contact/ct-detail/src/CtDetailViewNoteItem.h66
1 files changed, 66 insertions, 0 deletions
diff --git a/lib-contact/ct-detail/src/CtDetailViewNoteItem.h b/lib-contact/ct-detail/src/CtDetailViewNoteItem.h
new file mode 100644
index 0000000..dab04fc
--- /dev/null
+++ b/lib-contact/ct-detail/src/CtDetailViewNoteItem.h
@@ -0,0 +1,66 @@
+/*
+ * 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_DETAIL_VIEW_NOTE_ITEM_H_
+#define _CT_DETAIL_VIEW_NOTE_ITEM_H_
+
+#include "WGenlistItem.h"
+#include "CtDetailDataBase.h"
+
+class CtDetailViewNoteItem : public WGenlistItem
+{
+public:
+ CtDetailViewNoteItem(CtDetailDataBase *data, contacts_record_h record)
+ {
+ m_DetailData = data;
+ m_Record = record;
+ }
+
+public:
+ virtual Elm_Genlist_Item_Class *getItemClassStatic()
+ {
+ static Elm_Genlist_Item_Class itc = {};
+ if( itc.item_style ) {
+ return &itc;
+ }
+ itc.item_style = "multiline";
+ itc.func.text_get = getTextNote;
+ itc.func.del = WGENLIST_ITEM_DEL();
+ return &itc;
+ }
+
+private:
+ static char *getTextNote(void *data, Evas_Object *obj, const char *part)
+ {
+ WPRET_VM(!data, NULL, "data is NULL");
+ CtDetailViewNoteItem *item = (CtDetailViewNoteItem *)data;
+ WPRET_VM(!item->m_DetailData, NULL, "m_DetailData is NULL");
+
+ if (0 == strcmp(part, "elm.text.multiline")) {
+ return elm_entry_utf8_to_markup(item->m_DetailData->getNote(item->m_Record));
+ }
+ return NULL;
+ }
+
+private:
+ CtDetailViewNoteItem();
+ CtDetailDataBase *m_DetailData;
+ contacts_record_h m_Record;
+};
+
+
+#endif /* _CT_DETAIL_VIEW_NOTE_ITEM_H_ */