summaryrefslogtreecommitdiff
path: root/lib/common/Ui/Genlist/include/Item.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/common/Ui/Genlist/include/Item.h')
-rw-r--r--lib/common/Ui/Genlist/include/Item.h123
1 files changed, 0 insertions, 123 deletions
diff --git a/lib/common/Ui/Genlist/include/Item.h b/lib/common/Ui/Genlist/include/Item.h
deleted file mode 100644
index 28876ea..0000000
--- a/lib/common/Ui/Genlist/include/Item.h
+++ /dev/null
@@ -1,123 +0,0 @@
-/*
- * Copyright 2012-2013 Samsung Electronics Co., Ltd
- *
- * Licensed under the Flora License, Version 1.1 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://floralicense.org/license/
- *
- * 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 __UI_GENLIST_ITEM_H__
-#define __UI_GENLIST_ITEM_H__
-
-#include <Elementary.h>
-#include "NonCopyable.h"
-
-namespace Ui
-{
- namespace Genlist
- {
- /*
- * \par Description:
- * Wrapper class for genlist item. Redirects item's callbacks to virtual methods.
- * Any instance of this class should be allocated with operator new.
- * It will be automatically deleted by genlist when item is deleted.
- */
- class Item : public Utils::NonCopyable
- {
- public:
- Item(Elm_Genlist_Item_Type type = ELM_GENLIST_ITEM_NONE);
- virtual ~Item();
-
- /*
- * \par Description:
- * Returned value should be individual for every derived class.
- * This can be achieved by storing pointer to Elm_Genlist_Item_Class
- * in a static variable inside overloaded method and initializing it using createClass.
- * This way every derived class will have its own Elm_Genlist_Item_Class.
- *
- * @par example
- * @code
- *
- * Elm_Genlist_Item_Class * getClass() const
- * {
- * static Elm_Genlist_Item_Class *itemClass = createClass("2text.1icon");
- * return itemClass;
- * }
- *
- * @endcode
- */
- virtual Elm_Genlist_Item_Class * getClass() const = 0;
-
- /*
- * \par Description:
- * Called whenever any item's text part needs to be updated.
- *
- * @param[in] part Name of the part
- * @return Allocated string with text for a specified part,
- * it will be deallocated with free() by genlist
- */
- virtual char * getText(const char *part) const { return NULL; }
-
- /*
- * \par Description:
- * Called whenever any item's content part needs to be updated.
- *
- * @param[in] part Name of the part
- * @param[in] parent Parent genlist to use as a parent object for content
- * @return Content for a specified part
- */
- virtual Evas_Object * getContent(const char *part, Evas_Object *parent) const { return NULL; }
-
- /*
- * \par Description:
- * Called whenever any item's state part needs to be updated.
- * Genlist will emit signal "elm,state,x,active" or "elm,state,x,passive"
- * with part's name instead of 'x'.
- *
- * @param[in] part Name of the part
- * @return true for active, false for passive
- *
- */
- virtual bool getState(const char *part) const { return false; }
-
- /*
- * \par Description:
- * Called when selection event occurs on the item.
- *
- * @param item Elm_Object_Item for selected item
- */
- virtual void onSelect(Elm_Object_Item &item) { }
-
- /*
- * @return Item type
- * @see Elm_Genlist_Item_Type
- */
- Elm_Genlist_Item_Type getType() const { return m_Type; }
-
- protected:
- static Elm_Genlist_Item_Class * createClass(
- const char *style,
- const char *decorateStyle = NULL,
- const char *editStyle = NULL
- );
-
- private:
- Elm_Genlist_Item_Type m_Type;
-
- static char * getText(void *data, Evas_Object *obj, const char *part);
- static Evas_Object * getContent(void *data, Evas_Object *obj, const char *part);
- static Eina_Bool getState(void *data, Evas_Object *obj, const char *part);
- static void onDestroy(void *data, Evas_Object *obj);
- };
- }
-}
-
-#endif /* __UI_GENLIST_ITEM_H__ */