parent
72bca3e91d
commit
bcaa632696
|
@ -312,15 +312,9 @@ public:
|
|||
* @param func_data Data passed to @p func above.
|
||||
* @return A handle to the item added or NULL if not possible
|
||||
*
|
||||
* @ingroup Genlist
|
||||
*/
|
||||
|
||||
//EAPI Elm_Genlist_Item *elm_genlist_item_append(Evas_Object *obj, const Elm_Genlist_Item_Class *itc,
|
||||
// const void *data, Elm_Genlist_Item *parent, Elm_Genlist_Item_Flags flags,
|
||||
// Evas_Smart_Cb func, const void *func_data);
|
||||
|
||||
|
||||
void append (GenListColumnConstructor *construction, GenListItem *parent, Elm_Genlist_Item_Flags flags, GenListColumnSelector *selection);
|
||||
GenListItem *append (GenListColumnConstructor *construction, const GenListItem *parent, Elm_Genlist_Item_Flags flags, GenListColumnSelector *selection);
|
||||
|
||||
// TODO: which type is event_info here instead of void*?
|
||||
sigc::signal <void, GenListColumnSelector&, const Evasxx::Object&, void*> signalSelect;
|
||||
|
@ -342,13 +336,7 @@ private:
|
|||
};
|
||||
|
||||
#if 0
|
||||
|
||||
|
||||
/* operations to add items */
|
||||
EAPI Elm_Genlist_Item *elm_genlist_item_append(Evas_Object *obj, const Elm_Genlist_Item_Class *itc,
|
||||
const void *data, Elm_Genlist_Item *parent,
|
||||
Elm_Genlist_Item_Flags flags, Evas_Smart_Cb func,
|
||||
const void *func_data);
|
||||
EAPI Elm_Genlist_Item *elm_genlist_item_prepend(Evas_Object *obj, const Elm_Genlist_Item_Class *itc, const void *data, Elm_Genlist_Item *parent, Elm_Genlist_Item_Flags flags, Evas_Smart_Cb func, const void *func_data);
|
||||
EAPI Elm_Genlist_Item *elm_genlist_item_insert_before(Evas_Object *obj, const Elm_Genlist_Item_Class *itc, const void *data, Elm_Genlist_Item *before, Elm_Genlist_Item_Flags flags, Evas_Smart_Cb func, const void *func_data);
|
||||
EAPI Elm_Genlist_Item *elm_genlist_item_insert_after(Evas_Object *obj, const Elm_Genlist_Item_Class *itc, const void *data, Elm_Genlist_Item *after, Elm_Genlist_Item_Flags flags, Evas_Smart_Cb func, const void *func_data);
|
||||
|
@ -366,32 +354,7 @@ private:
|
|||
* icon_top_text_bottom
|
||||
*/
|
||||
|
||||
/* Genlist Item operation */
|
||||
EAPI Elm_Genlist_Item *elm_genlist_item_next_get(const Elm_Genlist_Item *item);
|
||||
EAPI Elm_Genlist_Item *elm_genlist_item_prev_get(const Elm_Genlist_Item *item);
|
||||
EAPI Evas_Object *elm_genlist_item_genlist_get(const Elm_Genlist_Item *item);
|
||||
EAPI Elm_Genlist_Item *elm_genlist_item_parent_get(const Elm_Genlist_Item *it);
|
||||
EAPI void elm_genlist_item_subitems_clear(Elm_Genlist_Item *item);
|
||||
EAPI void elm_genlist_item_selected_set(Elm_Genlist_Item *item, Eina_Bool selected);
|
||||
EAPI Eina_Bool elm_genlist_item_selected_get(const Elm_Genlist_Item *item);
|
||||
EAPI void elm_genlist_item_expanded_set(Elm_Genlist_Item *item, Eina_Bool expanded);
|
||||
EAPI Eina_Bool elm_genlist_item_expanded_get(const Elm_Genlist_Item *item);
|
||||
EAPI void elm_genlist_item_disabled_set(Elm_Genlist_Item *item, Eina_Bool disabled);
|
||||
EAPI Eina_Bool elm_genlist_item_disabled_get(const Elm_Genlist_Item *item);
|
||||
EAPI void elm_genlist_item_display_only_set(Elm_Genlist_Item *it, Eina_Bool display_only);
|
||||
EAPI Eina_Bool elm_genlist_item_display_only_get(const Elm_Genlist_Item *it);
|
||||
EAPI void elm_genlist_item_show(Elm_Genlist_Item *item);
|
||||
EAPI void elm_genlist_item_bring_in(Elm_Genlist_Item *item);
|
||||
EAPI void elm_genlist_item_top_show(Elm_Genlist_Item *item);
|
||||
EAPI void elm_genlist_item_top_bring_in(Elm_Genlist_Item *item);
|
||||
EAPI void elm_genlist_item_middle_show(Elm_Genlist_Item *it);
|
||||
EAPI void elm_genlist_item_middle_bring_in(Elm_Genlist_Item *it);
|
||||
EAPI void elm_genlist_item_del(Elm_Genlist_Item *item);
|
||||
EAPI const void *elm_genlist_item_data_get(const Elm_Genlist_Item *item);
|
||||
EAPI void elm_genlist_item_data_set(Elm_Genlist_Item *it, const void *data);
|
||||
EAPI const Evas_Object *elm_genlist_item_object_get(const Elm_Genlist_Item *it);
|
||||
EAPI void elm_genlist_item_update(Elm_Genlist_Item *item);
|
||||
|
||||
|
||||
#endif // 0
|
||||
|
||||
} // end namespace Elmxx
|
||||
|
|
|
@ -4,6 +4,9 @@
|
|||
/* EFL */
|
||||
#include <Elementary.h>
|
||||
|
||||
/* EFLxx */
|
||||
#include <evasxx/Evasxx.h>
|
||||
|
||||
namespace Elmxx {
|
||||
|
||||
/* forward declarations */
|
||||
|
@ -13,8 +16,43 @@ class GenListItem
|
|||
{
|
||||
public:
|
||||
friend class GenList;
|
||||
|
||||
virtual ~GenListItem ();
|
||||
|
||||
#if 0
|
||||
/* Genlist Item operation */
|
||||
EAPI Elm_Genlist_Item *elm_genlist_item_next_get(const Elm_Genlist_Item *item);
|
||||
EAPI Elm_Genlist_Item *elm_genlist_item_prev_get(const Elm_Genlist_Item *item);
|
||||
EAPI Evas_Object *elm_genlist_item_genlist_get(const Elm_Genlist_Item *item);
|
||||
EAPI Elm_Genlist_Item *elm_genlist_item_parent_get(const Elm_Genlist_Item *it);
|
||||
#endif
|
||||
|
||||
void clearSubItems ();
|
||||
void setSelected (bool selected);
|
||||
bool getSelected () const;
|
||||
void setExpanded (bool expanded);
|
||||
bool getExpanded () const;
|
||||
void setDisabled (bool disabled);
|
||||
bool getDisabled () const;
|
||||
void setDisplayOnly (bool displayOnly);
|
||||
bool getDisplayOnly () const;
|
||||
void show ();
|
||||
void bringIn ();
|
||||
void showTop ();
|
||||
void bringInTop ();
|
||||
void showMiddle ();
|
||||
void bringInMiddle ();
|
||||
void update ();
|
||||
|
||||
const Evasxx::Object *getEvasObject ();
|
||||
|
||||
static GenListItem *wrap (const Elm_Genlist_Item *item);
|
||||
|
||||
static GenListItem *objectLink (const Elm_Genlist_Item *item);
|
||||
|
||||
private:
|
||||
GenListItem (const Elm_Genlist_Item *item);
|
||||
|
||||
Elm_Genlist_Item *mItem;
|
||||
};
|
||||
|
||||
|
|
|
@ -145,7 +145,7 @@ void GenList::glSelected (GenListColumnSelector &selection, const Evasxx::Object
|
|||
|
||||
/* operations to add items */
|
||||
|
||||
void GenList::append (GenListColumnConstructor *construction, GenListItem *parent, Elm_Genlist_Item_Flags flags, GenListColumnSelector *selection)
|
||||
GenListItem *GenList::append (GenListColumnConstructor *construction, const GenListItem *parent, Elm_Genlist_Item_Flags flags, GenListColumnSelector *selection)
|
||||
{
|
||||
assert (mModel);
|
||||
|
||||
|
@ -187,6 +187,8 @@ void GenList::append (GenListColumnConstructor *construction, GenListItem *paren
|
|||
{
|
||||
mInternalSelList.push_back (selection);
|
||||
}
|
||||
|
||||
return GenListItem::wrap (gli);
|
||||
}
|
||||
|
||||
} // end namespace Elmxx
|
||||
|
|
|
@ -2,8 +2,122 @@
|
|||
#include <config.h>
|
||||
#endif
|
||||
|
||||
/* Project */
|
||||
#include "../include/elementaryxx/GenListItem.h"
|
||||
|
||||
/* STD */
|
||||
#include <cassert>
|
||||
|
||||
namespace Elmxx {
|
||||
|
||||
GenListItem::GenListItem (const Elm_Genlist_Item *item) :
|
||||
mItem (const_cast <Elm_Genlist_Item*> (item))
|
||||
{
|
||||
elm_genlist_item_data_set (mItem, this);
|
||||
}
|
||||
|
||||
GenListItem::~GenListItem ()
|
||||
{
|
||||
elm_genlist_item_del (mItem);
|
||||
}
|
||||
|
||||
void GenListItem::clearSubItems ()
|
||||
{
|
||||
elm_genlist_item_subitems_clear (mItem);
|
||||
|
||||
}
|
||||
|
||||
void GenListItem::setSelected (bool selected)
|
||||
{
|
||||
elm_genlist_item_selected_set (mItem, selected);
|
||||
}
|
||||
|
||||
bool GenListItem::getSelected () const
|
||||
{
|
||||
return elm_genlist_item_selected_get (mItem);
|
||||
}
|
||||
|
||||
void GenListItem::setExpanded (bool expanded)
|
||||
{
|
||||
elm_genlist_item_expanded_set (mItem, expanded);
|
||||
}
|
||||
|
||||
bool GenListItem::getExpanded () const
|
||||
{
|
||||
return elm_genlist_item_expanded_get (mItem);
|
||||
}
|
||||
|
||||
void GenListItem::setDisabled (bool disabled)
|
||||
{
|
||||
elm_genlist_item_disabled_set (mItem, disabled);
|
||||
}
|
||||
|
||||
bool GenListItem::getDisabled () const
|
||||
{
|
||||
return elm_genlist_item_disabled_get (mItem);
|
||||
}
|
||||
|
||||
void GenListItem::setDisplayOnly (bool displayOnly)
|
||||
{
|
||||
elm_genlist_item_display_only_set (mItem, displayOnly);
|
||||
}
|
||||
|
||||
bool GenListItem::getDisplayOnly () const
|
||||
{
|
||||
return elm_genlist_item_display_only_get (mItem);
|
||||
}
|
||||
|
||||
void GenListItem::show ()
|
||||
{
|
||||
elm_genlist_item_show (mItem);
|
||||
}
|
||||
|
||||
void GenListItem::bringIn ()
|
||||
{
|
||||
elm_genlist_item_bring_in (mItem);
|
||||
}
|
||||
|
||||
void GenListItem::showTop ()
|
||||
{
|
||||
elm_genlist_item_top_show (mItem);
|
||||
}
|
||||
|
||||
void GenListItem::bringInTop ()
|
||||
{
|
||||
elm_genlist_item_top_bring_in (mItem);
|
||||
}
|
||||
|
||||
void GenListItem::showMiddle ()
|
||||
{
|
||||
elm_genlist_item_middle_show (mItem);
|
||||
}
|
||||
|
||||
void GenListItem::bringInMiddle ()
|
||||
{
|
||||
elm_genlist_item_middle_bring_in (mItem);
|
||||
}
|
||||
|
||||
void GenListItem::update ()
|
||||
{
|
||||
elm_genlist_item_update (mItem);
|
||||
}
|
||||
|
||||
const Evasxx::Object *GenListItem::getEvasObject ()
|
||||
{
|
||||
const Evas_Object *obj = elm_genlist_item_object_get (mItem);
|
||||
return Evasxx::Object::objectLink (obj);
|
||||
}
|
||||
|
||||
GenListItem *GenListItem::wrap (const Elm_Genlist_Item *item)
|
||||
{
|
||||
return new GenListItem (item);
|
||||
}
|
||||
|
||||
GenListItem *GenListItem::objectLink (const Elm_Genlist_Item *item)
|
||||
{
|
||||
GenListItem *item2 = static_cast <GenListItem*> (const_cast <void*> (elm_genlist_item_data_get(item)));
|
||||
assert (item2);
|
||||
return item2;
|
||||
}
|
||||
|
||||
} // end namespace Elmxx
|
||||
|
|
Loading…
Reference in New Issue